From bd3df1717553ecc5e206ca7e25735dd5bdfcb772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Beli=C3=ABn?= Date: Fri, 21 Jul 2023 11:32:47 +0200 Subject: [PATCH] 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 --- ProviderCache.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/ProviderCache.php b/ProviderCache.php index b2de362..c9f50df 100644 --- a/ProviderCache.php +++ b/ProviderCache.php @@ -13,9 +13,9 @@ namespace Geocoder\Provider\Cache; use Geocoder\Collection; +use Geocoder\Provider\Provider; use Geocoder\Query\GeocodeQuery; use Geocoder\Query\ReverseQuery; -use Geocoder\Provider\Provider; use Psr\SimpleCache\CacheInterface; /** @@ -41,14 +41,12 @@ class ProviderCache implements Provider protected $lifetime; /** - * If true, include the real provider name into the cache key + * If true, include the real provider name into the cache key. */ private bool $separateCache; /** - * @param Provider $realProvider - * @param CacheInterface $cache - * @param int $lifetime + * @param int $lifetime */ final public function __construct(Provider $realProvider, CacheInterface $cache, int $lifetime = null, bool $separateCache = false) { @@ -58,9 +56,6 @@ final public function __construct(Provider $realProvider, CacheInterface $cache, $this->separateCache = $separateCache; } - /** - * {@inheritdoc} - */ final public function geocodeQuery(GeocodeQuery $query): Collection { $cacheKey = $this->getCacheKey($query); @@ -74,9 +69,6 @@ final public function geocodeQuery(GeocodeQuery $query): Collection return $result; } - /** - * {@inheritdoc} - */ final public function reverseQuery(ReverseQuery $query): Collection { $cacheKey = $this->getCacheKey($query); @@ -90,9 +82,6 @@ final public function reverseQuery(ReverseQuery $query): Collection return $result; } - /** - * {@inheritdoc} - */ public function getName(): string { return sprintf('%s (cache)', $this->realProvider->getName()); @@ -105,8 +94,6 @@ final public function __call($method, $args) /** * @param GeocodeQuery|ReverseQuery $query - * - * @return string */ protected function getCacheKey($query): string {