|
@@ -132,15 +132,15 @@ |
|
|
block discarded – undo |
|
132
|
132
|
return $builder->build(); |
|
133
|
133
|
} |
|
134
|
134
|
|
|
135
|
|
- private function extractFromContext(AddressBuilder &$builder, array $context): AddressBuilder |
|
|
135
|
+ private function extractFromContext(AddressBuilder&$builder, array $context): AddressBuilder |
|
136
|
136
|
{ |
|
137
|
|
- $cityContext = array_filter($context, function ($c) { return 1 === preg_match('/^city\.\d+$/', $c->id); }); |
|
|
137
|
+ $cityContext = array_filter($context, function($c) { return 1 === preg_match('/^city\.\d+$/', $c->id); }); |
|
138
|
138
|
if (count($cityContext) > 0) { |
|
139
|
139
|
$city = current($cityContext); |
|
140
|
140
|
$builder->setLocality($city->text); |
|
141
|
141
|
} |
|
142
|
142
|
|
|
143
|
|
- $countryContext = array_filter($context, function ($c) { return 1 === preg_match('/^country\.\d+$/', $c->id); }); |
|
|
143
|
+ $countryContext = array_filter($context, function($c) { return 1 === preg_match('/^country\.\d+$/', $c->id); }); |
|
144
|
144
|
if (count($countryContext) > 0) { |
|
145
|
145
|
$country = current($countryContext); |
|
146
|
146
|
$builder->setCountry($country->text); |
Please login to merge, or discard this patch.