8000 [Lock] Add some missing return types in tests · symfony/symfony@6a7cc56 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6a7cc56

Browse files
[Lock] Add some missing return types in tests
1 parent c2ac73c commit 6a7cc56

10 files changed

+9
-19
lines changed

src/Symfony/Component/Cache/Traits/AbstractAdapterTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ trait AbstractAdapterTrait
5151
* Fetches several cache items.
5252
*
5353
* @param array $ids The cache identifiers to fetch
54-
*
55-
* @return array|\Traversable
5654
*/
5755
abstract protected function doFetch(array $ids): iterable;
5856

src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ abstract class AbstractRedisStoreTestCase extends AbstractStoreTestCase
2525
{
2626
use ExpiringStoreTestTrait;
2727

28-
protected function getClockDelay()
28+
protected function getClockDelay(): int
2929
{
3030
return 250000;
3131
}

src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ trait BlockingStoreTestTrait
2222
{
2323
/**
2424
* @see AbstractStoreTestCase::getStore()
25-
*
26-
* @return PersistingStoreInterface
2725
*/
28-
abstract protected function getStore();
26+
abstract protected function getStore(): PersistingStoreInterface;
2927

3028
/**
3129
* Tests blocking locks thanks to pcntl.

src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class CombinedStoreTest extends AbstractStoreTestCase
3232
use ExpiringStoreTestTrait;
3333
use SharedLockStoreTestTrait;
3434

35-
protected function getClockDelay()
35+
protected function getClockDelay(): int
3636
{
3737
return 250000;
3838
}

src/Symfony/Component/Lock/Tests/Store/DoctrineDbalStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static function tearDownAfterClass(): void
5353
@unlink(self::$dbFile);
5454
}
5555

56-
protected function getClockDelay()
56+
protected function getClockDelay(): int
5757
{
5858
return 1000000;
5959
}

src/Symfony/Component/Lock/Tests/Store/ExpiringStoreTestTrait.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ trait ExpiringStoreTestTrait
2424
* Amount of microseconds used as a delay to test expiration. Should be
2525
* small enough not to slow the test suite too much, and high enough not to
2626
* fail because of race conditions.
27-
*
28-
* @return int
2927
*/
30-
abstract protected function getClockDelay();
28+
abstract protected function getClockDelay(): int;
3129

3230
/**
3331
* @see AbstractStoreTestCase::getStore()

src/Symfony/Component/Lock/Tests/Store/MemcachedStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static function setUpBeforeClass(): void
4444
}
4545
}
4646

47-
protected function getClockDelay()
47+
protected function getClockDelay(): int
4848
{
4949
return 1000000;
5050
}

src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static function tearDownAfterClass(): void
4242
@unlink(self::$dbFile);
4343
}
4444

45 1E0A -
protected function getClockDelay()
45+
protected function getClockDelay(): int
4646
{
4747
return 1000000;
4848
}

src/Symfony/Component/Lock/Tests/Store/SharedLockStoreTestTrait.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ trait SharedLockStoreTestTrait
2222
{
2323
/**
2424
* @see AbstractStoreTestCase::getStore()
25-
*
26-
* @return PersistingStoreInterface
2725
*/
28-
abstract protected function getStore();
26+
abstract protected function getStore(): PersistingStoreInterface;
2927

3028
public function testSharedLockReadFirst()
3129
{

src/Symfony/Component/Lock/Tests/Store/UnserializableTestTrait.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ trait UnserializableTestTrait
2222
{
2323
/**
2424
* @see AbstractStoreTestCase::getStore()
25-
*
26-
* @return PersistingStoreInterface
2725
*/
28-
abstract protected function getStore();
26+
abstract protected function getStore(): PersistingStoreInterface;
2927

3028
public function testUnserializableKey()
3129
{

0 commit comments

Comments
 (0)
0