Your project must not contain invalid instantiations 3

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

in src/Container.php, line 119
  1. if (isset($this->handledEntries[$id])) {
  2. return $this->handledEntries[$id];
  3. }
  4. $this->dispatch($instance = new Container\Events\AfterResolution(
  5. $this->entries[$id],
    Parameter #1 $entry of class Projek\Container\Events\AfterResolution constructor expects array|object|string, (callable)|object given.
    Time to fix: about 1 hour
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. $id,
  7. ));
  8. $entry = $instance->entry;
in src/Container.php, line 171
  1. $this->factories[$id] = \is_object($factory) && ! ($factory instanceof Closure)
  2. ? \get_class($factory)
  3. : $factory;
  4. $this->dispatch($reg = new Container\Events\BeforeRegistration(
  5. $this->factories[$id],
    Parameter #1 $factory of class Projek\Container\Events\BeforeRegistration constructor expects array|object|string, (callable)|string given.
    Time to fix: about 1 hour
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. $id,
  7. ));
  8. $this->entries[$id] = $this->resolver->resolve($reg->factory);
in src/Container.php, line 182
  1. if (isset($this->handledEntries[$id])) {
  2. unset($this->handledEntries[$id]);
  3. }
  4. $this->dispatch(new Container\Events\AfterRegistration(
  5. $this->entries[$id],
    Parameter #1 $entry of class Projek\Container\Events\AfterRegistration constructor expects array|object|string, (callable)|object given.
    Time to fix: about 1 hour
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. $id,
  7. ));
  8. return $this;
  9. }

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 175
  1. $this->dispatch($reg = new Container\Events\BeforeRegistration(
  2. $this->factories[$id],
  3. $id,
  4. ));
  5. $this->entries[$id] = $this->resolver->resolve($reg->factory);
    Parameter #1 $factory of method Projek\Container\Resolver::resolve() expects array{string, string}|(callable(): mixed)|object|string, array|object|string given.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. if (isset($this->handledEntries[$id])) {
  7. unset($this->handledEntries[$id]);
  8. }

Your project should not use invalid parameter and return typehints 3

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

  1. {
  2. /**
  3. * @param array{class-string<object>|string,string}|callable|object|string $entry
  4. * @param string $id
  5. */
  6. public function __construct(
    Method Projek\Container\Events\AfterResolution::__construct() 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. public array|object|string $entry,
  8. public string $id,
  9. ) {
  10. // .
  11. }
  1. {
  2. /**
  3. * @param array{class-string<object>|string,string}|callable|object|string $factory
  4. * @param string $id
  5. */
  6. public function __construct(
    Method Projek\Container\Events\BeforeRegistration::__construct() has parameter $factory 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. public array|object|string $factory,
  8. public string $id,
  9. ) {
  10. // .
  11. }
  1. /**
  2. * @package Projek\Container
  3. */
  4. final class AfterRegistration
  5. {
  6. public function __construct(
    Method Projek\Container\Events\AfterRegistration::__construct() 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. /** @var callable|object $entry */
  8. public array|object|string $entry,
  9. public string $id,
  10. ) {
  11. // .