Your project must not contain invalid function or method calls

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

  1. }
  2. public function offsetSet(mixed $offset, mixed $value): void
  3. {
  4. if (\is_object($value) && $value instanceof ContainerAware && null === $value->getContainer()) {
  5. $value->setContainer($this[ContainerInterface::class]);
    Parameter #1 $container of method Projek\Container\ContainerAware::setContainer() expects Psr\Container\ContainerInterface, mixed given.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. }
  7. $this->entries[$offset] = $value;
  8. }

Your project should not use invalid parameter and return typehints

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

  1. /**
  2. * @var array<string, object|callable>
  3. */
  4. private array $entries = [];
  5. public function __construct(array $entries = [])
    Method Projek\Container\EntryCollector::__construct() has parameter $entries 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
  6. {
  7. foreach ($entries as $offset => $value) {
  8. $this->offsetSet($offset, $value);
  9. }
  10. }

Your project should not contain unused code

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

in src/Container.php, line 229
  1. * Determines if the given class is injectable.
  2. *
  3. * @param object $class
  4. * @return ($class is Container\ContainerAware ? true : false)
  5. */
  6. private function isInjectable(object $class): bool
    Method Projek\Container::isInjectable() is unused.
    Time to fix: about 15 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  7. {
  8. return $class instanceof Container\ContainerAware && null === $class->getContainer();
  9. }
  10. }