Skip to content

Update infection/infection requirement from ^0.27 to ^0.27 || ^0.28 #74

Update infection/infection requirement from ^0.27 to ^0.27 || ^0.28

Update infection/infection requirement from ^0.27 to ^0.27 || ^0.28 #74

Triggered via pull request March 29, 2024 09:03
Status Failure
Total duration 1m 21s
Artifacts

integrate.yml

on: pull_request
0️⃣ Byte-level
4s
0️⃣ Byte-level
1️⃣ Syntax errors
21s
1️⃣ Syntax errors
3️⃣ Static Analysis
22s
3️⃣ Static Analysis
4️⃣ Coding Standards
25s
4️⃣ Coding Standards
5️⃣ Mutation Testing
41s
5️⃣ Mutation Testing
6️⃣ Rector Checkstyle
17s
6️⃣ Rector Checkstyle
7️⃣ Exported files
3s
7️⃣ Exported files
Matrix: 2️⃣ Unit and functional tests
Fit to window
Zoom out
Zoom in

Annotations

1 error and 10 warnings
6️⃣ Rector Checkstyle
Process completed with exit code 2.
5️⃣ Mutation Testing: src/Factory.php#L24
Escaped Mutant for Mutator "Throw_": --- Original +++ New @@ @@ { try { $parsed_url = Url::fromString($uri); - $parsed_url->getScheme() === 'otpauth' || throw new InvalidArgumentException('Invalid scheme.'); + $parsed_url->getScheme() === 'otpauth' || new InvalidArgumentException('Invalid scheme.'); } catch (Throwable $throwable) { throw new InvalidArgumentException('Not a valid OTP provisioning URI', $throwable->getCode(), $throwable); }
5️⃣ Mutation Testing: src/Factory.php#L24
Escaped Mutant for Mutator "LogicalOrNegation": --- Original +++ New @@ @@ { try { $parsed_url = Url::fromString($uri); - $parsed_url->getScheme() === 'otpauth' || throw new InvalidArgumentException('Invalid scheme.'); + !($parsed_url->getScheme() === 'otpauth' || throw new InvalidArgumentException('Invalid scheme.')); } catch (Throwable $throwable) { throw new InvalidArgumentException('Not a valid OTP provisioning URI', $throwable->getCode(), $throwable); }
5️⃣ Mutation Testing: src/Factory.php#L28
Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ } catch (Throwable $throwable) { throw new InvalidArgumentException('Not a valid OTP provisioning URI', $throwable->getCode(), $throwable); } - if ($clock === null) { + if ($clock !== null) { trigger_deprecation('spomky-labs/otphp', '11.3.0', 'The parameter "$clock" will become mandatory in 12.0.0. Please set a valid PSR Clock implementation instead of "null".'); $clock = new InternalClock(); }
5️⃣ Mutation Testing: src/Factory.php#L63
Escaped Mutant for Mutator "LogicalOrNegation": --- Original +++ New @@ @@ return; } if ($otp->getIssuer() !== null) { - $result[0] === $otp->getIssuer() || throw new InvalidArgumentException('Invalid OTP: invalid issuer in parameter'); + !($result[0] === $otp->getIssuer() || throw new InvalidArgumentException('Invalid OTP: invalid issuer in parameter')); $otp->setIssuerIncludedAsParameter(true); } assert($result[0] !== '');
5️⃣ Mutation Testing: src/Factory.php#L66
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } if ($otp->getIssuer() !== null) { $result[0] === $otp->getIssuer() || throw new InvalidArgumentException('Invalid OTP: invalid issuer in parameter'); - $otp->setIssuerIncludedAsParameter(true); + } assert($result[0] !== ''); $otp->setIssuer($result[0]);
5️⃣ Mutation Testing: src/Factory.php#L71
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $otp->setIssuerIncludedAsParameter(true); } assert($result[0] !== ''); - $otp->setIssuer($result[0]); + } private static function createOTP(Url $parsed_url, ClockInterface $clock): OTPInterface {
5️⃣ Mutation Testing: src/HOTP.php#L39
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $htop = new self($secret); $htop->setCounter(self::DEFAULT_COUNTER); $htop->setDigest(self::DEFAULT_DIGEST); - $htop->setDigits(self::DEFAULT_DIGITS); + return $htop; } public static function generate(): self
5️⃣ Mutation Testing: src/HOTP.php#L52
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ public function getCounter(): int { $value = $this->getParameter('counter'); - is_int($value) && $value >= 0 || throw new InvalidArgumentException('Invalid "counter" parameter.'); + is_int($value) || $value >= 0 || throw new InvalidArgumentException('Invalid "counter" parameter.'); return $value; } public function getProvisioningUri(): string
5️⃣ Mutation Testing: src/HOTP.php#L52
Escaped Mutant for Mutator "Throw_": --- Original +++ New @@ @@ public function getCounter(): int { $value = $this->getParameter('counter'); - is_int($value) && $value >= 0 || throw new InvalidArgumentException('Invalid "counter" parameter.'); + is_int($value) && $value >= 0 || new InvalidArgumentException('Invalid "counter" parameter.'); return $value; } public function getProvisioningUri(): string
5️⃣ Mutation Testing: src/HOTP.php#L52
Escaped Mutant for Mutator "LogicalOrNegation": --- Original +++ New @@ @@ public function getCounter(): int { $value = $this->getParameter('counter'); - is_int($value) && $value >= 0 || throw new InvalidArgumentException('Invalid "counter" parameter.'); + !(is_int($value) && $value >= 0 || throw new InvalidArgumentException('Invalid "counter" parameter.')); return $value; } public function getProvisioningUri(): string