Downgraded pest to work with infection and added infection to the pip… #23
ci.yml
on: pull_request
Matrix: Coding standards, code quality and static code analysis
Matrix: Test suite and coverage
Annotations
6 errors and 18 warnings
Coding standards, code quality and static code analysis (8.3)
Process completed with exit code 2.
|
Coding standards, code quality and static code analysis (8.3)
Process completed with exit code 1.
|
Coding standards, code quality and static code analysis (8.3)
Process completed with exit code 1.
|
Coding standards, code quality and static code analysis (8.2)
Process completed with exit code 1.
|
Coding standards, code quality and static code analysis (8.2)
Process completed with exit code 1.
|
Coding standards, code quality and static code analysis (8.2)
Process completed with exit code 2.
|
Test suite and coverage (8.3):
src/Hasher.php#L46
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
*
* @return string|null The hashed value, or null, if the input string was empty
*/
- protected function hash(string $value) : ?string
+ private function hash(string $value) : ?string
{
if (strlen($value) === 0) {
return null;
|
Test suite and coverage (8.3):
src/Hasher.php#L72
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
*
* @return array<array-key, mixed>|object The processed array or object
*/
- protected function traverse(array|object $value, array $sensitiveKeys) : array|object
+ private function traverse(array|object $value, array $sensitiveKeys) : array|object
{
if (is_array($value)) {
return $this->traverseInputArray($value, $sensitiveKeys);
|
Test suite and coverage (8.3):
src/Hasher.php#L94
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
{
foreach ($inputArray as $key => $value) {
if ($value === null) {
- // Nothing to hash or process
- continue;
+ break;
}
// If the value is not an array or an object, hash it if it is a sensitive key
if (is_scalar($value)) {
|
Test suite and coverage (8.3):
src/Hasher.php#L115
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
// and not a value somewhere in the subtree should be hashed)
if (!array_key_exists($key, $sensitiveKeys)) {
$inputArray[$key] = $this->hash(print_r($value, true));
- // Continue to the next value, as there is no subtree or sub-object to traverse
- continue;
+ break;
}
/* @phpstan-ignore-next-line The above if statement asserts that $sensitiveKeys[$key] is a subtree */
$inputArray[$key] = $this->traverse($value, $sensitiveKeys[$key]);
|
Test suite and coverage (8.3):
src/Hasher.php#L127
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
if (!$this->exclusiveSubtree) {
$inputArray[$key] = $this->traverse($inputArray[$key], $sensitiveKeys);
}
- continue;
+ break;
}
// The current key is not a sensitive key, traverse the subtree in search of sensitive keys with the same level in sensitiveKeys
/* @phpstan-ignore-next-line is_scalar above this if block asserts that $value is not a scalar */
|
Test suite and coverage (8.3):
src/Hasher.php#L146
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
*
* @return object The object with redacted values hashed
*/
- protected function traverseObject(object $object, array $sensitiveKeys) : object
+ private function traverseObject(object $object, array $sensitiveKeys) : object
{
foreach (get_object_vars($object) as $key => $value) {
if ($value === null) {
|
Test suite and coverage (8.3):
src/Hasher.php#L151
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
{
foreach (get_object_vars($object) as $key => $value) {
if ($value === null) {
- // Nothing to hash or process
- continue;
+ break;
}
// If the value is not an array or an object, hash it if it is a sensitive key
if (is_scalar($value)) {
|
Test suite and coverage (8.3):
src/Hasher.php#L172
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
// and not a value somewhere in the sub-object should be hashed)
if (!array_key_exists($key, $sensitiveKeys)) {
$object->{$key} = $this->hash(print_r($value, true));
- // Continue to the next value, as there is no subtree or sub-object to traverse
- continue;
+ break;
}
/* @phpstan-ignore-next-line The above if statement asserts that $sensitiveKeys[$key] is a subtree */
$object->{$key} = $this->traverse($value, $sensitiveKeys[$key]);
|
Test suite and coverage (8.3):
src/Hasher.php#L184
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
if (!$this->exclusiveSubtree) {
$object->{$key} = $this->traverse($object->{$key}, $sensitiveKeys);
}
- continue;
+ break;
}
// The current key is not a sensitive key, traverse the sub-object in search of sensitive keys with the same level in sensitiveKeys
/* @phpstan-ignore-next-line is_scalar above this if block asserts that $value is not a scalar */
|
Test suite and coverage (8.2):
src/Hasher.php#L46
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
*
* @return string|null The hashed value, or null, if the input string was empty
*/
- protected function hash(string $value) : ?string
+ private function hash(string $value) : ?string
{
if (strlen($value) === 0) {
return null;
|
Test suite and coverage (8.2):
src/Hasher.php#L72
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
*
* @return array<array-key, mixed>|object The processed array or object
*/
- protected function traverse(array|object $value, array $sensitiveKeys) : array|object
+ private function traverse(array|object $value, array $sensitiveKeys) : array|object
{
if (is_array($value)) {
return $this->traverseInputArray($value, $sensitiveKeys);
|
Test suite and coverage (8.2):
src/Hasher.php#L94
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
{
foreach ($inputArray as $key => $value) {
if ($value === null) {
- // Nothing to hash or process
- continue;
+ break;
}
// If the value is not an array or an object, hash it if it is a sensitive key
if (is_scalar($value)) {
|
Test suite and coverage (8.2):
src/Hasher.php#L115
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
// and not a value somewhere in the subtree should be hashed)
if (!array_key_exists($key, $sensitiveKeys)) {
$inputArray[$key] = $this->hash(print_r($value, true));
- // Continue to the next value, as there is no subtree or sub-object to traverse
- continue;
+ break;
}
/* @phpstan-ignore-next-line The above if statement asserts that $sensitiveKeys[$key] is a subtree */
$inputArray[$key] = $this->traverse($value, $sensitiveKeys[$key]);
|
Test suite and coverage (8.2):
src/Hasher.php#L127
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
if (!$this->exclusiveSubtree) {
$inputArray[$key] = $this->traverse($inputArray[$key], $sensitiveKeys);
}
- continue;
+ break;
}
// The current key is not a sensitive key, traverse the subtree in search of sensitive keys with the same level in sensitiveKeys
/* @phpstan-ignore-next-line is_scalar above this if block asserts that $value is not a scalar */
|
Test suite and coverage (8.2):
src/Hasher.php#L146
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
*
* @return object The object with redacted values hashed
*/
- protected function traverseObject(object $object, array $sensitiveKeys) : object
+ private function traverseObject(object $object, array $sensitiveKeys) : object
{
foreach (get_object_vars($object) as $key => $value) {
if ($value === null) {
|
Test suite and coverage (8.2):
src/Hasher.php#L151
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
{
foreach (get_object_vars($object) as $key => $value) {
if ($value === null) {
- // Nothing to hash or process
- continue;
+ break;
}
// If the value is not an array or an object, hash it if it is a sensitive key
if (is_scalar($value)) {
|
Test suite and coverage (8.2):
src/Hasher.php#L172
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
// and not a value somewhere in the sub-object should be hashed)
if (!array_key_exists($key, $sensitiveKeys)) {
$object->{$key} = $this->hash(print_r($value, true));
- // Continue to the next value, as there is no subtree or sub-object to traverse
- continue;
+ break;
}
/* @phpstan-ignore-next-line The above if statement asserts that $sensitiveKeys[$key] is a subtree */
$object->{$key} = $this->traverse($value, $sensitiveKeys[$key]);
|
Test suite and coverage (8.2):
src/Hasher.php#L184
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
if (!$this->exclusiveSubtree) {
$object->{$key} = $this->traverse($object->{$key}, $sensitiveKeys);
}
- continue;
+ break;
}
// The current key is not a sensitive key, traverse the sub-object in search of sensitive keys with the same level in sensitiveKeys
/* @phpstan-ignore-next-line is_scalar above this if block asserts that $value is not a scalar */
|