Skip to content

Merge pull request #211 from Spomky-Labs/11.0.x-merge-up-into-11.1.x_… #79

Merge pull request #211 from Spomky-Labs/11.0.x-merge-up-into-11.1.x_…

Merge pull request #211 from Spomky-Labs/11.0.x-merge-up-into-11.1.x_… #79

Triggered via push April 14, 2024 16:11
Status Failure
Total duration 1m 20s
Artifacts

integrate.yml

on: push
0️⃣ Byte-level
3s
0️⃣ Byte-level
1️⃣ Syntax errors
19s
1️⃣ Syntax errors
3️⃣ Static Analysis
19s
3️⃣ Static Analysis
4️⃣ Coding Standards
39s
4️⃣ Coding Standards
5️⃣ Mutation Testing
46s
5️⃣ Mutation Testing
6️⃣ Rector Checkstyle
35s
6️⃣ Rector Checkstyle
7️⃣ Exported files
3s
7️⃣ Exported files
Matrix: 2️⃣ Unit and functional tests
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 19 warnings
3️⃣ Static Analysis: src/Url.php#L68
Left side of || is always true.
3️⃣ Static Analysis
Process completed with exit code 2.
0️⃣ Byte-level
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
1️⃣ Syntax errors
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
7️⃣ Exported files
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
3️⃣ Static Analysis
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
2️⃣ Unit and functional tests (ubuntu-latest, 8.1, lowest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
6️⃣ Rector Checkstyle
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
2️⃣ Unit and functional tests (ubuntu-latest, 8.1, highest)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
4️⃣ Coding Standards
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
5️⃣ Mutation Testing
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
5️⃣ Mutation Testing: src/Factory.php#L56
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); + } $otp->setIssuer($result[0]); }
5️⃣ Mutation Testing: src/Factory.php#L58
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $result[0] === $otp->getIssuer() || throw new InvalidArgumentException('Invalid OTP: invalid issuer in parameter'); $otp->setIssuerIncludedAsParameter(true); } - $otp->setIssuer($result[0]); + } private static function createOTP(Url $parsed_url) : 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#L59
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ } public function getProvisioningUri() : string { - return $this->generateURI('hotp', ['counter' => $this->getCounter()]); + return $this->generateURI('hotp', []); } /** * If the counter is not provided, the OTP is verified at the actual counter.
5️⃣ Mutation Testing: src/OTP.php#L57
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ { $hash = hash_hmac($this->getDigest(), $this->intToByteString($input), $this->getDecodedSecret(), true); $unpacked = unpack('C*', $hash); - $unpacked !== false || throw new InvalidArgumentException('Invalid data.'); + $unpacked !== true || throw new InvalidArgumentException('Invalid data.'); $hmac = array_values($unpacked); $offset = $hmac[count($hmac) - 1] & 0xf; $code = ($hmac[$offset] & 0x7f) << 24 | ($hmac[$offset + 1] & 0xff) << 16 | ($hmac[$offset + 2] & 0xff) << 8 | $hmac[$offset + 3] & 0xff;
5️⃣ Mutation Testing: src/OTP.php#L93
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ $label = $this->getLabel(); is_string($label) || throw new InvalidArgumentException('The label is not set.'); $this->hasColon($label) === false || throw new InvalidArgumentException('Label must not contain a colon.'); - $options = [...$options, ...$this->getParameters()]; + $options = [...$this->getParameters()]; $this->filterOptions($options); $params = str_replace(['+', '%7E'], ['%20', '~'], http_build_query($options)); return sprintf('otpauth://%s/%s?%s', $type, rawurlencode(($this->getIssuer() !== null ? $this->getIssuer() . ':' : '') . $label), $params);
5️⃣ Mutation Testing: src/ParameterTrait.php#L33
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ public function getParameters() : array { $parameters = $this->parameters; - if ($this->getIssuer() !== null && $this->isIssuerIncludedAsParameter() === true) { + if ($this->getIssuer() !== null || $this->isIssuerIncludedAsParameter() === true) { $parameters['issuer'] = $this->getIssuer(); } return $parameters;
5️⃣ Mutation Testing: src/ParameterTrait.php#L152
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ return ['label' => function ($value) { $this->hasColon($value) === false || throw new InvalidArgumentException('Label must not contain a colon.'); return $value; - }, 'secret' => static fn($value): string => mb_strtoupper(trim((string) $value, '=')), 'algorithm' => static function ($value) : string { + }, 'secret' => static fn($value): string => mb_strtoupper(trim($value, '=')), 'algorithm' => static function ($value) : string { $value = mb_strtolower($value); in_array($value, hash_algos(), true) || throw new InvalidArgumentException(sprintf('The "%s" digest is not supported.', $value)); return $value;
5️⃣ Mutation Testing: src/ParameterTrait.php#L152
Escaped Mutant for Mutator "MBString": --- Original +++ New @@ @@ return ['label' => function ($value) { $this->hasColon($value) === false || throw new InvalidArgumentException('Label must not contain a colon.'); return $value; - }, 'secret' => static fn($value): string => mb_strtoupper(trim((string) $value, '=')), 'algorithm' => static function ($value) : string { + }, 'secret' => static fn($value): string => strtoupper(trim((string) $value, '=')), 'algorithm' => static function ($value) : string { $value = mb_strtolower($value); in_array($value, hash_algos(), true) || throw new InvalidArgumentException(sprintf('The "%s" digest is not supported.', $value)); return $value;
5️⃣ Mutation Testing: src/ParameterTrait.php#L154
Escaped Mutant for Mutator "MBString": --- Original +++ New @@ @@ $this->hasColon($value) === false || throw new InvalidArgumentException('Label must not contain a colon.'); return $value; }, 'secret' => static fn($value): string => mb_strtoupper(trim((string) $value, '=')), 'algorithm' => static function ($value) : string { - $value = mb_strtolower($value); + $value = strtolower($value); in_array($value, hash_algos(), true) || throw new InvalidArgumentException(sprintf('The "%s" digest is not supported.', $value)); return $value; }, 'digits' => static function ($value) : int {