src/EventEmitterTrait.php
public function once(string $event, callable $listener) : self
    {
        $onceListener = function () use (&$onceListener, $event, $listener) {
            $this->removeListener($event, $onceListener);

            call_user_func_array($listener, func_get_args());
        };

        $this->on($event, $onceListener);

        return $this;
    }
public function once(string $event, callable $listener) : self
    {
        $onceListener = function () use (&$onceListener, $event, $listener) {
            $this->removeListener($event, $onceListener);

            call_user_func_array($listener, func_get_args());
        };

        $this->on($event, $onceListener);

        return $this;
    }
@param string   $event
@param callable $listener

@return $this