Update test according to main PR #1181
Annotations
11 warnings
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Run infection.:
src/AbstractTokenizer.php#L126
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->buffer .= $this->substring(1);
$this->advance(1);
}
- $this->addTokenFromBuffer();
+
if ($token->getHasChildren() && $token[-1] instanceof SqlToken && !$token[-1]->getHasChildren()) {
unset($token[-1]);
}
|
Run infection.:
src/AbstractTokenizer.php#L235
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
return false;
}
if (!is_array(reset($with))) {
- usort($with, static fn(string $string1, string $string2) => mb_strlen($string2, 'UTF-8') - mb_strlen($string1, 'UTF-8'));
+ usort($with, static fn(string $string1, string $string2) => strlen($string2) - mb_strlen($string1, 'UTF-8'));
$map = [];
foreach ($with as $string) {
$map[mb_strlen($string, 'UTF-8')][$caseSensitive ? $string : mb_strtoupper($string, 'UTF-8')] = true;
|
Run infection.:
src/AbstractTokenizer.php#L235
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
return false;
}
if (!is_array(reset($with))) {
- usort($with, static fn(string $string1, string $string2) => mb_strlen($string2, 'UTF-8') - mb_strlen($string1, 'UTF-8'));
+ usort($with, static fn(string $string1, string $string2) => mb_strlen($string2, 'UTF-8') - strlen($string1));
$map = [];
foreach ($with as $string) {
$map[mb_strlen($string, 'UTF-8')][$caseSensitive ? $string : mb_strtoupper($string, 'UTF-8')] = true;
|
Run infection.:
src/AbstractTokenizer.php#L235
Escaped Mutant for Mutator "Minus":
--- Original
+++ New
@@ @@
return false;
}
if (!is_array(reset($with))) {
- usort($with, static fn(string $string1, string $string2) => mb_strlen($string2, 'UTF-8') - mb_strlen($string1, 'UTF-8'));
+ usort($with, static fn(string $string1, string $string2) => mb_strlen($string2, 'UTF-8') + mb_strlen($string1, 'UTF-8'));
$map = [];
foreach ($with as $string) {
$map[mb_strlen($string, 'UTF-8')][$caseSensitive ? $string : mb_strtoupper($string, 'UTF-8')] = true;
|
Run infection.:
src/AbstractTokenizer.php#L235
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
return false;
}
if (!is_array(reset($with))) {
- usort($with, static fn(string $string1, string $string2) => mb_strlen($string2, 'UTF-8') - mb_strlen($string1, 'UTF-8'));
+
$map = [];
foreach ($with as $string) {
$map[mb_strlen($string, 'UTF-8')][$caseSensitive ? $string : mb_strtoupper($string, 'UTF-8')] = true;
|
Run infection.:
src/AbstractTokenizer.php#L240
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
usort($with, static fn(string $string1, string $string2) => mb_strlen($string2, 'UTF-8') - mb_strlen($string1, 'UTF-8'));
$map = [];
foreach ($with as $string) {
- $map[mb_strlen($string, 'UTF-8')][$caseSensitive ? $string : mb_strtoupper($string, 'UTF-8')] = true;
+ $map[strlen($string)][$caseSensitive ? $string : mb_strtoupper($string, 'UTF-8')] = true;
}
$with = $map;
}
|
Run infection.:
src/AbstractTokenizer.php#L240
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
usort($with, static fn(string $string1, string $string2) => mb_strlen($string2, 'UTF-8') - mb_strlen($string1, 'UTF-8'));
$map = [];
foreach ($with as $string) {
- $map[mb_strlen($string, 'UTF-8')][$caseSensitive ? $string : mb_strtoupper($string, 'UTF-8')] = true;
+ $map[mb_strlen($string, 'UTF-8')][$caseSensitive ? $string : strtoupper($string)] = true;
}
$with = $map;
}
|
Run infection.:
src/AbstractTokenizer.php#L305
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
if ($offset === null) {
$offset = $this->offset;
}
- if ($offset + mb_strlen($string, 'UTF-8') > $this->length) {
+ if ($offset + strlen($string) > $this->length) {
return $this->length;
}
$afterIndexOf = mb_strpos($this->sql, $string, $offset, 'UTF-8');
|
Run infection.:
src/AbstractTokenizer.php#L305
Escaped Mutant for Mutator "Plus":
--- Original
+++ New
@@ @@
if ($offset === null) {
$offset = $this->offset;
}
- if ($offset + mb_strlen($string, 'UTF-8') > $this->length) {
+ if ($offset - mb_strlen($string, 'UTF-8') > $this->length) {
return $this->length;
}
$afterIndexOf = mb_strpos($this->sql, $string, $offset, 'UTF-8');
|
Run infection.:
src/AbstractTokenizer.php#L305
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
if ($offset === null) {
$offset = $this->offset;
}
- if ($offset + mb_strlen($string, 'UTF-8') > $this->length) {
+ if ($offset + mb_strlen($string, 'UTF-8') >= $this->length) {
return $this->length;
}
$afterIndexOf = mb_strpos($this->sql, $string, $offset, 'UTF-8');
|
Loading