File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,9 +102,8 @@ private function executeQuery(string $url): AddressCollection
102102 throw new InvalidCredentials ('Insufficient credits to use IP2Location service. ' );
103103 } elseif (preg_match ('/invalid ip address/i ' , $ data ['response ' ])) {
104104 throw new UnsupportedOperation ('Invalid IP address. ' );
105- } else {
106- throw new UnsupportedOperation (sprintf ('Unexpected error: %s. ' , $ data ['response ' ]));
107105 }
106+ throw new UnsupportedOperation (sprintf ('Unexpected error: %s. ' , $ data ['response ' ]));
108107 }
109108
110109 if (isset ($ data ['region_name ' ])) {
Original file line number Diff line number Diff line change @@ -157,11 +157,10 @@ public function geocodeQuery(GeocodeQuery $query): Collection
157157 $ params = $ this ->addOptionsForGetQuery ($ params , $ options );
158158
159159 return $ this ->executeGetQuery (static ::GEOCODE_ENDPOINT , $ params );
160- } else {
161- $ params = $ this ->addOptionsForPostQuery ($ params , $ options );
162-
163- return $ this ->executePostQuery (static ::GEOCODE_ENDPOINT , $ params );
164160 }
161+ $ params = $ this ->addOptionsForPostQuery ($ params , $ options );
162+
163+ return $ this ->executePostQuery (static ::GEOCODE_ENDPOINT , $ params );
165164 }
166165
167166 public function reverseQuery (ReverseQuery $ query ): Collection
You can’t perform that action at this time.
0 commit comments