add crypto prefix #1739
Annotations
10 warnings
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/DenormalizationFailure.php#L27
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
*/
public function __construct(string $class, string $property, string $normalizer, Throwable $e)
{
- parent::__construct(sprintf('denormalization for the property "%s" in the class "%s" with the normalizer "%s" failed.', $property, $class, $normalizer), 0, $e);
+ parent::__construct(sprintf('denormalization for the property "%s" in the class "%s" with the normalizer "%s" failed.', $property, $class, $normalizer), -1, $e);
}
}
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/DenormalizationFailure.php#L20
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
*/
public function __construct(string $class, string $property, string $normalizer, Throwable $e)
{
- parent::__construct(sprintf('denormalization for the property "%s" in the class "%s" with the normalizer "%s" failed.', $property, $class, $normalizer), 0, $e);
+
}
}
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipher.php#L82
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
private function dataDecode(string $data): mixed
{
- return json_decode($data, true, 512, JSON_THROW_ON_ERROR);
+ return json_decode($data, true, 513, JSON_THROW_ON_ERROR);
}
}
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipher.php#L82
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
}
private function dataDecode(string $data): mixed
{
- return json_decode($data, true, 512, JSON_THROW_ON_ERROR);
+ return json_decode($data, true, 511, JSON_THROW_ON_ERROR);
}
}
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipher.php#L43
Escaped Mutant for Mutator "ConcatOperandRemoval":
@@ @@
if ($encryptedData === false) {
throw new EncryptionFailed();
}
- return $this->prefix . base64_encode($encryptedData);
+ return base64_encode($encryptedData);
}
public function decrypt(CipherKey $key, string $data): mixed
{
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipher.php#L43
Escaped Mutant for Mutator "Concat":
@@ @@
if ($encryptedData === false) {
throw new EncryptionFailed();
}
- return $this->prefix . base64_encode($encryptedData);
+ return base64_encode($encryptedData) . $this->prefix;
}
public function decrypt(CipherKey $key, string $data): mixed
{
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipher.php#L27
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
@@ @@
}
public function encrypt(CipherKey $key, mixed $data): string
{
- if ($this->prefix && is_string($data) && str_starts_with($data, $this->prefix)) {
+ if ($this->prefix && is_string($data) && !str_starts_with($data, $this->prefix)) {
throw new EncryptionFailed();
}
$encryptedData = @openssl_encrypt($this->dataEncode($data), $key->method, $key->key, 0, $key->iv);
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/ClassNotSupported.php#L17
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
/** @param class-string $className */
public function __construct(string $className, Throwable|null $previous = null)
{
- parent::__construct(sprintf('Class %s not supported', $className), 0, $previous);
+
}
}
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/ClassNotSupported.php#L17
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
/** @param class-string $className */
public function __construct(string $className, Throwable|null $previous = null)
{
- parent::__construct(sprintf('Class %s not supported', $className), 0, $previous);
+ parent::__construct(sprintf('Class %s not supported', $className), 1, $previous);
}
}
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/ClassNotSupported.php#L17
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
/** @param class-string $className */
public function __construct(string $className, Throwable|null $previous = null)
{
- parent::__construct(sprintf('Class %s not supported', $className), 0, $previous);
+ parent::__construct(sprintf('Class %s not supported', $className), -1, $previous);
}
}
|