Skip to content

Commit 534e99e

Browse files
authored
Fixed some code smell (#709)
* Fixed type issues * Fixed code smell
1 parent 52b0f11 commit 534e99e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Geonames.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ private function executeQuery(string $url, string $locale = null): AddressCollec
139139
for ($level = 1; $level <= AdminLevelCollection::MAX_LEVEL_DEPTH; ++$level) {
140140
$adminNameProp = 'adminName'.$level;
141141
$adminCodeProp = 'adminCode'.$level;
142-
if (!empty($item->$adminNameProp) || !empty($item->$adminCodeProp)) {
143-
$builder->addAdminLevel($level, $item->$adminNameProp ?? null, $item->$adminCodeProp ?? null);
142+
if (!empty($item->$adminNameProp)) {
143+
$builder->addAdminLevel($level, $item->$adminNameProp, $item->$adminCodeProp ?? null);
144144
}
145145
}
146146

0 commit comments

Comments
 (0)