protected function processDefinitions(array $definitions)
    {
        foreach ($definitions['subdivisions'] as $code => &$definition) {
            // Add common keys from the root level.
            $definition['country_code'] = $definitions['country_code'];
            if (isset($definitions['locale'])) {
                $definition['locale'] = $definitions['locale'];
            }
            // Ensure the presence of code and name.
            $definition['code'] = $code;
            if (!isset($definition['name'])) {
                $definition['name'] = $code;
            }
            if (isset($definition['local_code']) && !isset($definition['local_name'])) {
                $definition['local_name'] = $definition['local_code'];
            }
        }

        return $definitions;
    }
protected function processDefinitions(array $definitions)
    {
        foreach ($definitions['subdivisions'] as $code => &$definition) {
            // Add common keys from the root level.
            $definition['country_code'] = $definitions['country_code'];
            if (isset($definitions['locale'])) {
                $definition['locale'] = $definitions['locale'];
            }
            // Ensure the presence of code and name.
            $definition['code'] = $code;
            if (!isset($definition['name'])) {
                $definition['name'] = $code;
            }
            if (isset($definition['local_code']) && !isset($definition['local_name'])) {
                $definition['local_name'] = $definition['local_code'];
            }
        }

        return $definitions;
    }
protected function processDefinitions ( array $ definitions ) { foreach ( $ definitions [ 'subdivisions' ] as $ code => & $ definition ) { // Add common keys from the root level. $ definition [ 'country_code' ] = $ definitions [ 'country_code' ] ; if ( isset ( $ definitions [ 'locale' ] ) ) { $ definition [ 'locale' ] = $ definitions [ 'locale' ] ; } // Ensure the presence of code and name. $ definition [ 'code' ] = $ code ; if ( ! isset ( $ definition [ 'name' ] ) ) { $ definition [ 'name' ] = $ code ; } if ( isset ( $ definition [ 'local_code' ] ) && ! isset ( $ definition [ 'local_name' ] ) ) { $ definition [ 'local_name' ] = $ definition [ 'local_code' ] ; } } return $ definitions ; }
Processes the loaded definitions.

Adds keys and values that were removed from the JSON files for brevity.

@param array $definitions The definitions.

@return array The processed definitions.
Processes the loaded definitions .