-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
4 changed files
with
15 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,9 @@ | |
|
||
namespace Geocoder\Provider\GeoIP2; | ||
|
||
use GeoIp2\ProviderInterface; | ||
use Geocoder\Exception\InvalidArgument; | ||
use Geocoder\Exception\UnsupportedOperation; | ||
use GeoIp2\ProviderInterface; | ||
|
||
/** | ||
* @author Jens Wiese <[email protected]> | ||
|
@@ -24,9 +24,9 @@ class GeoIP2Adapter | |
/** | ||
* GeoIP2 models (e.g. city or country). | ||
*/ | ||
const GEOIP2_MODEL_CITY = 'city'; | ||
public const GEOIP2_MODEL_CITY = 'city'; | ||
|
||
const GEOIP2_MODEL_COUNTRY = 'country'; | ||
public const GEOIP2_MODEL_COUNTRY = 'country'; | ||
|
||
/** | ||
* @var ProviderInterface | ||
|
@@ -39,8 +39,7 @@ class GeoIP2Adapter | |
protected $geoIP2Model; | ||
|
||
/** | ||
* @param \GeoIp2\ProviderInterface $geoIpProvider | ||
* @param string $geoIP2Model (e.g. self::GEOIP2_MODEL_CITY) | ||
* @param string $geoIP2Model (e.g. self::GEOIP2_MODEL_CITY) | ||
*/ | ||
public function __construct(ProviderInterface $geoIpProvider, $geoIP2Model = self::GEOIP2_MODEL_CITY) | ||
{ | ||
|
@@ -57,8 +56,6 @@ public function __construct(ProviderInterface $geoIpProvider, $geoIP2Model = sel | |
* Returns the content fetched from a given resource. | ||
* | ||
* @param string $url (e.g. file://database?127.0.0.1) | ||
* | ||
* @return string | ||
*/ | ||
public function getContent(string $url): string | ||
{ | ||
|
@@ -81,8 +78,6 @@ public function getContent(string $url): string | |
|
||
/** | ||
* Returns the name of the Adapter. | ||
* | ||
* @return string | ||
*/ | ||
public function getName(): string | ||
{ | ||
|
@@ -91,10 +86,6 @@ public function getName(): string | |
|
||
/** | ||
* Returns whether method is supported by GeoIP2. | ||
* | ||
* @param string $method | ||
* | ||
* @return bool | ||
*/ | ||
protected function isSupportedGeoIP2Model(string $method): bool | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters