Your project should not use invalid return types

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

  1. if (\is_array($entry) && \is_string($entry[0])) {
  2. $entry[0] = $this->resolve($entry[0], $args);
  3. }
  4. if (\is_object($entry) || \is_callable($entry)) {
  5. return $entry;
    Method Projek\Container\Resolver::resolve() should return (callable(): mixed)|TObj of object but returns (callable(): mixed)|object.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. }
  7. throw new InvalidArgumentException(
  8. \sprintf('Cannot resolve invalid entry of "%s"', \gettype($entry))
  9. );

Your project must not contain invalid function or method calls 2

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

  1. ? \explode('::', $entry)
  2. : $this->createInstance($entry, $args);
  3. }
  4. if (\is_array($entry) && \is_string($entry[0])) {
  5. $entry[0] = $this->resolve($entry[0], $args);
    Unable to resolve the template type TObj in call to method Projek\Container\Resolver::resolve()
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. }
  7. if (\is_object($entry) || \is_callable($entry)) {
  8. return $entry;
  9. }
in src/Container.php, line 116
  1. $this->factories[$id] = \is_object($factory) && ! ($factory instanceof Closure)
  2. ? \get_class($factory)
  3. : $factory;
  4. $entry = $this->resolver->resolve($this->factories[$id]);
    Unable to resolve the template type TObj in call to method Projek\Container\Resolver::resolve()
    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. }