Skip to content

Commit

Permalink
Add PHP Coding Standards Fixer in CI (#1196)
Browse files Browse the repository at this point in the history
* Update composer.json

* Update .gitignore

* Update php.yml

* Apply PHPCSFixer fixes

* Switch to php-cs-fixer/shim

* Create .php-cs-fixer.dist.php
  • Loading branch information
jbelien committed Jul 21, 2023
1 parent 7167904 commit 933a0d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Tests/TomTomTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
use Geocoder\Collection;
use Geocoder\IntegrationTest\BaseTestCase;
use Geocoder\Location;
use Geocoder\Provider\TomTom\TomTom;
use Geocoder\Query\GeocodeQuery;
use Geocoder\Query\ReverseQuery;
use Geocoder\Provider\TomTom\TomTom;

class TomTomTest extends BaseTestCase
{
Expand Down
17 changes: 4 additions & 13 deletions TomTom.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
use Geocoder\Collection;
use Geocoder\Exception\InvalidCredentials;
use Geocoder\Exception\UnsupportedOperation;
use Geocoder\Http\Provider\AbstractHttpProvider;
use Geocoder\Model\Address;
use Geocoder\Model\AddressCollection;
use Geocoder\Provider\Provider;
use Geocoder\Query\GeocodeQuery;
use Geocoder\Query\ReverseQuery;
use Geocoder\Http\Provider\AbstractHttpProvider;
use Geocoder\Provider\Provider;
use Psr\Http\Client\ClientInterface;

/**
Expand All @@ -31,12 +31,12 @@ final class TomTom extends AbstractHttpProvider implements Provider
/**
* @var string
*/
const GEOCODE_ENDPOINT_URL = 'https://api.tomtom.com/search/2/geocode/%s.json?key=%s&limit=%d';
public const GEOCODE_ENDPOINT_URL = 'https://api.tomtom.com/search/2/geocode/%s.json?key=%s&limit=%d';

/**
* @var string
*/
const REVERSE_ENDPOINT_URL = 'https://api.tomtom.com/search/2/reverseGeocode/%F,%F.json?key=%s';
public const REVERSE_ENDPOINT_URL = 'https://api.tomtom.com/search/2/reverseGeocode/%F,%F.json?key=%s';

/**
* @var string
Expand All @@ -57,9 +57,6 @@ public function __construct(ClientInterface $client, string $apiKey)
parent::__construct($client);
}

/**
* {@inheritdoc}
*/
public function geocodeQuery(GeocodeQuery $query): Collection
{
$address = $query->getText();
Expand Down Expand Up @@ -108,9 +105,6 @@ public function geocodeQuery(GeocodeQuery $query): Collection
return new AddressCollection($locations);
}

/**
* {@inheritdoc}
*/
public function reverseQuery(ReverseQuery $query): Collection
{
$coordinates = $query->getCoordinates();
Expand Down Expand Up @@ -152,9 +146,6 @@ public function reverseQuery(ReverseQuery $query): Collection
return new AddressCollection($locations);
}

/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'tomtom';
Expand Down

0 comments on commit 933a0d8

Please sign in to comment.