src/Runner.php
public function on($eventName, callable $callable)
    {
        \Assert\that($eventName)->string()->notEmpty();

        $this->eventDispatcher->addListener($eventName, $callable);

        return $this;
    }
public function on($eventName, callable $callable)
    {
        \Assert\that($eventName)->string()->notEmpty();

        $this->eventDispatcher->addListener($eventName, $callable);

        return $this;
    }
Register an callable to an event.

@param string   $eventName
@param callable $callable

@return $this