diff --git a/composer.json b/composer.json index 9146858..8f5240b 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,9 @@ "require-dev": { "atoum/atoum": "4.0.3", "atoum/stubs": "*", - "m6web/php-cs-fixer-config": "2.0.0" + "m6web/php-cs-fixer-config": "2.0.0", + "friendsofphp/php-cs-fixer": "3.34.1", + "guzzlehttp/promises": "^1" }, "autoload": { "psr-4": {"M6Web\\Bundle\\GuzzleHttpBundle\\": "src/"} diff --git a/src/Cache/InMemory.php b/src/Cache/InMemory.php index 670291b..30add3e 100644 --- a/src/Cache/InMemory.php +++ b/src/Cache/InMemory.php @@ -10,9 +10,6 @@ class InMemory implements CacheInterface protected $cache = []; protected $ttl = []; - /** - * {@inheritdoc} - */ public function has($key) { if (array_key_exists($key, $this->cache)) { @@ -25,9 +22,6 @@ public function has($key) return false; } - /** - * {@inheritdoc} - */ public function get($key) { if ($this->has($key)) { @@ -37,18 +31,12 @@ public function get($key) return null; } - /** - * {@inheritdoc} - */ public function set($key, $value, $ttl = null) { $this->cache[$key] = $value; $this->ttl[$key] = is_null($ttl) ? null : microtime(true) + $ttl; } - /** - * {@inheritdoc} - */ public function remove($key) { unset( @@ -57,9 +45,6 @@ public function remove($key) ); } - /** - * {@inheritdoc} - */ public function ttl($key) { if ($this->has($key)) { diff --git a/src/DependencyInjection/M6WebGuzzleHttpExtension.php b/src/DependencyInjection/M6WebGuzzleHttpExtension.php index ca1c13c..d7ff86e 100644 --- a/src/DependencyInjection/M6WebGuzzleHttpExtension.php +++ b/src/DependencyInjection/M6WebGuzzleHttpExtension.php @@ -16,9 +16,6 @@ */ class M6WebGuzzleHttpExtension extends Extension { - /** - * {@inheritdoc} - */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); diff --git a/src/Handler/CacheTrait.php b/src/Handler/CacheTrait.php index 725eaa2..aad5a17 100644 --- a/src/Handler/CacheTrait.php +++ b/src/Handler/CacheTrait.php @@ -106,8 +106,6 @@ protected function getCacheTtl(Response $response) * Cache response * * @param int $ttl - * - * @return mixed */ protected function cacheResponse(RequestInterface $request, Response $response, $ttl = null) { diff --git a/src/Handler/CurlFactory.php b/src/Handler/CurlFactory.php index 1734d6b..ba8bb5f 100644 --- a/src/Handler/CurlFactory.php +++ b/src/Handler/CurlFactory.php @@ -11,9 +11,6 @@ */ class CurlFactory extends GuzzleCurlFactory { - /** - * {@inheritdoc} - */ public function release(EasyHandle $easy): void { if (!is_null($easy->response)) { diff --git a/src/M6WebGuzzleHttpBundle.php b/src/M6WebGuzzleHttpBundle.php index d652444..36cfcf9 100644 --- a/src/M6WebGuzzleHttpBundle.php +++ b/src/M6WebGuzzleHttpBundle.php @@ -10,17 +10,11 @@ class M6WebGuzzleHttpBundle extends Bundle { - /** - * {@inheritdoc} - */ public function getContainerExtension(): ?ExtensionInterface { return new DependencyInjection\M6WebGuzzleHttpExtension(); } - /** - * {@inheritdoc} - */ public function build(ContainerBuilder $container) { parent::build($container); diff --git a/src/Middleware/EventDispatcherMiddleware.php b/src/Middleware/EventDispatcherMiddleware.php index b2bf716..ba96b9b 100644 --- a/src/Middleware/EventDispatcherMiddleware.php +++ b/src/Middleware/EventDispatcherMiddleware.php @@ -93,8 +93,6 @@ protected function sendEvent(RequestInterface $request, ResponseInterface $respo /** * Dispatch event - * - * @param mixed $reason */ protected function sendErrorEvent(RequestInterface $request, $reason) {