Skip to content

Commit 3768b4b

Browse files
authored
Update DaData.php
1 parent 75759e5 commit 3768b4b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/DaData.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,12 @@ private function executeQuery(string $address, int $limit, string $locale = null
190190
if (!empty($addressInfo->area_with_type)) {
191191
$builder->addAdminLevel(2, $addressInfo->area_with_type, $addressInfo->area_fias_id);
192192
}
193-
if (!empty($addressInfo->settlement_with_type)) {
194-
$builder->addAdminLevel(3, $addressInfo->settlement_with_type, $addressInfo->settlement_fias_id);
195-
}
196193
$builder->setCountry($addressInfo->country ?? null);
197194
$builder->setCountryCode($addressInfo->country_iso_code ?? null);
198195

199196
/** @var DaDataAddress $location */
200197
$location = $builder->build(DaDataAddress::class);
198+
$location = $location->withPrecision($addressInfo->qc_geo);
201199
$locations[] = $location;
202200
}
203201

0 commit comments

Comments
 (0)