Skip to content

Commit

Permalink
When uppercasing address lines 1 and 2, uppercase line 3 as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanz committed Nov 17, 2023
1 parent 62af482 commit 861de87
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions src/AddressFormat/AddressFormatRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected function getDefinitions(): array
'AR' => [
'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%postalCode %locality\n%administrativeArea",
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'postalCode',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'postalCode',
],
'postal_code_pattern' => '((?:[A-HJ-NP-Z])?\d{4})([A-Z]{3})?',
'subdivision_depth' => 1,
Expand All @@ -145,7 +145,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
],
'postal_code_type' => 'zip',
'postal_code_pattern' => '(96799)(?:[ \-](\d{4}))?',
Expand Down Expand Up @@ -217,7 +217,7 @@ protected function getDefinitions(): array
],
'BJ' => [
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
],
'BL' => [
Expand All @@ -226,7 +226,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '9[78][01]\d{2}',
],
Expand All @@ -240,7 +240,7 @@ protected function getDefinitions(): array
],
'BO' => [
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
],
'BR' => [
Expand Down Expand Up @@ -276,7 +276,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'administrativeArea', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea', 'postalCode',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea', 'postalCode',
],
'postal_code_pattern' => '[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z] ?\d[ABCEGHJ-NPRSTV-Z]\d',
'subdivision_depth' => 1,
Expand Down Expand Up @@ -450,7 +450,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'administrativeArea', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
],
'administrative_area_type' => 'state',
'postal_code_type' => 'zip',
Expand Down Expand Up @@ -494,7 +494,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '9[78]3\d{2}',
],
Expand Down Expand Up @@ -532,7 +532,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '9[78][01]\d{2}',
],
Expand Down Expand Up @@ -563,7 +563,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
],
'postal_code_type' => 'zip',
'postal_code_pattern' => '(969(?:[12]\d|3[12]))(?:[ \-](\d{4}))?',
Expand Down Expand Up @@ -618,7 +618,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
],
'postal_code_pattern' => '\d{4}',
],
Expand Down Expand Up @@ -754,14 +754,14 @@ protected function getDefinitions(): array
'KI' => [
'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%administrativeArea\n%locality",
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
],
'administrative_area_type' => 'island',
'subdivision_depth' => 1,
],
'KM' => [
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
],
'KN' => [
Expand Down Expand Up @@ -886,7 +886,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '9[78][01]\d{2}',
],
Expand All @@ -900,7 +900,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'administrativeArea', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
],
'administrative_area_type' => 'state',
'postal_code_type' => 'zip',
Expand Down Expand Up @@ -932,7 +932,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
],
'postal_code_type' => 'zip',
'postal_code_pattern' => '(9695[012])(?:[ \-](\d{4}))?',
Expand All @@ -943,13 +943,13 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '9[78]2\d{2}',
],
'MR' => [
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
],
'MT' => [
Expand Down Expand Up @@ -1014,7 +1014,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '988\d{2}',
],
Expand Down Expand Up @@ -1139,7 +1139,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '9[78]5\d{2}',
],
Expand All @@ -1159,7 +1159,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
],
'postal_code_type' => 'zip',
'postal_code_pattern' => '(00[679]\d{2})(?:[ \-](\d{4}))?',
Expand All @@ -1178,7 +1178,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'administrativeArea', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
],
'administrative_area_type' => 'state',
'postal_code_type' => 'zip',
Expand All @@ -1194,7 +1194,7 @@ protected function getDefinitions(): array
],
'QA' => [
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
],
'RE' => [
Expand All @@ -1203,7 +1203,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '9[78]4\d{2}',
],
Expand All @@ -1213,7 +1213,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '\d{6}',
],
Expand All @@ -1227,15 +1227,15 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'administrativeArea', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'administrative_area_type' => 'region',
'postal_code_pattern' => '\d{6}',
'subdivision_depth' => 1,
],
'RW' => [
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
],
'SA' => [
Expand Down Expand Up @@ -1318,15 +1318,15 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'administrativeArea',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'administrativeArea',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'administrativeArea',
],
'postal_code_pattern' => '[A-Z]{2} ?\d{5}',
'subdivision_depth' => 1,
],
'SR' => [
'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%locality\n%administrativeArea",
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'administrativeArea',
'addressLine1', 'addressLine2', 'addressLine3', 'administrativeArea',
],
'subdivision_depth' => 1,
],
Expand All @@ -1347,7 +1347,7 @@ protected function getDefinitions(): array
'SZ' => [
'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%locality\n%postalCode",
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'postalCode',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'postalCode',
],
'postal_code_pattern' => '[HLMS]\d{3}',
],
Expand Down Expand Up @@ -1399,7 +1399,7 @@ protected function getDefinitions(): array
'TV' => [
'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%locality\n%administrativeArea",
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'administrativeArea',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'administrativeArea',
],
'administrative_area_type' => 'island',
'subdivision_depth' => 1,
Expand Down Expand Up @@ -1434,7 +1434,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'administrativeArea',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea',
],
'administrative_area_type' => 'state',
'postal_code_type' => 'zip',
Expand Down Expand Up @@ -1502,7 +1502,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
'addressLine1', 'addressLine2', 'addressLine3', 'locality', 'familyName', 'additionalName', 'givenName', 'organization',
],
'postal_code_type' => 'zip',
'postal_code_pattern' => '(008(?:(?:[0-4]\d)|(?:5[01])))(?:[ \-](\d{4}))?',
Expand All @@ -1518,7 +1518,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '986\d{2}',
],
Expand All @@ -1532,7 +1532,7 @@ protected function getDefinitions(): array
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
'addressLine1', 'addressLine2', 'addressLine3', 'locality',
],
'postal_code_pattern' => '976\d{2}',
],
Expand Down

0 comments on commit 861de87

Please sign in to comment.