Phrozn\Runner\CommandLine\Callback\Base::getRealCommandName PHP Method

getRealCommandName() private method

Search if an alias exists for this command
private getRealCommandName ( string $file ) : string
$file string Command name (could be an alias)
return string The real command file name
    private function getRealCommandName($file)
    {
        $iter = CommandLine\Commands::getInstance();
        $commands = array();
        foreach ($iter as $name => $data) {
            $commands[$name] = $data;
        }
        ksort($commands);
        if (!file_exists($file)) {
            foreach ($commands as $command) {
                if (is_array($command["command"]["aliases"]) && in_array($file, $command["command"]["aliases"])) {
                    return $command["command"]["name"];
                }
            }
        }
        return $file;
    }