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
- $args[$position] = $param->getDefaultValue();
- }
- }
- return $args;
- }
- /**
- * @param \ReflectionParameter $param
- * @return string
Your project must not contain invalid function or method calls 3
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_call
- // Otherwise convert it to closure.
- $entry = \Closure::fromCallable($entry);
- }
- $ref = $this->createCallableReflection($entry);
- $caller = $ref->getName();
- /** @var list<object|string|null> */
- $params = [];
- }
- try {
- $params[] = $this->resolveArgs($ref, $args);
- return $ref->invokeArgs(...$params);
- } catch (Exception $err) {
- throw new Exception($caller . '(): ' . $err->getMessage(), $err->getPrevious());
- }
- }
- $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);
- }
Your project must not contain invalid instantiations
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_instantiation
- /** @var array<string> */
- $callable = \explode('::', $callable);
- }
- if (! \is_array($callable)) {
- return new \ReflectionFunction($callable);
- }
- try {
- $ref = new \ReflectionMethod($callable[0], $callable[1]);
- } catch (\ReflectionException $err) {