Skip to content

Filter User item names adding default items #984

Filter User item names adding default items

Filter User item names adding default items #984

Triggered via pull request April 21, 2024 07:41
Status Failure
Total duration 1m 18s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

1 error and 2 warnings
mutation / PHP 8.3-ubuntu-latest
Process completed with exit code 1.
mutation / PHP 8.3-ubuntu-latest: src/Manager.php#L118
Escaped Mutant for Mutator "IfNegation": --- Original +++ New @@ @@ { $userItemNames = $this->assignmentsStorage->filterUserItemNames($userId, $itemNames); foreach ($this->defaultRoleNames as $roleName) { - if (in_array($roleName, $itemNames)) { + if (!in_array($roleName, $itemNames)) { $userItemNames[] = $roleName; } }
mutation / PHP 8.3-ubuntu-latest: src/Manager.php#L122
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ $userItemNames[] = $roleName; } } - return $userItemNames; + return count($userItemNames) > 1 ? array_slice($userItemNames, 0, 1, true) : $userItemNames; } public function canAddChild(string $parentName, string $childName) : bool {