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 3d24f04 commit bead7ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
16 changes: 2 additions & 14 deletions MaxMindBinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
use Geocoder\Exception\UnsupportedOperation;
use Geocoder\Model\Address;
use Geocoder\Model\AddressCollection;
use Geocoder\Query\GeocodeQuery;
use Geocoder\Query\ReverseQuery;
use Geocoder\Provider\AbstractProvider;
use Geocoder\Provider\Provider;
use Geocoder\Query\GeocodeQuery;
use Geocoder\Query\ReverseQuery;

final class MaxMindBinary extends AbstractProvider implements Provider
{
Expand All @@ -36,9 +36,6 @@ final class MaxMindBinary extends AbstractProvider implements Provider
private $openFlag;

/**
* @param string $datFile
* @param int|null $openFlag
*
* @throws FunctionNotFound if maxmind's lib not installed
* @throws InvalidArgument if dat file is not correct (optional)
*/
Expand All @@ -64,9 +61,6 @@ public function __construct(string $datFile, int $openFlag = null)
$this->openFlag = null === $openFlag ? GEOIP_STANDARD : $openFlag;
}

/**
* {@inheritdoc}
*/
public function geocodeQuery(GeocodeQuery $query): Collection
{
$address = $query->getText();
Expand Down Expand Up @@ -108,17 +102,11 @@ public function geocodeQuery(GeocodeQuery $query): Collection
]);
}

/**
* {@inheritdoc}
*/
public function reverseQuery(ReverseQuery $query): Collection
{
throw new UnsupportedOperation('The MaxMindBinary is not able to do reverse geocoding.');
}

/**
* {@inheritdoc}
*/
public function getName(): string
{
return 'maxmind_binary';
Expand Down
2 changes: 1 addition & 1 deletion Tests/MaxMindBinaryTest.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\MaxMindBinary\MaxMindBinary;
use Geocoder\Query\GeocodeQuery;
use Geocoder\Query\ReverseQuery;
use Geocoder\Provider\MaxMindBinary\MaxMindBinary;

class MaxMindBinaryTest extends BaseTestCase
{
Expand Down

0 comments on commit bead7ba

Please sign in to comment.