1515use Geocoder \Collection ;
1616use Geocoder \Exception \InvalidServerResponse ;
1717use Geocoder \Exception \UnsupportedOperation ;
18+ use Geocoder \Http \Provider \AbstractHttpProvider ;
1819use Geocoder \Location ;
1920use Geocoder \Model \AddressBuilder ;
2021use Geocoder \Model \AddressCollection ;
22+ use Geocoder \Provider \Photon \Model \PhotonAddress ;
23+ use Geocoder \Provider \Provider ;
2124use Geocoder \Query \GeocodeQuery ;
2225use Geocoder \Query \ReverseQuery ;
23- use Geocoder \Http \Provider \AbstractHttpProvider ;
24- use Geocoder \Provider \Provider ;
25- use Geocoder \Provider \Photon \Model \PhotonAddress ;
2626use Psr \Http \Client \ClientInterface ;
2727
2828/**
@@ -38,8 +38,6 @@ final class Photon extends AbstractHttpProvider implements Provider
3838
3939 /**
4040 * @param ClientInterface $client an HTTP client
41- *
42- * @return Photon
4341 */
4442 public static function withKomootServer (ClientInterface $ client ): self
4543 {
@@ -57,9 +55,6 @@ public function __construct(ClientInterface $client, $rootUrl)
5755 $ this ->rootUrl = rtrim ($ rootUrl , '/ ' );
5856 }
5957
60- /**
61- * {@inheritdoc}
62- */
6358 public function geocodeQuery (GeocodeQuery $ query ): Collection
6459 {
6560 $ address = $ query ->getText ();
@@ -91,9 +86,6 @@ public function geocodeQuery(GeocodeQuery $query): Collection
9186 return new AddressCollection ($ results );
9287 }
9388
94- /**
95- * {@inheritdoc}
96- */
9789 public function reverseQuery (ReverseQuery $ query ): Collection
9890 {
9991 $ coordinates = $ query ->getCoordinates ();
@@ -123,11 +115,6 @@ public function reverseQuery(ReverseQuery $query): Collection
123115 return new AddressCollection ($ results );
124116 }
125117
126- /**
127- * @param \stdClass $feature
128- *
129- * @return Location
130- */
131118 private function featureToAddress (\stdClass $ feature ): Location
132119 {
133120 $ builder = new AddressBuilder ($ this ->getName ());
@@ -166,19 +153,11 @@ private function featureToAddress(\stdClass $feature): Location
166153 return $ address ;
167154 }
168155
169- /**
170- * {@inheritdoc}
171- */
172156 public function getName (): string
173157 {
174158 return 'photon ' ;
175159 }
176160
177- /**
178- * @param string $url
179- *
180- * @return \stdClass
181- */
182161 private function executeQuery (string $ url ): \stdClass
183162 {
184163 $ content = $ this ->getUrlContents ($ url );
0 commit comments