src/bus/ValidateMiddleware.php
public function execute($command, callable $next)
    {
        if (!$command->validate()) {
            // TODO: specific exception
            throw new \InvalidArgumentException(implode(', ', $command->getFirstErrors()));
        }

        return $next($command);
    }
public function execute($command, callable $next)
    {
        if (!$command->validate()) {
            // TODO: specific exception
            throw new \InvalidArgumentException(implode(', ', $command->getFirstErrors()));
        }

        return $next($command);
    }
@param object|Model $command
@param callable $next

@return mixed