From 952fd02c06c1fd633ed4f58cabe0906bc70f5e52 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Wed, 14 Apr 2021 06:00:12 +0000 Subject: [PATCH] Apply fixes from StyleCI [ci skip] [skip ci] --- src/Cache/Generator/CacheKeyGenerator.php | 2 -- src/Cache/Listener/AddHeaderCacheListener.php | 2 -- src/Cache/Listener/CacheListener.php | 2 -- src/CachePlugin.php | 24 +------------------ 4 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/Cache/Generator/CacheKeyGenerator.php b/src/Cache/Generator/CacheKeyGenerator.php index d351e57..3010256 100644 --- a/src/Cache/Generator/CacheKeyGenerator.php +++ b/src/Cache/Generator/CacheKeyGenerator.php @@ -14,8 +14,6 @@ interface CacheKeyGenerator /** * Generate a cache key from a Request. * - * @param RequestInterface $request - * * @return string */ public function generate(RequestInterface $request); diff --git a/src/Cache/Listener/AddHeaderCacheListener.php b/src/Cache/Listener/AddHeaderCacheListener.php index 8d51229..282a8a3 100644 --- a/src/Cache/Listener/AddHeaderCacheListener.php +++ b/src/Cache/Listener/AddHeaderCacheListener.php @@ -27,8 +27,6 @@ public function __construct($headerName = 'X-Cache') /** * Called before the cache plugin returns the response, with information on whether that response came from cache. * - * @param RequestInterface $request - * @param ResponseInterface $response * @param bool $fromCache Whether the `$response` was from the cache or not. * Note that checking `$cacheItem->isHit()` is not sufficent to determine this. * @param CacheItemInterface|null $cacheItem diff --git a/src/Cache/Listener/CacheListener.php b/src/Cache/Listener/CacheListener.php index 5e15cab..01b953c 100644 --- a/src/Cache/Listener/CacheListener.php +++ b/src/Cache/Listener/CacheListener.php @@ -18,8 +18,6 @@ interface CacheListener /** * Called before the cache plugin returns the response, with information on whether that response came from cache. * - * @param RequestInterface $request - * @param ResponseInterface $response * @param bool $fromCache Whether the `$response` was from the cache or not. * Note that checking `$cacheItem->isHit()` is not sufficent to determine this. * @param CacheItemInterface|null $cacheItem diff --git a/src/CachePlugin.php b/src/CachePlugin.php index 34d009c..69fd523 100644 --- a/src/CachePlugin.php +++ b/src/CachePlugin.php @@ -51,7 +51,6 @@ final class CachePlugin implements Plugin private $noCacheFlags = ['no-cache', 'private', 'no-store']; /** - * @param CacheItemPoolInterface $pool * @param StreamFactory|StreamFactoryInterface $streamFactory * @param array $config { * @@ -96,7 +95,6 @@ public function __construct(CacheItemPoolInterface $pool, $streamFactory, array * This method will setup the cachePlugin in client cache mode. When using the client cache mode the plugin will * cache responses with `private` cache directive. * - * @param CacheItemPoolInterface $pool * @param StreamFactory|StreamFactoryInterface $streamFactory * @param array $config For all possible config options see the constructor docs * @@ -120,7 +118,6 @@ public static function clientCache(CacheItemPoolInterface $pool, $streamFactory, * This method will setup the cachePlugin in server cache mode. This is the default caching behavior it refuses to * cache responses with the `private`or `no-cache` directives. * - * @param CacheItemPoolInterface $pool * @param StreamFactory|StreamFactoryInterface $streamFactory * @param array $config For all possible config options see the constructor docs * @@ -251,8 +248,6 @@ private function calculateResponseExpiresAt($maxAge) /** * Verify that we can cache this response. * - * @param ResponseInterface $response - * * @return bool */ protected function isCacheable(ResponseInterface $response) @@ -274,8 +269,6 @@ protected function isCacheable(ResponseInterface $response) /** * Verify that we can cache this request. * - * @param RequestInterface $request - * * @return bool */ private function isCacheableRequest(RequestInterface $request) @@ -293,8 +286,7 @@ private function isCacheableRequest(RequestInterface $request) /** * Get the value of a parameter in the cache control header. * - * @param ResponseInterface $response - * @param string $name The field of Cache-Control to fetch + * @param string $name The field of Cache-Control to fetch * * @return bool|string The value of the directive, true if directive without value, false if directive not present */ @@ -316,8 +308,6 @@ private function getCacheControlDirective(ResponseInterface $response, $name) } /** - * @param RequestInterface $request - * * @return string */ private function createCacheKey(RequestInterface $request) @@ -330,8 +320,6 @@ private function createCacheKey(RequestInterface $request) /** * Get a ttl in seconds. It could return null if we do not respect cache headers and got no defaultTtl. * - * @param ResponseInterface $response - * * @return int|null */ private function getMaxAge(ResponseInterface $response) @@ -362,8 +350,6 @@ private function getMaxAge(ResponseInterface $response) /** * Configure an options resolver. - * - * @param OptionsResolver $resolver */ private function configureOptions(OptionsResolver $resolver) { @@ -413,8 +399,6 @@ private function configureOptions(OptionsResolver $resolver) } /** - * @param CacheItemInterface $cacheItem - * * @return ResponseInterface */ private function createResponseFromCacheItem(CacheItemInterface $cacheItem) @@ -439,8 +423,6 @@ private function createResponseFromCacheItem(CacheItemInterface $cacheItem) /** * Get the value of the "If-Modified-Since" header. * - * @param CacheItemInterface $cacheItem - * * @return string|null */ private function getModifiedSinceHeaderValue(CacheItemInterface $cacheItem) @@ -460,8 +442,6 @@ private function getModifiedSinceHeaderValue(CacheItemInterface $cacheItem) /** * Get the ETag from the cached response. * - * @param CacheItemInterface $cacheItem - * * @return string|null */ private function getETag(CacheItemInterface $cacheItem) @@ -482,8 +462,6 @@ private function getETag(CacheItemInterface $cacheItem) /** * Call the cache listeners, if they are set. * - * @param RequestInterface $request - * @param ResponseInterface $response * @param bool $cacheHit * @param CacheItemInterface|null $cacheItem *