Fix parsing of backtick-enclosed table options #644
+31
−1
Annotations
1 error and 11 warnings
|
Infection
Process completed with exit code 1.
|
|
Complete job
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809, actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Infection:
src/Parsers/OptionsArrays.php#L103
Escaped Mutant for Mutator "UnwrapStrToUpper":
@@ @@
break;
}
- $upper = strtoupper((string) $token->value);
+ $upper = (string) $token->value;
} else {
$upper = strtoupper($token->token);
}
|
|
Infection:
src/Parsers/OptionsArrays.php#L99
Escaped Mutant for Mutator "GreaterThanOrEqualTo":
@@ @@
++$nextIdx;
}
- if ($nextIdx >= $list->count || $list->tokens[$nextIdx]->token !== '=') {
+ if ($nextIdx > $list->count || $list->tokens[$nextIdx]->token !== '=') {
break;
}
|
|
Infection:
src/Parsers/OptionsArrays.php#L96
Escaped Mutant for Mutator "Increment":
@@ @@
if ($token->type === TokenType::Symbol && $token->flags === Token::FLAG_SYMBOL_BACKTICK) {
$nextIdx = $list->idx + 1;
while ($nextIdx < $list->count && $list->tokens[$nextIdx]->type === TokenType::Whitespace) {
- ++$nextIdx;
+ --$nextIdx;
}
if ($nextIdx >= $list->count || $list->tokens[$nextIdx]->token !== '=') {
|
|
Infection:
src/Parsers/OptionsArrays.php#L95
Escaped Mutant for Mutator "While_":
@@ @@
// so that regular quoted identifiers are not mistaken for options.
if ($token->type === TokenType::Symbol && $token->flags === Token::FLAG_SYMBOL_BACKTICK) {
$nextIdx = $list->idx + 1;
- while ($nextIdx < $list->count && $list->tokens[$nextIdx]->type === TokenType::Whitespace) {
+ while (false) {
++$nextIdx;
}
|
|
Infection:
src/Parsers/OptionsArrays.php#L95
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
// so that regular quoted identifiers are not mistaken for options.
if ($token->type === TokenType::Symbol && $token->flags === Token::FLAG_SYMBOL_BACKTICK) {
$nextIdx = $list->idx + 1;
- while ($nextIdx < $list->count && $list->tokens[$nextIdx]->type === TokenType::Whitespace) {
+ while (!($nextIdx < $list->count) && !($list->tokens[$nextIdx]->type === TokenType::Whitespace)) {
++$nextIdx;
}
|
|
Infection:
src/Parsers/OptionsArrays.php#L95
Escaped Mutant for Mutator "LessThanNegotiation":
@@ @@
// so that regular quoted identifiers are not mistaken for options.
if ($token->type === TokenType::Symbol && $token->flags === Token::FLAG_SYMBOL_BACKTICK) {
$nextIdx = $list->idx + 1;
- while ($nextIdx < $list->count && $list->tokens[$nextIdx]->type === TokenType::Whitespace) {
+ while ($nextIdx >= $list->count && $list->tokens[$nextIdx]->type === TokenType::Whitespace) {
++$nextIdx;
}
|
|
Infection:
src/Parsers/OptionsArrays.php#L95
Escaped Mutant for Mutator "LessThan":
@@ @@
// so that regular quoted identifiers are not mistaken for options.
if ($token->type === TokenType::Symbol && $token->flags === Token::FLAG_SYMBOL_BACKTICK) {
$nextIdx = $list->idx + 1;
- while ($nextIdx < $list->count && $list->tokens[$nextIdx]->type === TokenType::Whitespace) {
+ while ($nextIdx <= $list->count && $list->tokens[$nextIdx]->type === TokenType::Whitespace) {
++$nextIdx;
}
|
|
Infection:
src/Parsers/OptionsArrays.php#L68
Escaped Mutant for Mutator "LessThan":
@@ @@
*/
$state = 0;
- for (; $list->idx < $list->count; ++$list->idx) {
+ for (; $list->idx <= $list->count; ++$list->idx) {
/**
* Token parsed at this moment.
*/
|
|
Infection:
src/Parsers/OptionsArrays.php#L66
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
*
* 2 ----------------------[ value ]----------------------> 0
*/
- $state = 0;
+ $state = -1;
for (; $list->idx < $list->count; ++$list->idx) {
/**
|
|
Infection:
src/Parsers/OptionsArrays.php#L48
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
/**
* The index of the option that was processed last time.
*/
- $lastOptionId = 0;
+ $lastOptionId = -1;
/**
* Counts brackets.
|
Loading