Separate column type constants (#317) #1264
Annotations
11 warnings
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Run infection.:
src/AbstractTokenizer.php#L105
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$token[] = (new SqlToken())->type(SqlToken::TYPE_STATEMENT);
$this->tokenStack->push($token[0]);
$this->currentToken = $this->tokenStack->top();
- $length = 0;
+ $length = -1;
while (!$this->isEof()) {
if ($this->isWhitespace($length) || $this->isComment($length)) {
$this->addTokenFromBuffer();
|
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#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');
|
Run infection.:
src/AbstractTokenizer.php#L309
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
if ($offset + mb_strlen($string, 'UTF-8') > $this->length) {
return $this->length;
}
- $afterIndexOf = mb_strpos($this->sql, $string, $offset, 'UTF-8');
+ $afterIndexOf = strpos($this->sql, $string, $offset);
if ($afterIndexOf === false) {
$afterIndexOf = $this->length;
} else {
|
Run infection.:
src/AbstractTokenizer.php#L314
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
if ($afterIndexOf === false) {
$afterIndexOf = $this->length;
} else {
- $afterIndexOf += mb_strlen($string, 'UTF-8');
+ $afterIndexOf += strlen($string);
}
return $afterIndexOf;
}
|
Run infection.:
src/AbstractTokenizer.php#L332
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
if (!$isIdentifier && !$isStringLiteral) {
return false;
}
- $this->addTokenFromBuffer();
+
$this->currentToken[] = (new SqlToken())->type($isIdentifier ? SqlToken::TYPE_IDENTIFIER : SqlToken::TYPE_STRING_LITERAL)->content(is_string($content) ? $content : $this->substring($length))->startOffset($this->offset)->endOffset($this->offset + $length);
return true;
}
|
Run infection.:
src/AbstractTokenizer.php#L335
Escaped Mutant for Mutator "Ternary":
--- Original
+++ New
@@ @@
return false;
}
$this->addTokenFromBuffer();
- $this->currentToken[] = (new SqlToken())->type($isIdentifier ? SqlToken::TYPE_IDENTIFIER : SqlToken::TYPE_STRING_LITERAL)->content(is_string($content) ? $content : $this->substring($length))->startOffset($this->offset)->endOffset($this->offset + $length);
+ $this->currentToken[] = (new SqlToken())->type($isIdentifier ? SqlToken::TYPE_STRING_LITERAL : SqlToken::TYPE_IDENTIFIER)->content(is_string($content) ? $content : $this->substring($length))->startOffset($this->offset)->endOffset($this->offset + $length);
return true;
}
/**
|
Run infection.:
src/AbstractTokenizer.php#L336
Escaped Mutant for Mutator "Ternary":
--- Original
+++ New
@@ @@
return false;
}
$this->addTokenFromBuffer();
- $this->currentToken[] = (new SqlToken())->type($isIdentifier ? SqlToken::TYPE_IDENTIFIER : SqlToken::TYPE_STRING_LITERAL)->content(is_string($content) ? $content : $this->substring($length))->startOffset($this->offset)->endOffset($this->offset + $length);
+ $this->currentToken[] = (new SqlToken())->type($isIdentifier ? SqlToken::TYPE_IDENTIFIER : SqlToken::TYPE_STRING_LITERAL)->content(is_string($content) ? $this->substring($length) : $content)->startOffset($this->offset)->endOffset($this->offset + $length);
return true;
}
/**
|
Loading