public static function detectCmdLocationInPaths($cmd, array $paths) : string
    {
        foreach ($paths as $path) {
            $command = $path . DIRECTORY_SEPARATOR . $cmd;
            $bin     = self::getExecutable($command);
            if (null !== $bin) {
                return $bin;
            }
        }
        return '';
    }
public static function detectCmdLocationInPaths($cmd, array $paths) : string
    {
        foreach ($paths as $path) {
            $command = $path . DIRECTORY_SEPARATOR . $cmd;
            $bin     = self::getExecutable($command);
            if (null !== $bin) {
                return $bin;
            }
        }
        return '';
    }
public static function detectCmdLocationInPaths ( $ cmd , array $ paths ) : string { foreach ( $ paths as $ path ) { $ command = $ path . DIRECTORY_SEPARATOR . $ cmd ; $ bin = self :: getExecutable ( $ command ) ; if ( null !== $ bin ) { return $ bin ; } } return '' ; }
Check path list for executable command.

@param  string $cmd
@param  array  $paths
@return string
Check path list for executable command .