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 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 should not use invalid parameter and return typehints

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

  1. * @param array<int, mixed> $args
  2. * @return callable
  3. * @throws Exception
  4. * @throws InvalidArgumentException
  5. */
  6. public function resolve(array|callable|object|string $entry, array $args = [])
    Method Projek\Container\Resolver::resolve() has parameter $entry with no value type specified in iterable type array.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  7. {
  8. if (\is_string($entry) && ! \function_exists($entry)) {
  9. $entry = \str_contains($entry, '::')
  10. ? \explode('::', $entry)
  11. : $this->createInstance($entry, $args);

Your project must not contain invalid function or method calls

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

in src/Container.php, line 191
  1. if ($condition) {
  2. $instance = $condition($instance) ?: $instance;
  3. }
  4. return $this->resolver->handle($instance, $args);
    Parameter #1 $callable of method Projek\Container\Resolver::handle() expects callable(): mixed, (callable(): mixed)|TObj of object given.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  5. }
  6. /**
  7. * Extending an entry.
  8. *