public function getSubCommandConfig($name)
    {
        foreach ($this->subCommandConfigs as $commandConfig) {
            if ($name === $commandConfig->getName()) {
                return $commandConfig;
            }
        }

        throw NoSuchCommandException::forCommandName($name);
    }
public function getSubCommandConfig($name)
    {
        foreach ($this->subCommandConfigs as $commandConfig) {
            if ($name === $commandConfig->getName()) {
                return $commandConfig;
            }
        }

        throw NoSuchCommandException::forCommandName($name);
    }
public function getSubCommandConfig ( $ name ) { foreach ( $ this -> subCommandConfigs as $ commandConfig ) { if ( $ name === $ commandConfig -> getName ( ) ) { return $ commandConfig ; } } throw NoSuchCommandException :: forCommandName ( $ name ) ; }
Returns the sub-command configuration for a given name.

@param string $name The name of the sub-command.

@return SubCommandConfig The sub-command configuration.

@throws NoSuchCommandException If the sub-command configuration is not
found.

@see beginSubCommand()
Returns the sub - command configuration for a given name .