Skip to content

Remove nullability from IndexHint #648

Remove nullability from IndexHint

Remove nullability from IndexHint #648

Triggered via pull request February 9, 2025 22:56
Status Success
Total duration 52s
Artifacts

mutation-tests.yml

on: pull_request
Matrix: tests
Fit to window
Zoom out
Zoom in

Annotations

5 warnings
Mutation tests with PHP 8.2
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/
Mutation tests with PHP 8.2: src/Parsers/IndexHints.php#L31
Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ { $ret = []; $expr = new IndexHint(); - $expr->type = $options['type'] ?? ''; + $expr->type = '' ?? $options['type']; /** * The state of the parser. *
Mutation tests with PHP 8.2: src/Parsers/IndexHints.php#L47
Escaped Mutant for Mutator "GreaterThan": --- Original +++ New @@ @@ $state = 0; // By design, the parser will parse first token after the keyword. So, the keyword // must be analyzed too, in order to determine the type of this index hint. - if ($list->idx > 0) { + if ($list->idx >= 0) { --$list->idx; } for (; $list->idx < $list->count; ++$list->idx) {
Mutation tests with PHP 8.2: src/Parsers/IndexHints.php#L51
Escaped Mutant for Mutator "LessThan": --- Original +++ New @@ @@ if ($list->idx > 0) { --$list->idx; } - for (; $list->idx < $list->count; ++$list->idx) { + for (; $list->idx <= $list->count; ++$list->idx) { /** * Token parsed at this moment. */
Mutation tests with PHP 8.2: src/Parsers/IndexHints.php#L95
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ } break; case 2: - if ($token->type === TokenType::Keyword && $token->keyword === 'FOR') { + if ($token->type === TokenType::Keyword || $token->keyword === 'FOR') { $state = 3; } else { $expr->indexes = ExpressionArray::parse($parser, $list);