diff --git a/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php b/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php index bb38871019d2..aa93dfef0fb5 100644 --- a/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php +++ b/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php @@ -79,7 +79,7 @@ protected function doDelete(array $ids) /** * {@inheritdoc} */ - protected function doSave(array $values, $lifetime) + protected function doSave(array $values, ?int $lifetime) { return $this->pool->setMultiple($values, 0 === $lifetime ? null : $lifetime); } diff --git a/src/Symfony/Component/Cache/Traits/AbstractTrait.php b/src/Symfony/Component/Cache/Traits/AbstractTrait.php index 5876c1c393e8..8006855c5be2 100644 --- a/src/Symfony/Component/Cache/Traits/AbstractTrait.php +++ b/src/Symfony/Component/Cache/Traits/AbstractTrait.php @@ -78,7 +78,7 @@ abstract protected function doDelete(array $ids); * * @return array|bool The identifiers that failed to be cached or a boolean stating if caching succeeded or not */ - abstract protected function doSave(array $values, $lifetime); + abstract protected function doSave(array $values, ?int $lifetime); /** * {@inheritdoc} diff --git a/src/Symfony/Component/Cache/Traits/ApcuTrait.php b/src/Symfony/Component/Cache/Traits/ApcuTrait.php index f681c0596f94..4e1acc16274a 100644 --- a/src/Symfony/Component/Cache/Traits/ApcuTrait.php +++ b/src/Symfony/Component/Cache/Traits/ApcuTrait.php @@ -101,7 +101,7 @@ protected function doDelete(array $ids) /** * {@inheritdoc} */ - protected function doSave(array $values, $lifetime) + protected function doSave(array $values, ?int $lifetime) { try { if (false === $failures = apcu_store($values, null, $lifetime)) { diff --git a/src/Symfony/Component/Cache/Traits/DoctrineTrait.php b/src/Symfony/Component/Cache/Traits/DoctrineTrait.php index c87ecabafc80..f795e67868e6 100644 --- a/src/Symfony/Component/Cache/Traits/DoctrineTrait.php +++ b/src/Symfony/Component/Cache/Traits/DoctrineTrait.php @@ -91,7 +91,7 @@ protected function doDelete(array $ids) /** * {@inheritdoc} */ - protected function doSave(array $values, $lifetime) + protected function doSave(array $values, ?int $lifetime) { return $this->provider->saveMultiple($values, $lifetime); } diff --git a/src/Symfony/Component/Cache/Traits/FilesystemTrait.php b/src/Symfony/Component/Cache/Traits/FilesystemTrait.php index acf3ea0b9813..fe8ab2bda3e5 100644 --- a/src/Symfony/Component/Cache/Traits/FilesystemTrait.php +++ b/src/Symfony/Component/Cache/Traits/FilesystemTrait.php @@ -91,7 +91,7 @@ protected function doHave($id) /** * {@inheritdoc} */ - protected function doSave(array $values, $lifetime) + protected function doSave(array $values, ?int $lifetime) { $expiresAt = $lifetime ? (time() + $lifetime) : 0; $values = $this->marshaller->marshall($values, $failed); diff --git a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php index ca26f7e4ff7f..89abe35d6ad1 100644 --- a/src/Symfony/Component/Cache/Traits/MemcachedTrait.php +++ b/src/Symfony/Component/Cache/Traits/MemcachedTrait.php @@ -223,7 +223,7 @@ public static function createConnection($servers, array $options = []) /** * {@inheritdoc} */ - protected function doSave(array $values, $lifetime) + protected function doSave(array $values, ?int $lifetime) { if (!$values = $this->marshaller->marshall($values, $failed)) { return $failed; diff --git a/src/Symfony/Component/Cache/Traits/PdoTrait.php b/src/Symfony/Component/Cache/Traits/PdoTrait.php index 9b03f1cd2c08..5970ec430393 100644 --- a/src/Symfony/Component/Cache/Traits/PdoTrait.php +++ b/src/Symfony/Component/Cache/Traits/PdoTrait.php @@ -275,7 +275,7 @@ protected function doDelete(array $ids) /** * {@inheritdoc} */ - protected function doSave(array $values, $lifetime) + protected function doSave(array $values, ?int $lifetime) { if (!$values = $this->marshaller->marshall($values, $failed)) { return $failed; diff --git a/src/Symfony/Component/Cache/Traits/PhpFilesTrait.php b/src/Symfony/Component/Cache/Traits/PhpFilesTrait.php index 6f8c45ee513b..567bea1d1b49 100644 --- a/src/Symfony/Component/Cache/Traits/PhpFilesTrait.php +++ b/src/Symfony/Component/Cache/Traits/PhpFilesTrait.php @@ -194,7 +194,7 @@ protected function doHave($id) /** * {@inheritdoc} */ - protected function doSave(array $values, $lifetime) + protected function doSave(array $values, ?int $lifetime) { $ok = true; $expiry = $lifetime ? time() + $lifetime : 'PHP_INT_MAX'; diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 2288fcddf635..bd506999b6db 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -404,7 +404,7 @@ protected function doDelete(array $ids) /** * {@inheritdoc} */ - protected function doSave(array $values, $lifetime) + protected function doSave(array $values, ?int $lifetime) { if (!$values = $this->marshaller->marshall($values, $failed)) { return $failed; diff --git a/src/Symfony/Component/HttpClient/Response/CurlResponse.php b/src/Symfony/Component/HttpClient/Response/CurlResponse.php index 80709ed8a6a7..e7de360a8e41 100644 --- a/src/Symfony/Component/HttpClient/Response/CurlResponse.php +++ b/src/Symfony/Component/HttpClient/Response/CurlResponse.php @@ -15,6 +15,7 @@ use Symfony\Component\HttpClient\Chunk\FirstChunk; use Symfony\Component\HttpClient\Chunk\InformationalChunk; use Symfony\Component\HttpClient\Exception\TransportException; +use Symfony\Component\HttpClient\Internal\ClientState; use Symfony\Component\HttpClient\Internal\CurlClientState; use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; use Symfony\Contracts\HttpClient\ResponseInterface; @@ -242,8 +243,10 @@ private static function schedule(self $response, array &$runningResponses): void /** * {@inheritdoc} + * + * @param CurlClientState $multi */ - private static function perform(CurlClientState $multi, array &$responses = null): void + private static function perform(ClientState $multi, array &$responses = null): void { if (self::$performing) { if ($responses) { @@ -289,8 +292,10 @@ private static function perform(CurlClientState $multi, array &$responses = null /** * {@inheritdoc} + * + * @param CurlClientState $multi */ - private static function select(CurlClientState $multi, float $timeout): int + private static function select(ClientState $multi, float $timeout): int { if (\PHP_VERSION_ID < 70123 || (70200 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70211)) { // workaround https://bugs.php.net/76480 diff --git a/src/Symfony/Component/HttpClient/Response/NativeResponse.php b/src/Symfony/Component/HttpClient/Response/NativeResponse.php index 6fccfbef5a6a..639957415f0d 100644 --- a/src/Symfony/Component/HttpClient/Response/NativeResponse.php +++ b/src/Symfony/Component/HttpClient/Response/NativeResponse.php @@ -14,6 +14,7 @@ use Psr\Log\LoggerInterface; use Symfony\Component\HttpClient\Chunk\FirstChunk; use Symfony\Component\HttpClient\Exception\TransportException; +use Symfony\Component\HttpClient\Internal\ClientState; use Symfony\Component\HttpClient\Internal\NativeClientState; use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; use Symfony\Contracts\HttpClient\ResponseInterface; @@ -214,8 +215,10 @@ private static function schedule(self $response, array &$runningResponses): void /** * {@inheritdoc} + * + * @param NativeClientState $multi */ - private static function perform(NativeClientState $multi, array &$responses = null): void + private static function perform(ClientState $multi, array &$responses = null): void { // List of native handles for stream_select() if (null !== $responses) { @@ -326,8 +329,10 @@ private static function perform(NativeClientState $multi, array &$responses = nu /** * {@inheritdoc} + * + * @param NativeClientState $multi */ - private static function select(NativeClientState $multi, float $timeout): int + private static function select(ClientState $multi, float $timeout): int { $_ = [];