src/Geolocation.php
public function getAddresses(CoordinatesInterface $coordinates) : AddressCollection
    {
        $url = $this->coordinatesQuery($coordinates);
        $json = $this->fetchUrl($url);

        // convert google data to address collection
        $results = [];
        foreach ($json->results as $result) {
            $address = AddressBuild::create($result);
            $address->setCoordinates($coordinates);
            $results[] = $address;
        }

        return new AddressCollection($results);
    }
public function getAddresses(CoordinatesInterface $coordinates) : AddressCollection
    {
        $url = $this->coordinatesQuery($coordinates);
        $json = $this->fetchUrl($url);

        // convert google data to address collection
        $results = [];
        foreach ($json->results as $result) {
            $address = AddressBuild::create($result);
            $address->setCoordinates($coordinates);
            $results[] = $address;
        }

        return new AddressCollection($results);
    }
public function getAddresses ( CoordinatesInterface $ coordinates ) : AddressCollection { $ url = $ this -> coordinatesQuery ( $ coordinates ) ; $ json = $ this -> fetchUrl ( $ url ) ; // convert google data to address collection $ results = [ ] ; foreach ( $ json -> results as $ result ) { $ address = AddressBuild :: create ( $ result ) ; $ address -> setCoordinates ( $ coordinates ) ; $ results [ ] = $ address ; } return new AddressCollection ( $ results ) ; }
Get possible addresses using CoordinatesInterface

@param CoordinatesInterface $coordinates
@return AddressCollection
Get possible addresses using CoordinatesInterface