Your project must not contain invalid function or method calls 3

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

in src/Container.php, line 84
  1. if (\is_object($entry) && ! \is_callable($entry)) {
  2. return $entry;
  3. }
  4. return $this->handledEntries[$id] = $this->resolver->handle($entry);
    Parameter #1 $callable of method Projek\Container\Resolver::handle() expects array{object|string, string}|(callable(): mixed)|object|string, mixed given.
    Last edited by Fery Wardiyanto
  5. }
  6. /**
  7. * Determine whether the **entry** is registered.
  8. *
  1. public function offsetGet(mixed $id): mixed
  2. {
  3. $entry = $this->entries[$id];
  4. if ($entry instanceof ContainerAware && null === $entry->getContainer()) {
  5. $entry->setContainer($this[ContainerInterface::class]);
    Parameter #1 $container of method Projek\Container\ContainerAware::setContainer() expects Psr\Container\ContainerInterface, mixed given.
    Last edited by Fery Wardiyanto
  6. }
  7. return $entry;
  8. }
  1. }
  2. public function offsetUnset(mixed $id): void
  3. {
  4. throw new Exception(
  5. \sprintf('Removing registered entry "%s" is not supported.', $id)
    Parameter #2 ...$values of function sprintf expects bool|float|int|string|null, mixed given.
    Last edited by Fery Wardiyanto
  6. );
  7. }
  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(iterable $entries = [])
    Method Projek\Container\EntryCollector::__construct() has parameter $entries with no value type specified in iterable type iterable.
    Last edited by Fery Wardiyanto
  6. {
  7. foreach ($entries as $id => $entry) {
  8. $this->offsetSet($id, $entry);
  9. }
  10. }

Your project files should use safer permissions

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

Your project contains files with permissive permissions. In order to avoid opening a security breach, you should restrict execution rights on following files:
  • src/Container.php
Time to fix: about 15 minutes
Read doc Open Issue Permalink Copy Prompt
Collective
chmod a-x 'src/Container.php'