Your project should use return types

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

  1. */
  2. final class ListenerProvider implements ContainerAware, ListenerProviderInterface
  3. {
  4. use HasContainer;
  5. public function getListenersForEvent(object $event): iterable
    Method Projek\Container\Events\ListenerProvider::getListenersForEvent() return type has no value type specified in iterable type iterable.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. {
  7. $listeners = [
  8. BeforeRegistration::class => ['beforeRegistration'],
  9. AfterRegistration::class => ['afterRegistration'],
  10. BeforeResolution::class => ['beforeResolution'],

Your project should not contain commented code

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

in src/Container.php, line 58
  1. self::class => $this,
  2. ContainerInterface::class => $this,
  3. ]);
  4. // if ($eventDispatcher) {
  5. // $entries[EventDispatcherInterface::class] = $eventDispatcher;
    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.
    Time to fix: about 30 minutes
    Read doc Permalink Copy Prompt
    Last edited by Fery Wardiyanto
  6. // }
  7. foreach ($entries as $id => $factory) {
  8. $this->set($id, $factory);
  9. }