public function handle($command, Closure $next)
    {
        if (property_exists($command, 'rules') && is_array($command->rules)) {
            $this->validate($command);
        }

        return $next($command);
    }
public function handle($command, Closure $next)
    {
        if (property_exists($command, 'rules') && is_array($command->rules)) {
            $this->validate($command);
        }

        return $next($command);
    }
public function handle ( $ command , Closure $ next ) { if ( property_exists ( $ command , 'rules' ) && is_array ( $ command -> rules ) ) { $ this -> validate ( $ command ) ; } return $ next ( $ command ) ; }
Validate the command before execution.

@param object   $command
@param \Closure $next

@throws \AltThree\Validator\ValidationException

@return void
Validate the command before execution .