Skip to content

Commit 08027e3

Browse files
Use foreach for looping variables
1 parent 938d905 commit 08027e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Geolocation.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,12 @@ public function getCoordinates(
170170
): Coordinates {
171171
$items = [];
172172
$variables = [$street, $streetNumber, $city, $zip, $country];
173-
for ($i = 0; $i < count($variables); $i ++) {
174-
if (empty($variables[$i])) {
173+
foreach ($variables as $variable) {
174+
if (empty($variable)) {
175175
continue;
176176
}
177177

178-
$items[] = $variables[$i];
178+
$items[] = $variable;
179179
}
180180

181181
$results = $this->doCall(array(

0 commit comments

Comments
 (0)