Your project must not contain invalid instantiations

More information: https://insight.symfony.com/what-we-analyse/php.invalid_instantiation

  1. if (\is_string($callable) && \str_contains($callable, '::')) {
  2. $callable = \explode('::', $callable);
  3. }
  4. if (! \is_array($callable)) {
  5. return new ReflectionFunction($callable);
    Parameter #1 $function of class ReflectionFunction constructor expects Closure|string, (callable(): mixed)|object|string given.
    Time to fix: about 1 hour
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. }
  7. try {
  8. $ref = new ReflectionMethod($callable[0], $callable[1]);
  9. } catch (ReflectionException $err) {