Update CaseConverter.php #7
Annotations
7 warnings
Run Infection command:
src/CaseConverter.php#L36
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
private Closure $upper;
public function __construct()
{
- $this->upper = static fn(string $word): string => mb_convert_case($word, MB_CASE_UPPER, 'UTF-8');
+ $this->upper = static fn(string $word): string => strtoupper($word);
$this->lower = static fn(string $word): string => mb_convert_case($word, MB_CASE_LOWER, 'UTF-8');
$this->title = static fn(string $word): string => mb_convert_case($word, MB_CASE_TITLE, 'UTF-8');
}
|
Run Infection command:
src/CaseConverter.php#L37
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
public function __construct()
{
$this->upper = static fn(string $word): string => mb_convert_case($word, MB_CASE_UPPER, 'UTF-8');
- $this->lower = static fn(string $word): string => mb_convert_case($word, MB_CASE_LOWER, 'UTF-8');
+ $this->lower = static fn(string $word): string => strtolower($word);
$this->title = static fn(string $word): string => mb_convert_case($word, MB_CASE_TITLE, 'UTF-8');
}
public function adaCase(string $string) : string
|
Run Infection command:
src/CaseConverter.php#L133
Escaped Mutant for Mutator "PregMatchRemoveCaret":
--- Original
+++ New
@@ @@
}
private function isUppercaseWord(string $string) : bool
{
- return preg_match('#^\\p{Lu}+$#u', $string) === 1;
+ return preg_match('#\\p{Lu}+$#u', $string) === 1;
}
/**
* @return list<string>
|
Run Infection command:
src/CaseConverter.php#L133
Escaped Mutant for Mutator "PregMatchRemoveFlags":
--- Original
+++ New
@@ @@
}
private function isUppercaseWord(string $string) : bool
{
- return preg_match('#^\\p{Lu}+$#u', $string) === 1;
+ return preg_match('#^\\p{Lu}+$#', $string) === 1;
}
/**
* @return list<string>
|
Run Infection command:
src/CaseConverter.php#L133
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
}
private function isUppercaseWord(string $string) : bool
{
- return preg_match('#^\\p{Lu}+$#u', $string) === 1;
+ return preg_match('#^\\p{Lu}+$#u', $string) === 2;
}
/**
* @return list<string>
|
Run Infection command:
src/CaseConverter.php#L208
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
* @var non-empty-string $string
*/
$words = preg_split($pattern, $string, 0, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
- if ($words === false) {
+ if ($words === true) {
throw new FailedToSplitStringException($string . ' | ' . $pattern);
}
/** @return list<string> */
|
Upload coverage to Codecov
Codecov: Failed to properly create commit: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1
|
The logs for this run have expired and are no longer available.
Loading