Use simple storages, PHP 8.1 and PHPUnit 10.5.2 #376
Annotations
10 warnings
Run roave infection.:
src/AssignmentsStorage.php#L33
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
private string $assignmentFile;
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 add(Assignment $assignment) : void
|
Run roave infection.:
src/AssignmentsStorage.php#L33
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
private string $assignmentFile;
public function __construct(string $directory, string $assignmentFile = 'assignments.php')
{
- $this->assignmentFile = $directory . DIRECTORY_SEPARATOR . $assignmentFile;
+ $this->assignmentFile = $directory . $assignmentFile;
$this->loadAssignments();
}
public function add(Assignment $assignment) : void
|
Run roave infection.:
src/AssignmentsStorage.php#L34
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 add(Assignment $assignment) : void
{
|
Run roave infection.:
src/AssignmentsStorage.php#L41
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function add(Assignment $assignment) : void
{
parent::add($assignment);
- $this->saveAssignments();
+
}
public function renameItem(string $oldName, string $newName) : void
{
|
Run roave infection.:
src/AssignmentsStorage.php#L63
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
return;
}
parent::remove($itemName, $userId);
- $this->saveAssignments();
+
}
public function removeByUserId(string $userId) : void
{
|
Run roave infection.:
src/AssignmentsStorage.php#L70
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function removeByUserId(string $userId) : void
{
parent::removeByUserId($userId);
- $this->saveAssignments();
+
}
public function removeByItemName(string $itemName) : void
{
|
Run roave infection.:
src/AssignmentsStorage.php#L77
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function removeByItemName(string $itemName) : void
{
parent::removeByItemName($itemName);
- $this->saveAssignments();
+
}
public function clear() : void
{
|
Run roave infection.:
src/AssignmentsStorage.php#L84
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function clear() : void
{
parent::clear();
- $this->saveAssignments();
+
}
private function loadAssignments() : void
{
|
Run roave infection.:
src/AssignmentsStorage.php#L108
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$assignmentData[$userId][] = $assignment->getItemName();
}
}
- $this->saveToFile($assignmentData, $this->assignmentFile);
+
}
}
|
Run roave infection.:
src/FileStorageTrait.php#L26
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
*
* @see saveToFile()
*/
- protected function loadFromFile(string $file) : array
+ private function loadFromFile(string $file) : array
{
if (is_file($file)) {
/**
|
The logs for this run have expired and are no longer available.
Loading