public static function detectCmdLocationInPath(string $cmd, string $path) : string
    {
        $command = $path . DIRECTORY_SEPARATOR . $cmd;
        $bin     = self::getExecutable($command);
        if (empty($bin)) {
            throw new RuntimeException(sprintf('wrong path specified for \'%s\': %s', $cmd, $path));
        }
        return $bin;
    }
public static function detectCmdLocationInPath(string $cmd, string $path) : string
    {
        $command = $path . DIRECTORY_SEPARATOR . $cmd;
        $bin     = self::getExecutable($command);
        if (empty($bin)) {
            throw new RuntimeException(sprintf('wrong path specified for \'%s\': %s', $cmd, $path));
        }
        return $bin;
    }
public static function detectCmdLocationInPath ( string $ cmd , string $ path ) : string { $ command = $ path . DIRECTORY_SEPARATOR . $ cmd ; $ bin = self :: getExecutable ( $ command ) ; if ( empty ( $ bin ) ) { throw new RuntimeException ( sprintf ( 'wrong path specified for \'%s\': %s' , $ cmd , $ path ) ) ; } return $ bin ; }
Detect a command in a given path.

@param  string $cmd
@param  string $path
@return string
@throws \RuntimeException
Detect a command in a given path .