src/Directory.php
public function action($method, $path, $domainOrAction)
    {
        if ($domainOrAction instanceof Action) {
            $action = $domainOrAction;
        } else {
            $action = new Action($domainOrAction);
        }

        return $this->withValue(sprintf('%s %s', $method, $path), $action);
    }
public function action($method, $path, $domainOrAction)
    {
        if ($domainOrAction instanceof Action) {
            $action = $domainOrAction;
        } else {
            $action = new Action($domainOrAction);
        }

        return $this->withValue(sprintf('%s %s', $method, $path), $action);
    }
@param string $method
@param string $path
@param string|Action $domainOrAction

@return static