Skip to content

Commit d6e845a

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 71919f8 commit d6e845a

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

IP2LocationBinary.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
use Geocoder\Exception\UnsupportedOperation;
1919
use Geocoder\Model\Address;
2020
use Geocoder\Model\AddressCollection;
21-
use Geocoder\Query\GeocodeQuery;
22-
use Geocoder\Query\ReverseQuery;
2321
use Geocoder\Provider\AbstractProvider;
2422
use Geocoder\Provider\Provider;
23+
use Geocoder\Query\GeocodeQuery;
24+
use Geocoder\Query\ReverseQuery;
2525

2626
final class IP2LocationBinary extends AbstractProvider implements Provider
2727
{
@@ -36,9 +36,6 @@ final class IP2LocationBinary extends AbstractProvider implements Provider
3636
private $openFlag;
3737

3838
/**
39-
* @param string $binFile
40-
* @param int|null $openFlag
41-
*
4239
* @throws FunctionNotFound if IP2Location's library not installed
4340
* @throws InvalidArgument if dat file is not correct (optional)
4441
*/
@@ -60,9 +57,6 @@ public function __construct(string $binFile, int $openFlag = null)
6057
$this->openFlag = null === $openFlag ? \IP2Location\Database::FILE_IO : $openFlag;
6158
}
6259

63-
/**
64-
* {@inheritdoc}
65-
*/
6660
public function geocodeQuery(GeocodeQuery $query): Collection
6761
{
6862
$address = $query->getText();
@@ -97,17 +91,11 @@ public function geocodeQuery(GeocodeQuery $query): Collection
9791
]);
9892
}
9993

100-
/**
101-
* {@inheritdoc}
102-
*/
10394
public function reverseQuery(ReverseQuery $query): Collection
10495
{
10596
throw new UnsupportedOperation('The IP2LocationBinary is not able to do reverse geocoding.');
10697
}
10798

108-
/**
109-
* {@inheritdoc}
110-
*/
11199
public function getName(): string
112100
{
113101
return 'ip2location_binary';

Tests/IP2LocationBinaryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
use Geocoder\IntegrationTest\BaseTestCase;
1616
use Geocoder\Location;
17+
use Geocoder\Provider\IP2LocationBinary\IP2LocationBinary;
1718
use Geocoder\Query\GeocodeQuery;
1819
use Geocoder\Query\ReverseQuery;
19-
use Geocoder\Provider\IP2LocationBinary\IP2LocationBinary;
2020

2121
class IP2LocationBinaryTest extends BaseTestCase
2222
{

0 commit comments

Comments
 (0)