Fix build method param types #431
Annotations
8 warnings
Mutation tests with PHP 8.1:
src/Components/Condition.php#L88
Escaped Mutant for Mutator "UnwrapTrim":
--- Original
+++ New
@@ @@
*/
public function __construct($expr = null)
{
- $this->expr = trim((string) $expr);
+ $this->expr = (string) $expr;
}
/**
* @param Parser $parser the parser that serves as context
|
Mutation tests with PHP 8.1:
src/Components/Condition.php#L149
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
if (in_array($token->value, static::$delimiters, true)) {
if ($betweenBefore && $token->value === 'AND') {
// The syntax of keyword `BETWEEN` is hard-coded.
- $betweenBefore = false;
+ $betweenBefore = true;
} else {
// The expression ended.
$expr->expr = trim($expr->expr);
|
Mutation tests with PHP 8.1:
src/Components/ParameterDefinition.php#L87
Escaped Mutant for Mutator "LessThan":
--- Original
+++ New
@@ @@
* @var int
*/
$state = 0;
- for (; $list->idx < $list->count; ++$list->idx) {
+ for (; $list->idx <= $list->count; ++$list->idx) {
/**
* Token parsed at this moment.
*/
|
Mutation tests with PHP 8.1:
src/Components/ParameterDefinition.php#L95
Escaped Mutant for Mutator "Break_":
--- Original
+++ New
@@ @@
$token = $list->tokens[$list->idx];
// End of statement.
if ($token->type === Token::TYPE_DELIMITER) {
- break;
+ continue;
}
// Skipping whitespaces and comments.
if ($token->type === Token::TYPE_WHITESPACE || $token->type === Token::TYPE_COMMENT) {
|
Mutation tests with PHP 8.1:
src/Components/ParameterDefinition.php#L112
Escaped Mutant for Mutator "Increment":
--- Original
+++ New
@@ @@
$expr->inOut = $token->value;
++$list->idx;
} elseif ($token->value === ')') {
- ++$list->idx;
+ --$list->idx;
break;
} else {
$expr->name = $token->value;
|
Mutation tests with PHP 8.1:
src/Components/ParameterDefinition.php#L154
Escaped Mutant for Mutator "Assignment":
--- Original
+++ New
@@ @@
}
$tmp = '';
if (!empty($component->inOut)) {
- $tmp .= $component->inOut . ' ';
+ $tmp = $component->inOut . ' ';
}
return trim($tmp . Context::escape($component->name) . ' ' . $component->type);
}
|
Mutation tests with PHP 8.1:
src/Components/ParameterDefinition.php#L157
Escaped Mutant for Mutator "UnwrapTrim":
--- Original
+++ New
@@ @@
if (!empty($component->inOut)) {
$tmp .= $component->inOut . ' ';
}
- return trim($tmp . Context::escape($component->name) . ' ' . $component->type);
+ return $tmp . Context::escape($component->name) . ' ' . $component->type;
}
public function __toString() : string
{
|
Mutation tests with PHP 8.1
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|