Your project must not contain invalid function or method calls 2
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_call
- $manager = \class_exists($class) ? $this->getManagerForClass($class) : null;
- if (!$manager) {
- throw new InvalidArgumentException(\sprintf('Class "%s" is not a managed Doctrine entity.', $class));
- }
- if (!$manager->getClassMetadata($class)->hasField($lookupField)) {
- throw new InvalidArgumentException(\sprintf('Field "%s" does not exist in entity "%s".', $lookupField, $class));
- }
- return $manager;
- }
- $manager = \class_exists($class) ? $this->getManagerForClass($class) : null;
- if (!$manager) {
- throw new InvalidArgumentException(\sprintf('Class "%s" is not a managed Doctrine entity.', $class));
- }
- if (!$manager->getClassMetadata($class)->hasField($lookupField)) {
- throw new InvalidArgumentException(\sprintf('Field "%s" does not exist in entity "%s".', $lookupField, $class));
- }
- return $manager;
- }