Your project should not use invalid return types
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_return_typehint
- if (\is_array($entry) && \is_string($entry[0])) {
- $entry[0] = $this->resolve($entry[0], $args);
- }
- if (\is_object($entry) || \is_callable($entry)) {
- return $entry;
- }
- throw new InvalidArgumentException(
- \sprintf('Cannot resolve invalid entry of "%s"', \gettype($entry))
- );
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
- ? \explode('::', $entry)
- : $this->createInstance($entry, $args);
- }
- if (\is_array($entry) && \is_string($entry[0])) {
- $entry[0] = $this->resolve($entry[0], $args);
- }
- if (\is_object($entry) || \is_callable($entry)) {
- return $entry;
- }
- $this->factories[$id] = \is_object($factory) && ! ($factory instanceof Closure)
- ? \get_class($factory)
- : $factory;
- $entry = $this->resolver->resolve($this->factories[$id]);
- if (\is_object($entry) && $this->isInjectable($entry)) {
- $entry->setContainer($this);
- }