protected function hasCommand($input)
    {
        if (\preg_match('/([^\s]+?)(?:\s|$)/A', \ltrim($input), $match)) {
            return $this->has($match[1]);
        }

        return false;
    }
protected function hasCommand($input)
    {
        if (\preg_match('/([^\s]+?)(?:\s|$)/A', \ltrim($input), $match)) {
            return $this->has($match[1]);
        }

        return false;
    }
protected function hasCommand ( $ input ) { if ( \ preg_match ( '/([^\s]+?)(?:\s|$)/A' , \ ltrim ( $ input ) , $ match ) ) { return $ this -> has ( $ match [ 1 ] ) ; } return false ; }
Check whether a command is set for the current input string.

@param string $input

@return bool True if the shell has a command for the given input
Check whether a command is set for the current input string .