Skip to content

Commit b8ae934

Browse files
committed
more phpunit cs
1 parent a5898c3 commit b8ae934

8 files changed

+11
-13
lines changed

.php-cs-fixer.dist.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@
6565
'increment_style' => false,
6666
'native_constant_invocation' => false,
6767
'no_useless_else' => false,
68-
'php_unit_data_provider_return_type' => false,
69-
'php_unit_data_provider_static' => false,
7068
'php_unit_strict' => false,
7169
'phpdoc_to_comment' => false,
7270
'static_lambda' => false,

tests/mutex/FlockMutexTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function () {
7373
}
7474
}
7575

76-
public function dpTimeoutableStrategies()
76+
public static function dpTimeoutableStrategies(): iterable
7777
{
7878
return [
7979
[FlockMutex::STRATEGY_PCNTL],

tests/mutex/MutexConcurrencyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function testHighContention(callable $code, callable $mutexFactory)
108108
/**
109109
* Returns test cases for testHighContention().
110110
*/
111-
public function provideHighContentionCases(): array
111+
public static function provideHighContentionCases(): iterable
112112
{
113113
$cases = array_map(function (array $mutexFactory): array {
114114
$filename = tempnam(sys_get_temp_dir(), 'php-lock-high-contention');
@@ -219,7 +219,7 @@ public function testExecutionIsSerializedWhenLocked(callable $mutexFactory)
219219
*
220220
* @return callable[][] the mutex factories
221221
*/
222-
public function provideExecutionIsSerializedWhenLockedCases()
222+
public static function provideExecutionIsSerializedWhenLockedCases(): iterable
223223
{
224224
$filename = tempnam(sys_get_temp_dir(), 'mutex-concurrency-test');
225225

tests/mutex/MutexTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function setUpBeforeClass(): void
3131
*
3232
* @return callable[][] the mutex factories
3333
*/
34-
public function provideMutexFactories()
34+
public static function provideMutexFactories(): iterable
3535
{
3636
$cases = [
3737
'NoMutex' => [function (): Mutex {

tests/mutex/PHPRedisMutexTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function testResistantToPartialClusterFailuresForReleasingLock()
210210
}));
211211
}
212212

213-
public function provideSerializersAndCompressorsCases()
213+
public static function provideSerializersAndCompressorsCases(): iterable
214214
{
215215
if (!class_exists(Redis::class)) {
216216
return [];

tests/mutex/RedisMutexTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function testTimingOut(int $count, float $timeout, float $delay)
191191
*
192192
* @return array test cases
193193
*/
194-
public function provideTimingOutCases()
194+
public static function provideTimingOutCases(): iterable
195195
{
196196
// count, timeout, delay
197197
return [
@@ -300,7 +300,7 @@ function () use (&$i, $available): bool {
300300
*
301301
* @return int[][] test cases
302302
*/
303-
public function provideMinority()
303+
public static function provideMinority(): iterable
304304
{
305305
// total count, available count
306306
return [
@@ -320,7 +320,7 @@ public function provideMinority()
320320
*
321321
* @return int[][] test cases
322322
*/
323-
public function provideMajority()
323+
public static function provideMajority(): iterable
324324
{
325325
// total count, available count
326326
return [

tests/mutex/TransactionalMutexTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testInvalidErrorMode(int $mode)
3131
/**
3232
* Returns test cases for testInvalidErrorMode().
3333
*/
34-
public function provideInvalidErrorModeCases(): array
34+
public static function provideInvalidErrorModeCases(): iterable
3535
{
3636
return [
3737
[\PDO::ERRMODE_SILENT],
@@ -147,7 +147,7 @@ public function testReplayTransaction(\Exception $exception)
147147
*
148148
* @return \Exception[][] test cases
149149
*/
150-
public function provideReplayTransactionCases()
150+
public static function provideReplayTransactionCases(): iterable
151151
{
152152
return [
153153
[new \PDOException()],

tests/util/DoubleCheckedLockingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function testCodeNotExecuted(callable $check)
110110
*
111111
* @return callable[][] the test cases
112112
*/
113-
public function provideCodeNotExecutedCases()
113+
public static function provideCodeNotExecutedCases(): iterable
114114
{
115115
$checkCounter = 0;
116116

0 commit comments

Comments
 (0)