Skip to content

Commit 933a0d8

Browse files
authored
Add PHP Coding Standards Fixer in CI (#1196)
* Update composer.json * Update .gitignore * Update php.yml * Apply PHPCSFixer fixes * Switch to php-cs-fixer/shim * Create .php-cs-fixer.dist.php
1 parent 7167904 commit 933a0d8

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

Tests/TomTomTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
use Geocoder\Collection;
1616
use Geocoder\IntegrationTest\BaseTestCase;
1717
use Geocoder\Location;
18+
use Geocoder\Provider\TomTom\TomTom;
1819
use Geocoder\Query\GeocodeQuery;
1920
use Geocoder\Query\ReverseQuery;
20-
use Geocoder\Provider\TomTom\TomTom;
2121

2222
class TomTomTest extends BaseTestCase
2323
{

TomTom.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
use Geocoder\Collection;
1616
use Geocoder\Exception\InvalidCredentials;
1717
use Geocoder\Exception\UnsupportedOperation;
18+
use Geocoder\Http\Provider\AbstractHttpProvider;
1819
use Geocoder\Model\Address;
1920
use Geocoder\Model\AddressCollection;
21+
use Geocoder\Provider\Provider;
2022
use Geocoder\Query\GeocodeQuery;
2123
use Geocoder\Query\ReverseQuery;
22-
use Geocoder\Http\Provider\AbstractHttpProvider;
23-
use Geocoder\Provider\Provider;
2424
use Psr\Http\Client\ClientInterface;
2525

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

3636
/**
3737
* @var string
3838
*/
39-
const REVERSE_ENDPOINT_URL = 'https://api.tomtom.com/search/2/reverseGeocode/%F,%F.json?key=%s';
39+
public const REVERSE_ENDPOINT_URL = 'https://api.tomtom.com/search/2/reverseGeocode/%F,%F.json?key=%s';
4040

4141
/**
4242
* @var string
@@ -57,9 +57,6 @@ public function __construct(ClientInterface $client, string $apiKey)
5757
parent::__construct($client);
5858
}
5959

60-
/**
61-
* {@inheritdoc}
62-
*/
6360
public function geocodeQuery(GeocodeQuery $query): Collection
6461
{
6562
$address = $query->getText();
@@ -108,9 +105,6 @@ public function geocodeQuery(GeocodeQuery $query): Collection
108105
return new AddressCollection($locations);
109106
}
110107

111-
/**
112-
* {@inheritdoc}
113-
*/
114108
public function reverseQuery(ReverseQuery $query): Collection
115109
{
116110
$coordinates = $query->getCoordinates();
@@ -152,9 +146,6 @@ public function reverseQuery(ReverseQuery $query): Collection
152146
return new AddressCollection($locations);
153147
}
154148

155-
/**
156-
* {@inheritdoc}
157-
*/
158149
public function getName(): string
159150
{
160151
return 'tomtom';

0 commit comments

Comments
 (0)