diff --git a/src/Symfony/Component/Lock/Lock.php b/src/Symfony/Component/Lock/Lock.php index f7da528d1c777..e9eee18e3797d 100644 --- a/src/Symfony/Component/Lock/Lock.php +++ b/src/Symfony/Component/Lock/Lock.php @@ -114,7 +114,7 @@ public function acquire($blocking = false): ?bool /** * {@inheritdoc} */ - public function refresh($ttl = null) + public function refresh(float $ttl = null) { if (null === $ttl) { $ttl = $this->ttl; diff --git a/src/Symfony/Component/Lock/PersistingStoreInterface.php b/src/Symfony/Component/Lock/PersistingStoreInterface.php index f3095db0c006f..03309a90b5662 100644 --- a/src/Symfony/Component/Lock/PersistingStoreInterface.php +++ b/src/Symfony/Component/Lock/PersistingStoreInterface.php @@ -49,5 +49,5 @@ public function exists(Key $key); * * @throws LockConflictedException */ - public function putOffExpiration(Key $key, $ttl); + public function putOffExpiration(Key $key, float $ttl); } diff --git a/src/Symfony/Component/Lock/Store/CombinedStore.php b/src/Symfony/Component/Lock/Store/CombinedStore.php index 49d40566a4859..4dee0fa269113 100644 --- a/src/Symfony/Component/Lock/Store/CombinedStore.php +++ b/src/Symfony/Component/Lock/Store/CombinedStore.php @@ -106,7 +106,7 @@ public function waitAndSave(Key $key) /** * {@inheritdoc} */ - public function putOffExpiration(Key $key, $ttl) + public function putOffExpiration(Key $key, float $ttl) { $successCount = 0; $failureCount = 0; diff --git a/src/Symfony/Component/Lock/Store/FlockStore.php b/src/Symfony/Component/Lock/Store/FlockStore.php index d1c303c534e8e..b2a8bc20d502e 100644 --- a/src/Symfony/Component/Lock/Store/FlockStore.php +++ b/src/Symfony/Component/Lock/Store/FlockStore.php @@ -106,7 +106,7 @@ private function lock(Key $key, bool $blocking) /** * {@inheritdoc} */ - public function putOffExpiration(Key $key, $ttl) + public function putOffExpiration(Key $key, float $ttl) { // do nothing, the flock locks forever. } diff --git a/src/Symfony/Component/Lock/Store/MemcachedStore.php b/src/Symfony/Component/Lock/Store/MemcachedStore.php index d16ca154509ec..505e6fa5ea5c3 100644 --- a/src/Symfony/Component/Lock/Store/MemcachedStore.php +++ b/src/Symfony/Component/Lock/Store/MemcachedStore.php @@ -83,7 +83,7 @@ public function waitAndSave(Key $key) /** * {@inheritdoc} */ - public function putOffExpiration(Key $key, $ttl) + public function putOffExpiration(Key $key, float $ttl) { if ($ttl < 1) { throw new InvalidTtlException(sprintf('%s() expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl)); diff --git a/src/Symfony/Component/Lock/Store/PdoStore.php b/src/Symfony/Component/Lock/Store/PdoStore.php index a35e142061c3f..bf2d6bc6ff489 100644 --- a/src/Symfony/Component/Lock/Store/PdoStore.php +++ b/src/Symfony/Component/Lock/Store/PdoStore.php @@ -152,7 +152,7 @@ public function waitAndSave(Key $key) /** * {@inheritdoc} */ - public function putOffExpiration(Key $key, $ttl) + public function putOffExpiration(Key $key, float $ttl) { if ($ttl < 1) { throw new InvalidTtlException(sprintf('%s() expects a TTL greater or equals to 1 second. Got %s.', __METHOD__, $ttl)); diff --git a/src/Symfony/Component/Lock/Store/RedisStore.php b/src/Symfony/Component/Lock/Store/RedisStore.php index c1aecbfcd2dc6..79403a138b384 100644 --- a/src/Symfony/Component/Lock/Store/RedisStore.php +++ b/src/Symfony/Component/Lock/Store/RedisStore.php @@ -86,7 +86,7 @@ public function waitAndSave(Key $key) /** * {@inheritdoc} */ - public function putOffExpiration(Key $key, $ttl) + public function putOffExpiration(Key $key, float $ttl) { $script = ' if redis.call("GET", KEYS[1]) == ARGV[1] then diff --git a/src/Symfony/Component/Lock/Store/RetryTillSaveStore.php b/src/Symfony/Component/Lock/Store/RetryTillSaveStore.php index 18890536f0576..79e28ce745388 100644 --- a/src/Symfony/Component/Lock/Store/RetryTillSaveStore.php +++ b/src/Symfony/Component/Lock/Store/RetryTillSaveStore.php @@ -80,7 +80,7 @@ public function waitAndSave(Key $key) /** * {@inheritdoc} */ - public function putOffExpiration(Key $key, $ttl) + public function putOffExpiration(Key $key, float $ttl) { $this->decorated->putOffExpiration($key, $ttl); } diff --git a/src/Symfony/Component/Lock/Store/SemaphoreStore.php b/src/Symfony/Component/Lock/Store/SemaphoreStore.php index 829da3bfc661f..328380280b3b6 100644 --- a/src/Symfony/Component/Lock/Store/SemaphoreStore.php +++ b/src/Symfony/Component/Lock/Store/SemaphoreStore.php @@ -100,7 +100,7 @@ public function delete(Key $key) /** * {@inheritdoc} */ - public function putOffExpiration(Key $key, $ttl) + public function putOffExpiration(Key $key, float $ttl) { // do nothing, the semaphore locks forever. } diff --git a/src/Symfony/Component/Lock/Store/ZookeeperStore.php b/src/Symfony/Component/Lock/Store/ZookeeperStore.php index 681416c905afc..0db550c469763 100644 --- a/src/Symfony/Component/Lock/Store/ZookeeperStore.php +++ b/src/Symfony/Component/Lock/Store/ZookeeperStore.php @@ -96,7 +96,7 @@ public function waitAndSave(Key $key) /** * {@inheritdoc} */ - public function putOffExpiration(Key $key, $ttl) + public function putOffExpiration(Key $key, float $ttl) { // do nothing, zookeeper locks forever. } diff --git a/src/Symfony/Component/Lock/Strategy/ConsensusStrategy.php b/src/Symfony/Component/Lock/Strategy/ConsensusStrategy.php index 047820a409f1d..1338b10dd63f4 100644 --- a/src/Symfony/Component/Lock/Strategy/ConsensusStrategy.php +++ b/src/Symfony/Component/Lock/Strategy/ConsensusStrategy.php @@ -21,7 +21,7 @@ class ConsensusStrategy implements StrategyInterface /** * {@inheritdoc} */ - public function isMet($numberOfSuccess, $numberOfItems) + public function isMet(int $numberOfSuccess, int $numberOfItems) { return $numberOfSuccess > ($numberOfItems / 2); } @@ -29,7 +29,7 @@ public function isMet($numberOfSuccess, $numberOfItems) /** * {@inheritdoc} */ - public function canBeMet($numberOfFailure, $numberOfItems) + public function canBeMet(int $numberOfFailure, int $numberOfItems) { return $numberOfFailure < ($numberOfItems / 2); } diff --git a/src/Symfony/Component/Lock/Strategy/StrategyInterface.php b/src/Symfony/Component/Lock/Strategy/StrategyInterface.php index beaa7280a2d49..0b8aa3b30f005 100644 --- a/src/Symfony/Component/Lock/Strategy/StrategyInterface.php +++ b/src/Symfony/Component/Lock/Strategy/StrategyInterface.php @@ -26,7 +26,7 @@ interface StrategyInterface * * @return bool */ - public function isMet($numberOfSuccess, $numberOfItems); + public function isMet(int $numberOfSuccess, int $numberOfItems); /** * Returns whether or not the quorum *could* be met. @@ -39,5 +39,5 @@ public function isMet($numberOfSuccess, $numberOfItems); * * @return bool */ - public function canBeMet($numberOfFailure, $numberOfItems); + public function canBeMet(int $numberOfFailure, int $numberOfItems); } diff --git a/src/Symfony/Component/Lock/Strategy/UnanimousStrategy.php b/src/Symfony/Component/Lock/Strategy/UnanimousStrategy.php index 27404f3e9f052..63f9d1b4a1b2a 100644 --- a/src/Symfony/Component/Lock/Strategy/UnanimousStrategy.php +++ b/src/Symfony/Component/Lock/Strategy/UnanimousStrategy.php @@ -21,7 +21,7 @@ class UnanimousStrategy implements StrategyInterface /** * {@inheritdoc} */ - public function isMet($numberOfSuccess, $numberOfItems) + public function isMet(int $numberOfSuccess, int $numberOfItems) { return $numberOfSuccess === $numberOfItems; } @@ -29,7 +29,7 @@ public function isMet($numberOfSuccess, $numberOfItems) /** * {@inheritdoc} */ - public function canBeMet($numberOfFailure, $numberOfItems) + public function canBeMet(int $numberOfFailure, int $numberOfItems) { return 0 === $numberOfFailure; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy