Your project must not contain invalid instantiations
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_instantiation
- if (\is_string($callable) && \str_contains($callable, '::')) {
- $callable = \explode('::', $callable);
- }
- if (! \is_array($callable)) {
- return new ReflectionFunction($callable);
- }
- try {
- $ref = new ReflectionMethod($callable[0], $callable[1]);
- } catch (ReflectionException $err) {