rewrite cryptography #2356
Annotations
10 warnings
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/HydratorBuilder.php#L38
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
}
/** @return $this */
- public function addMetadataEnricher(MetadataEnricher $enricher, int $priority = 0): static
+ public function addMetadataEnricher(MetadataEnricher $enricher, int $priority = -1): static
{
$this->metadataEnrichers[$priority][] = $enricher;
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/HydratorBuilder.php#L30
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
private array $guessers = [];
/** @return $this */
- public function addMiddleware(Middleware $middleware, int $priority = 0): static
+ public function addMiddleware(Middleware $middleware, int $priority = 1): static
{
$this->middlewares[$priority][] = $middleware;
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/HydratorBuilder.php#L30
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
private array $guessers = [];
/** @return $this */
- public function addMiddleware(Middleware $middleware, int $priority = 0): static
+ public function addMiddleware(Middleware $middleware, int $priority = -1): static
{
$this->middlewares[$priority][] = $middleware;
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipherKeyFactory.php#L61
Escaped Mutant for Mutator "PublicVisibility":
@@ @@
return openssl_get_cipher_methods(true);
}
- public static function methodSupported(string $method): bool
+ protected static function methodSupported(string $method): bool
{
return in_array($method, self::supportedMethods(), true);
}
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipherKeyFactory.php#L56
Escaped Mutant for Mutator "PublicVisibility":
@@ @@
}
/** @return list<string> */
- public static function supportedMethods(): array
+ protected static function supportedMethods(): array
{
return openssl_get_cipher_methods(true);
}
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipherKeyFactory.php#L32
Escaped Mutant for Mutator "IfNegation":
@@ @@
$keyLength = 16;
- if (function_exists('openssl_cipher_key_length')) {
+ if (!function_exists('openssl_cipher_key_length')) {
$keyLength = @openssl_cipher_key_length($this->method);
}
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipherKeyFactory.php#L30
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
throw new MethodNotSupported($this->method);
}
- $keyLength = 16;
+ $keyLength = 17;
if (function_exists('openssl_cipher_key_length')) {
$keyLength = @openssl_cipher_key_length($this->method);
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipherKeyFactory.php#L27
Escaped Mutant for Mutator "Throw_":
@@ @@
private readonly string $method = self::DEFAULT_METHOD,
) {
if (!self::methodSupported($this->method)) {
- throw new MethodNotSupported($this->method);
+ new MethodNotSupported($this->method);
}
$keyLength = 16;
|
|
Mutation tests (locked, 8.4, ubuntu-latest):
src/Cryptography/Cipher/OpensslCipher.php#L66
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#L66
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);
}
}
|