for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Star\Component\State\Port\Symfony;
use Star\Component\State\Event\StateEvent;
use Star\Component\State\EventRegistry;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
final class EventDispatcherAdapter implements EventRegistry
{
/**
* @var EventDispatcherInterface
*/
private $dispatcher;
public function __construct(EventDispatcherInterface $dispatcher = null)
TRUE
FALSE
NULL
null
if (! $dispatcher) {
$dispatcher = new EventDispatcher();
}
$this->dispatcher = $dispatcher;
public function dispatch(string $name, StateEvent $event): void
$this->dispatcher->dispatch($event);
public function addListener(string $event, callable $listener): void
$this->dispatcher->addListener($event, $listener);
This check marks files that end in a newline character, i.e. an empy line.