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]);