CommerceGuys\Addressing\AddressFormat\AddressFormatRepository::processDefinition PHP Method

processDefinition() protected method

Processes the country's address format definition.
protected processDefinition ( string $countryCode, array $definition ) : array
$countryCode string The country code.
$definition array The definition.
return array The processed definition.
    protected function processDefinition($countryCode, array $definition)
    {
        $definition['country_code'] = $countryCode;
        // Merge-in defaults.
        $definition += $this->getGenericDefinition();
        // Always require the given name and family name.
        $definition['required_fields'][] = AddressField::GIVEN_NAME;
        $definition['required_fields'][] = AddressField::FAMILY_NAME;
        return $definition;
    }