Skip to content

Fix Psalm

Fix Psalm #363

Triggered via push December 7, 2023 13:27
Status Success
Total duration 2m 1s
Artifacts

mutation.yml

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

Annotations

10 warnings
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L40
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ private array $assignments = []; public function __construct(string $directory, string $assignmentFile = 'assignments.php') { - $this->assignmentFile = $directory . DIRECTORY_SEPARATOR . $assignmentFile; + $this->assignmentFile = DIRECTORY_SEPARATOR . $directory . $assignmentFile; $this->loadAssignments(); } public function getAll() : array
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L40
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ private array $assignments = []; public function __construct(string $directory, string $assignmentFile = 'assignments.php') { - $this->assignmentFile = $directory . DIRECTORY_SEPARATOR . $assignmentFile; + $this->assignmentFile = $directory . $assignmentFile; $this->loadAssignments(); } public function getAll() : array
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L41
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function __construct(string $directory, string $assignmentFile = 'assignments.php') { $this->assignmentFile = $directory . DIRECTORY_SEPARATOR . $assignmentFile; - $this->loadAssignments(); + } public function getAll() : array {
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L115
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function add(Assignment $assignment) : void { $this->assignments[$assignment->getUserId()][$assignment->getItemName()] = $assignment; - $this->saveAssignments(); + } public function hasItem(string $name) : bool {
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L141
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ unset($assignments[$oldName]); } } - $this->saveAssignments(); + } public function remove(string $itemName, string $userId) : void {
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L151
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ return; } unset($this->assignments[$userId][$itemName]); - $this->saveAssignments(); + } public function removeByUserId(string $userId) : void {
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L157
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function removeByUserId(string $userId) : void { $this->assignments[$userId] = []; - $this->saveAssignments(); + } public function removeByItemName(string $itemName) : void {
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L165
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ foreach ($this->assignments as &$assignments) { unset($assignments[$itemName]); } - $this->saveAssignments(); + } public function clear() : void {
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L171
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function clear() : void { $this->assignments = []; - $this->saveAssignments(); + } /** * Loads authorization data from persistent storage.
mutation / PHP 8.1-ubuntu-latest: src/AssignmentsStorage.php#L201
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $assignmentData[$userId][] = $assignment->getItemName(); } } - $this->saveToFile($assignmentData, $this->assignmentFile); + } }