src/DunitCommand.php
private function commandExists($command)
    {
        $response = trim(shell_exec(sprintf(
            'which %s',
            escapeshellarg($command)
        )));
        return !empty($response);
    }
private function commandExists($command)
    {
        $response = trim(shell_exec(sprintf(
            'which %s',
            escapeshellarg($command)
        )));
        return !empty($response);
    }
private function commandExists ( $ command ) { $ response = trim ( shell_exec ( sprintf ( 'which %s' , escapeshellarg ( $ command ) ) ) ) ; return ! empty ( $ response ) ; }
Determines if a command exists on the current environment.

N.B. This function is not cross platform. The "which" command used is
not portable to Microsoft Windows OS. Feel free to provide a pull
request if you wish to use dunit on windows.

@param string $command The command to check
@return boolean Returns true if the command has been found and false,
otherwise.
Determines if a command exists on the current environment .