Your project should not use invalid return types

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

  1. $args[$position] = $param->getDefaultValue();
  2. }
  3. }
  4. return $args;
    Method Projek\Container\Resolver::resolveArgs() should return list<mixed> but returns array<int, mixed>.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  5. }
  6. /**
  7. * @param \ReflectionParameter $param
  8. * @return string

Your project must not contain invalid function or method calls 3

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

  1. // Otherwise convert it to closure.
  2. $entry = \Closure::fromCallable($entry);
  3. }
  4. $ref = $this->createCallableReflection($entry);
    Parameter #1 $callable of method Projek\Container\Resolver::createCallableReflection() expects callable(): mixed, mixed given.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  5. $caller = $ref->getName();
  6. /** @var list<object|string|null> */
  7. $params = [];
  1. }
  2. try {
  3. $params[] = $this->resolveArgs($ref, $args);
  4. return $ref->invokeArgs(...$params);
    Parameter #1 $args|object of method ReflectionFunction::invokeArgs() expects array|object|null, mixed given.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  5. } catch (Exception $err) {
  6. throw new Exception($caller . '(): ' . $err->getMessage(), $err->getPrevious());
  7. }
  8. }
in src/Container.php, line 122
  1. $this->factories[$id] = \is_object($factory) && ! ($factory instanceof \Closure)
  2. ? \get_class($factory)
  3. : $factory;
  4. $entry = $this->resolver->resolve($this->factories[$id]);
    Parameter #1 $entry of method Projek\Container\Resolver::resolve() expects (callable(): mixed)|object|string, mixed given.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  5. if (\is_object($entry) && $this->isInjectable($entry)) {
  6. $entry->setContainer($this);
  7. }

Your project must not contain invalid instantiations

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

  1. /** @var array<string> */
  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 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) {