Skip to content

Fix docs

Fix docs #277

Triggered via pull request May 6, 2024 11:38
Status Success
Total duration 58s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation / PHP 8.1-ubuntu-latest: src/MutexFactory.php#L16
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ */ abstract class MutexFactory implements MutexFactoryInterface { - public final function createAndAcquire(string $name, int $timeout = 0) : MutexInterface + public final function createAndAcquire(string $name, int $timeout = -1) : MutexInterface { $mutex = $this->create($name); if (!$mutex->acquire($timeout)) {
mutation / PHP 8.1-ubuntu-latest: src/MutexFactory.php#L16
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ */ abstract class MutexFactory implements MutexFactoryInterface { - public final function createAndAcquire(string $name, int $timeout = 0) : MutexInterface + public final function createAndAcquire(string $name, int $timeout = 1) : MutexInterface { $mutex = $this->create($name); if (!$mutex->acquire($timeout)) {
mutation / PHP 8.1-ubuntu-latest: src/RetryAcquireTrait.php#L32
Escaped Mutant for Mutator "LessThan": --- Original +++ New @@ @@ */ public function withRetryDelay(int $retryDelay) : self { - if ($retryDelay < 1) { + if ($retryDelay <= 1) { throw new InvalidArgumentException("Retry delay value must be a positive number greater than zero, \"{$retryDelay}\" is received."); } $new = clone $this;
mutation / PHP 8.1-ubuntu-latest: src/RetryAcquireTrait.php#L51
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ if ($callback()) { return true; } - usleep($this->retryDelay * 1000); + usleep($this->retryDelay * 1001); } while (microtime(true) - $start < $timeout); return false; } }
mutation / PHP 8.1-ubuntu-latest: src/RetryAcquireTrait.php#L52
Escaped Mutant for Mutator "LessThan": --- Original +++ New @@ @@ return true; } usleep($this->retryDelay * 1000); - } while (microtime(true) - $start < $timeout); + } while (microtime(true) - $start <= $timeout); return false; } }
mutation / PHP 8.1-ubuntu-latest: src/SimpleMutex.php#L47
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ * * @return bool Whether a lock is acquired. */ - public function acquire(string $name, int $timeout = 0) : bool + public function acquire(string $name, int $timeout = -1) : bool { $mutex = $this->mutexFactory->create($name); if ($mutex->acquire($timeout)) {
mutation / PHP 8.1-ubuntu-latest: src/SimpleMutex.php#L47
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ * * @return bool Whether a lock is acquired. */ - public function acquire(string $name, int $timeout = 0) : bool + public function acquire(string $name, int $timeout = 1) : bool { $mutex = $this->mutexFactory->create($name); if ($mutex->acquire($timeout)) {
mutation / PHP 8.1-ubuntu-latest: src/Synchronizer.php#L48
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ * * @return mixed The result of the PHP callable execution. */ - public function execute(string $name, callable $callback, int $timeout = 0) + public function execute(string $name, callable $callback, int $timeout = -1) { $mutex = $this->mutexFactory->createAndAcquire($name, $timeout); set_error_handler(static function (int $severity, string $message, string $file, int $line) : bool {
mutation / PHP 8.1-ubuntu-latest: src/Synchronizer.php#L48
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ * * @return mixed The result of the PHP callable execution. */ - public function execute(string $name, callable $callback, int $timeout = 0) + public function execute(string $name, callable $callback, int $timeout = 1) { $mutex = $this->mutexFactory->createAndAcquire($name, $timeout); set_error_handler(static function (int $severity, string $message, string $file, int $line) : bool {
mutation / PHP 8.1-ubuntu-latest: src/Synchronizer.php#L53
Escaped Mutant for Mutator "BitwiseAnd": --- Original +++ New @@ @@ { $mutex = $this->mutexFactory->createAndAcquire($name, $timeout); set_error_handler(static function (int $severity, string $message, string $file, int $line) : bool { - if (!(error_reporting() & $severity)) { + if (!(error_reporting() | $severity)) { // This error code is not included in error_reporting. return true; }