Allow custom line separator in CSVArray::toCSV()
#53
Annotations
7 warnings
Run mutation tests with infection/infection:
src/CSVArray.php#L36
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
$columnHeaders = str_getcsv($firstLine, $delimiter, $enclosure, $escape);
foreach ($lines as $index => $line) {
if (!StringUtil::hasContent($line)) {
- continue;
+ break;
}
/** @var array<int, string> $entries */
$entries = str_getcsv($line, $delimiter, $enclosure, $escape);
|
Run mutation tests with infection/infection:
src/QxManager/EmptyRow.php#L11
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
{
public function toString() : string
{
- return implode(QxManagerSampleSheet::DELIMITER, ['No', ...array_fill(0, 16, null)]);
+ return implode(QxManagerSampleSheet::DELIMITER, ['No', ...array_fill(-1, 16, null)]);
}
}
|
Run mutation tests with infection/infection:
src/QxManager/EmptyRow.php#L11
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
{
public function toString() : string
{
- return implode(QxManagerSampleSheet::DELIMITER, ['No', ...array_fill(0, 16, null)]);
+ return implode(QxManagerSampleSheet::DELIMITER, ['No', ...array_fill(1, 16, null)]);
}
}
|
Run mutation tests with infection/infection:
src/StringUtil.php#L43
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
return self::shortenMultiPartName($firstname, '-');
}
$amountOfDots = strspn($firstname, '.');
- if ($amountOfDots === 2) {
+ if ($amountOfDots === 1) {
/** @var int $dotPosition guaranteed because we know there are two dots */
$dotPosition = strpos($firstname, '.');
$firstPart = Str::substr($firstname, 0, 1) . '.';
|
Run mutation tests with infection/infection:
src/StringUtil.php#L43
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
return self::shortenMultiPartName($firstname, '-');
}
$amountOfDots = strspn($firstname, '.');
- if ($amountOfDots === 2) {
+ if ($amountOfDots === 3) {
/** @var int $dotPosition guaranteed because we know there are two dots */
$dotPosition = strpos($firstname, '.');
$firstPart = Str::substr($firstname, 0, 1) . '.';
|
Run mutation tests with infection/infection:
src/StringUtil.php#L55
Escaped Mutant for Mutator "UnwrapStrToUpper":
--- Original
+++ New
@@ @@
$secondPart = Str::substr($firstname, $startPos, 1) . '.';
return $firstPart . ' ' . $secondPart;
}
- return strtoupper(Str::substr($firstname, 0, 1)) . '.';
+ return Str::substr($firstname, 0, 1) . '.';
}
public static function shortenMultiPartName(string $firstname, string $separator) : string
{
|
Run mutation tests with infection/infection:
src/StringUtil.php#L58
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
}
return strtoupper(Str::substr($firstname, 0, 1)) . '.';
}
- public static function shortenMultiPartName(string $firstname, string $separator) : string
+ protected static function shortenMultiPartName(string $firstname, string $separator) : string
{
$firstPart = Str::substr($firstname, 0, 1) . '.';
$afterSeparator = Str::after($firstname, $separator);
|
The logs for this run have expired and are no longer available.
Loading