Your project must not contain invalid function or method calls
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_call
- // Otherwise convert it to closure.
- $callable = Closure::fromCallable($callable);
- }
- try {
- $ref = $this->createCallableReflection($callable);
- if ($ref instanceof ReflectionFunction) {
- return $ref->invokeArgs(
- $this->resolveArgs($ref, $args)
- );
Your project must not contain invalid instantiations
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_instantiation
- }
- // Pass non-array $callable directly to `ReflectionFunction` that possibly
- // a callable object including a `Closure`, or a string of function name
- if (! \is_array($callable)) {
- return new ReflectionFunction($callable);
- }
- /** @var array{object|string,string} $callable */
- $ref = new ReflectionMethod($callable[0], $callable[1]);