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
- );
- }
- try {
- $args = ($constructor = $ref->getConstructor())
- ? $this->resolveArgs($constructor, $ref->hasMethod('__invoke') ? [] : $args)
- : [];
- return $ref->newInstanceArgs($args);
- } catch (Exception $err) {
- throw new Exception($className . '::__construct(): ' . $err->getMessage(), $err->getPrevious());
- public function resolve($entry, array $args = [])
- {
- if (\is_string($entry) && ! \function_exists($entry)) {
- $entry = \str_contains($entry, '::')
- ? \explode('::', $entry)
- : $this->createInstance($entry, $args);
- }
- if (\is_array($entry) && \is_string($entry[0])) {
- $entry[0] = $this->resolve($entry[0], $args);
- }