public static function getCommand($command = null)
    {
        if (is_null($command)) {
            $command = (PHP_OS == 'Darwin') ? 'ctags' : 'ctags-exuberant';
        }

        if (exec("which $command")) {
            return $command;
        }

        throw new \Exception("command not found: $command");
    }
public static function getCommand($command = null)
    {
        if (is_null($command)) {
            $command = (PHP_OS == 'Darwin') ? 'ctags' : 'ctags-exuberant';
        }

        if (exec("which $command")) {
            return $command;
        }

        throw new \Exception("command not found: $command");
    }
public static function getCommand ( $ command = null ) { if ( is_null ( $ command ) ) { $ command = ( PHP_OS == 'Darwin' ) ? 'ctags' : 'ctags-exuberant' ; } if ( exec ( "which $command" ) ) { return $ command ; } throw new \ Exception ( "command not found: $command" ) ; }
Attempts to find and return the installed ctags command.

@param  string|null $command ctags command, used only for testing
@return string      Appropriate ctags command, either ctags or ctags-exuberant
@throws \Exception  Throws exception if command not installed
Attempts to find and return the installed ctags command .