Skip to content

Commit

Permalink
almost all
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Dec 3, 2024
1 parent adf73e7 commit 304349c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/mutex/MutexConcurrencyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private function getPDO(string $dsn, string $user, string $password): \PDO
* @param int $concurrency the amount of forks
* @param callable $code the code for the fork
*/
private function fork(int $concurrency, callable $code)
private function fork(int $concurrency, callable $code): void
{
$pool = Pool::create();

Expand Down
13 changes: 11 additions & 2 deletions tests/mutex/PHPRedisMutexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public function close(): bool
return $res;
}

/**
* @return \Redis|string|bool
*/
private function _set($key, $value, $timeout = 0)

Check failure on line 96 in tests/mutex/PHPRedisMutexTest.php

View workflow job for this annotation

GitHub Actions / Smoke (latest, StaticAnalysis)

Method Redis@anonymous/tests/mutex/PHPRedisMutexTest.php:78::_set() has parameter $key with no type specified.

Check failure on line 96 in tests/mutex/PHPRedisMutexTest.php

View workflow job for this annotation

GitHub Actions / Smoke (latest, StaticAnalysis)

Method Redis@anonymous/tests/mutex/PHPRedisMutexTest.php:78::_set() has parameter $timeout with no type specified.

Check failure on line 96 in tests/mutex/PHPRedisMutexTest.php

View workflow job for this annotation

GitHub Actions / Smoke (latest, StaticAnalysis)

Method Redis@anonymous/tests/mutex/PHPRedisMutexTest.php:78::_set() has parameter $value with no type specified.
{
if ($this->is_closed) {
Expand All @@ -99,6 +102,9 @@ private function _set($key, $value, $timeout = 0)
return parent::set($key, $value, $timeout);
}

/**
* @return mixed
*/
private function _eval($script, $args = [], $numKeys = 0)

Check failure on line 108 in tests/mutex/PHPRedisMutexTest.php

View workflow job for this annotation

GitHub Actions / Smoke (latest, StaticAnalysis)

Method Redis@anonymous/tests/mutex/PHPRedisMutexTest.php:78::_eval() has parameter $args with no type specified.

Check failure on line 108 in tests/mutex/PHPRedisMutexTest.php

View workflow job for this annotation

GitHub Actions / Smoke (latest, StaticAnalysis)

Method Redis@anonymous/tests/mutex/PHPRedisMutexTest.php:78::_eval() has parameter $numKeys with no type specified.

Check failure on line 108 in tests/mutex/PHPRedisMutexTest.php

View workflow job for this annotation

GitHub Actions / Smoke (latest, StaticAnalysis)

Method Redis@anonymous/tests/mutex/PHPRedisMutexTest.php:78::_eval() has parameter $script with no type specified.
{
if ($this->is_closed) {
Expand Down Expand Up @@ -126,7 +132,7 @@ private function _eval($script, $args = [], $numKeys = 0)
$this->mutex = new PHPRedisMutex($this->connections, 'test');
}

private function closeMajorityConnections()
private function closeMajorityConnections(): void
{
$numberToClose = (int) ceil(count($this->connections) / 2);

Expand All @@ -135,7 +141,7 @@ private function closeMajorityConnections()
}
}

private function closeMinorityConnections()
private function closeMinorityConnections(): void
{
if (count($this->connections) === 1) {
self::markTestSkipped('Cannot test this with only a single Redis server');
Expand Down Expand Up @@ -176,6 +182,9 @@ public function testEvalScriptFails(): void
}

/**
* @param \Redis::SERIALIZER_* $serializer
* @param \Redis::COMPRESSION_* $compressor
*
* @dataProvider provideSerializersAndCompressorsCases
*/
public function testSerializersAndCompressors($serializer, $compressor): void
Expand Down

0 comments on commit 304349c

Please sign in to comment.