public function toValidator($command)
    {
        $class = get_class($command);
        $offset = ($this->positionAt('Command', $class)) ?: $this->positionAt('Request', $class);

        return substr_replace($class, 'Validator', $offset);
    }
public function toValidator($command)
    {
        $class = get_class($command);
        $offset = ($this->positionAt('Command', $class)) ?: $this->positionAt('Request', $class);

        return substr_replace($class, 'Validator', $offset);
    }
public function toValidator ( $ command ) { $ class = get_class ( $ command ) ; $ offset = ( $ this -> positionAt ( 'Command' , $ class ) ) ? : $ this -> positionAt ( 'Request' , $ class ) ; return substr_replace ( $ class , 'Validator' , $ offset ) ; }
Translate a command to its respective validator.

@param $command
@return mixed
Translate a command to its respective validator .