Skip to content

Add native property types in Parser #535

Add native property types in Parser

Add native property types in Parser #535

Triggered via pull request January 15, 2024 21:09
Status Success
Total duration 1m 19s
Artifacts

mutation-tests.yml

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

Annotations

9 warnings
Mutation tests with PHP 8.1: src/Parser.php#L378
Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ */ public function __construct(string|UtfString|TokensList|null $list = null, bool $strict = false) { - if (Context::$keywords === []) { + if (Context::$keywords !== []) { Context::load(); } if (is_string($list) || $list instanceof UtfString) {
Mutation tests with PHP 8.1: src/Parser.php#L382
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ if (Context::$keywords === []) { Context::load(); } - if (is_string($list) || $list instanceof UtfString) { + if (is_string($list) || false) { $lexer = new Lexer($list, $strict); $this->list = $lexer->list; } elseif ($list instanceof TokensList) {
Mutation tests with PHP 8.1: src/Parser.php#L385
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ if (is_string($list) || $list instanceof UtfString) { $lexer = new Lexer($list, $strict); $this->list = $lexer->list; - } elseif ($list instanceof TokensList) { + } elseif (true) { $this->list = $list; } $this->strict = $strict;
Mutation tests with PHP 8.1: src/Parser.php#L446
Escaped Mutant for Mutator "UnwrapStrToUpper": --- Original +++ New @@ @@ $token = $list->tokens[$list->idx]; // `DELIMITER` is not an actual statement and it requires // special handling. - if ($token->type === TokenType::None && strtoupper($token->token) === 'DELIMITER') { + if ($token->type === TokenType::None && $token->token === 'DELIMITER') { // Skipping to the end of this statement. $list->getNextOfType(TokenType::Delimiter); $prevLastIdx = $list->idx;
Mutation tests with PHP 8.1: src/Parser.php#L547
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ $statement->last = $list->idx; $prevLastIdx = $list->idx; // Handles unions. - if (!empty($unionType) && $lastStatement instanceof SelectStatement && $statement instanceof SelectStatement) { + if (!empty($unionType) && true && $statement instanceof SelectStatement) { /* * This SELECT statement. *
Mutation tests with PHP 8.1: src/Parser.php#L548
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ $statement->last = $list->idx; $prevLastIdx = $list->idx; // Handles unions. - if (!empty($unionType) && $lastStatement instanceof SelectStatement && $statement instanceof SelectStatement) { + if (!empty($unionType) && $lastStatement instanceof SelectStatement && true) { /* * This SELECT statement. *
Mutation tests with PHP 8.1: src/Parser.php#L580
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ // union ends. $lastStatement->last = $statement->last; $unionType = false; - // Validate clause order - $statement->validateClauseOrder($this, $list); + continue; } // Handles transactions.
Mutation tests with PHP 8.1: src/Parser.php#L606
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } $lastTransaction = null; } - // Validate clause order - $statement->validateClauseOrder($this, $list); + continue; } // Validate clause order
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/