public function addSubcommands(array $commands)
    {
        foreach ($commands as $name => $params) {
            if ($params instanceof ConsoleInputSubcommand) {
                $name = $params;
                $params = [];
            }
            $this->addSubcommand($name, $params);
        }

        return $this;
    }
public function addSubcommands(array $commands)
    {
        foreach ($commands as $name => $params) {
            if ($params instanceof ConsoleInputSubcommand) {
                $name = $params;
                $params = [];
            }
            $this->addSubcommand($name, $params);
        }

        return $this;
    }
public function addSubcommands ( array $ commands ) { foreach ( $ commands as $ name => $ params ) { if ( $ params instanceof ConsoleInputSubcommand ) { $ name = $ params ; $ params = [ ] ; } $ this -> addSubcommand ( $ name , $ params ) ; } return $ this ; }
Add multiple subcommands at once.

@param array $commands Array of subcommands.
@return $this
Add multiple subcommands at once .