Update symplify/easy-coding-standard requirement from ^11.0 to ^11.0 || ^12.0 #57
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
integrate.yml
on: pull_request
3️⃣ Static Analysis
22s
4️⃣ Coding Standards
19s
5️⃣ Mutation Testing
42s
6️⃣ Rector Checkstyle
22s
7️⃣ Exported files
2s
Matrix: 2️⃣ Unit and functional tests
Annotations
1 error and 10 warnings
4️⃣ Coding Standards
Process completed with exit code 2.
|
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#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#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#L60
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#L99
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#L40
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#L50
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
public function getSecret() : string
{
$value = $this->getParameter('secret');
- is_string($value) && $value !== '' || throw new InvalidArgumentException('Invalid "secret" parameter.');
+ is_string($value) || $value !== '' || throw new InvalidArgumentException('Invalid "secret" parameter.');
return $value;
}
public function getLabel() : null|string
|