From bcee6855714b387518df8c2ce035a56aadecf7b5 Mon Sep 17 00:00:00 2001 From: Antonio Carlos Ribeiro Date: Sun, 29 Mar 2020 10:36:38 +0000 Subject: [PATCH] Apply fixes from StyleCI [ci skip] [skip ci] --- src/package/Countries.php | 4 ++-- src/package/Data/Repository.php | 2 +- src/package/Services/Cache/Managers/Nette.php | 2 +- src/package/Services/Cache/Service.php | 4 ++-- src/package/Services/Countries.php | 4 ++-- src/update/Countries.php | 4 ++-- src/update/Helper.php | 8 ++++---- src/update/Mledoze.php | 2 +- src/update/Nationality.php | 2 +- src/update/Rinvex.php | 4 ++-- src/update/Timezones.php | 20 +++++++++---------- src/update/Updater.php | 4 ++-- tests/CountriesTest.php | 8 ++++---- update.php | 2 +- 14 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/package/Countries.php b/src/package/Countries.php index 54df7619..1403cd92 100644 --- a/src/package/Countries.php +++ b/src/package/Countries.php @@ -3,10 +3,10 @@ namespace PragmaRX\Countries\Package; use PragmaRX\Countries\Package\Data\Repository; -use PragmaRX\Countries\Package\Services\Helper; -use PragmaRX\Countries\Package\Services\Hydrator; use PragmaRX\Countries\Package\Services\Cache\Service as Cache; use PragmaRX\Countries\Package\Services\Countries as CountriesService; +use PragmaRX\Countries\Package\Services\Helper; +use PragmaRX\Countries\Package\Services\Hydrator; class Countries { diff --git a/src/package/Data/Repository.php b/src/package/Data/Repository.php index 7759a076..ff0c82cd 100644 --- a/src/package/Data/Repository.php +++ b/src/package/Data/Repository.php @@ -3,10 +3,10 @@ namespace PragmaRX\Countries\Package\Data; use IlluminateAgnostic\Str\Support\Str; +use PragmaRX\Countries\Package\Services\Cache\Service as Cache; use PragmaRX\Countries\Package\Services\Helper; use PragmaRX\Countries\Package\Services\Hydrator; use Psr\SimpleCache\CacheInterface as CacheContract; -use PragmaRX\Countries\Package\Services\Cache\Service as Cache; class Repository { diff --git a/src/package/Services/Cache/Managers/Nette.php b/src/package/Services/Cache/Managers/Nette.php index 2be704ce..82affa68 100644 --- a/src/package/Services/Cache/Managers/Nette.php +++ b/src/package/Services/Cache/Managers/Nette.php @@ -3,10 +3,10 @@ namespace PragmaRX\Countries\Package\Services\Cache\Managers; use Closure; -use Psr\SimpleCache\CacheInterface; use Nette\Caching\Cache as NetteCache; use Nette\Caching\Storages\FileStorage; use PragmaRX\Countries\Package\Services\Config; +use Psr\SimpleCache\CacheInterface; class Nette implements CacheInterface { diff --git a/src/package/Services/Cache/Service.php b/src/package/Services/Cache/Service.php index b3bd10d0..a6d75861 100644 --- a/src/package/Services/Cache/Service.php +++ b/src/package/Services/Cache/Service.php @@ -3,9 +3,9 @@ namespace PragmaRX\Countries\Package\Services\Cache; use Closure; -use Psr\SimpleCache\CacheInterface; -use PragmaRX\Countries\Package\Services\Config; use PragmaRX\Countries\Package\Services\Cache\Managers\Nette as NetteManager; +use PragmaRX\Countries\Package\Services\Config; +use Psr\SimpleCache\CacheInterface; class Service implements CacheInterface { diff --git a/src/package/Services/Countries.php b/src/package/Services/Countries.php index 17e40023..50d0a5fd 100644 --- a/src/package/Services/Countries.php +++ b/src/package/Services/Countries.php @@ -2,12 +2,12 @@ namespace PragmaRX\Countries\Package\Services; -use PragmaRX\Countries\Update\Updater; use IlluminateAgnostic\Str\Support\Str; -use PragmaRX\Countries\Package\Support\Base; use PragmaRX\Coollection\Package\Coollection; use PragmaRX\Countries\Package\Data\Repository; use PragmaRX\Countries\Package\Services\Cache\Service as Cache; +use PragmaRX\Countries\Package\Support\Base; +use PragmaRX\Countries\Update\Updater; class Countries extends Base { diff --git a/src/update/Countries.php b/src/update/Countries.php index de00fa12..f7c2cf27 100644 --- a/src/update/Countries.php +++ b/src/update/Countries.php @@ -2,10 +2,10 @@ namespace PragmaRX\Countries\Update; -use PragmaRX\Countries\Package\Support\Base; -use PragmaRX\Countries\Package\Services\Config; use PragmaRX\Countries\Package\Countries as CountriesService; use PragmaRX\Countries\Package\Services\Cache\Service as Cache; +use PragmaRX\Countries\Package\Services\Config; +use PragmaRX\Countries\Package\Support\Base; class Countries extends Base { diff --git a/src/update/Helper.php b/src/update/Helper.php index 5a190dbb..1856a2d9 100644 --- a/src/update/Helper.php +++ b/src/update/Helper.php @@ -3,13 +3,13 @@ namespace PragmaRX\Countries\Update; use Exception; -use ReflectionClass; -use ShapeFile\ShapeFile; -use RecursiveIteratorIterator; -use RecursiveDirectoryIterator; use IlluminateAgnostic\Str\Support\Str; use PragmaRX\Countries\Package\Services\Command; use PragmaRX\Countries\Package\Services\Helper as ServiceHelper; +use RecursiveDirectoryIterator; +use RecursiveIteratorIterator; +use ReflectionClass; +use ShapeFile\ShapeFile; class Helper { diff --git a/src/update/Mledoze.php b/src/update/Mledoze.php index 5d3cf073..325b3bef 100644 --- a/src/update/Mledoze.php +++ b/src/update/Mledoze.php @@ -2,8 +2,8 @@ namespace PragmaRX\Countries\Update; -use PragmaRX\Countries\Package\Support\Base; use PragmaRX\Coollection\Package\Coollection; +use PragmaRX\Countries\Package\Support\Base; class Mledoze extends Base { diff --git a/src/update/Nationality.php b/src/update/Nationality.php index ba636b73..5e6bdb83 100644 --- a/src/update/Nationality.php +++ b/src/update/Nationality.php @@ -2,8 +2,8 @@ namespace PragmaRX\Countries\Update; -use PragmaRX\Countries\Package\Support\Base; use PragmaRX\Coollection\Package\Coollection; +use PragmaRX\Countries\Package\Support\Base; class Nationality extends Base { diff --git a/src/update/Rinvex.php b/src/update/Rinvex.php index d8f1dc81..9b408197 100644 --- a/src/update/Rinvex.php +++ b/src/update/Rinvex.php @@ -3,8 +3,8 @@ namespace PragmaRX\Countries\Update; use Exception; -use PragmaRX\Countries\Package\Support\Base; use PragmaRX\Coollection\Package\Coollection; +use PragmaRX\Countries\Package\Support\Base; class Rinvex extends Base { @@ -49,7 +49,7 @@ public function fillRinvexFields($natural) { $mergeable = [ 'calling_code' => 'dialling', -// 'borders' => 'geo', + // 'borders' => 'geo', 'area' => 'geo', 'continent' => 'geo', 'landlocked' => 'geo', diff --git a/src/update/Timezones.php b/src/update/Timezones.php index 0485f0de..5ca83e4c 100644 --- a/src/update/Timezones.php +++ b/src/update/Timezones.php @@ -3,10 +3,10 @@ namespace PragmaRX\Countries\Update; use IlluminateAgnostic\Str\Support\Str; -use PragmaRX\Countries\Package\Support\Base; use PragmaRX\Coollection\Package\Coollection; -use PragmaRX\Countries\Package\Services\Config; use PragmaRX\Countries\Package\Services\Cache\Service as Cache; +use PragmaRX\Countries\Package\Services\Config; +use PragmaRX\Countries\Package\Support\Base; class Timezones extends Base { @@ -116,9 +116,9 @@ function () use ($timezones) { }) ->mapWithKeys(function ($item, $cca2) { $fields = [ - ['cca2', 'cca2'], - ['name.common', 'name'], - ['name.official', 'name'], + ['cca2', 'cca2'], + ['name.common', 'name'], + ['name.official', 'name'], ]; [$country] = $this->updater->findByFields($this->updater->getCountries(), $item, $fields, 'cca2'); @@ -128,11 +128,11 @@ function () use ($timezones) { } return [ - $country->cca3 => [ - 'cca2' => $country->cca2, - 'cca3' => $country->cca3, - 'name' => $item['name'], - ], + $country->cca3 => [ + 'cca2' => $country->cca2, + 'cca3' => $country->cca3, + 'name' => $item['name'], + ], ]; })->map(function ($country) use ($zones, $abbreviations) { $country['timezones'] = $zones->where('country_code', $country['cca2'])->mapWithKeys(function ($zone) use ($abbreviations, $country) { diff --git a/src/update/Updater.php b/src/update/Updater.php index 64b7a01e..85500769 100644 --- a/src/update/Updater.php +++ b/src/update/Updater.php @@ -3,12 +3,12 @@ namespace PragmaRX\Countries\Update; use Closure; -use PragmaRX\Countries\Package\Support\Base; use PragmaRX\Coollection\Package\Coollection; use PragmaRX\Countries\Package\Contracts\Config; -use PragmaRX\Countries\Package\Services\Command; use PragmaRX\Countries\Package\Services\Cache\Service as Cache; +use PragmaRX\Countries\Package\Services\Command; use PragmaRX\Countries\Package\Services\Config as ConfigService; +use PragmaRX\Countries\Package\Support\Base; /** * @codeCoverageIgnore diff --git a/tests/CountriesTest.php b/tests/CountriesTest.php index 216415eb..0a16e18c 100644 --- a/tests/CountriesTest.php +++ b/tests/CountriesTest.php @@ -2,12 +2,12 @@ namespace PragmaRX\Countries\Tests\Service; -use PragmaRX\Countries\Update\Helper; -use PragmaRX\Countries\Update\Updater; -use PragmaRX\Countries\Package\Countries; -use PragmaRX\Coollection\Package\Coollection; use PHPUnit\Framework\TestCase as PHPUnitTestCase; +use PragmaRX\Coollection\Package\Coollection; +use PragmaRX\Countries\Package\Countries; use PragmaRX\Countries\Update\Config as ServiceConfig; +use PragmaRX\Countries\Update\Helper; +use PragmaRX\Countries\Update\Updater; class CountriesTest extends PHPUnitTestCase { diff --git a/update.php b/update.php index 75bad6bd..04a1640c 100644 --- a/update.php +++ b/update.php @@ -1,8 +1,8 @@