Skip to content

Don't add too many spaces when replacing clauses #595

Don't add too many spaces when replacing clauses

Don't add too many spaces when replacing clauses #595

Triggered via pull request June 2, 2024 16:22
Status Failure
Total duration 1m 43s
Artifacts

mutation-tests.yml

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

Annotations

1 error and 12 warnings
Mutation tests with PHP 8.1
Process completed with exit code 1.
Mutation tests with PHP 8.1
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Mutation tests with PHP 8.1: src/Utils/Query.php#L93
Escaped Mutant for Mutator "Foreach_": --- Original +++ New @@ @@ } $expressions = $statement->expr; if (!empty($statement->join)) { - foreach ($statement->join as $join) { + foreach (array() as $join) { $expressions[] = $join->expr; } }
Mutation tests with PHP 8.1: src/Utils/Query.php#L214
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ } elseif ($statement instanceof SetStatement) { $flags->queryType = StatementType::Set; } - if ($statement instanceof SelectStatement || $statement instanceof UpdateStatement || $statement instanceof DeleteStatement) { + if (true || $statement instanceof UpdateStatement || $statement instanceof DeleteStatement) { if (!empty($statement->limit)) { $flags->limit = true; }
Mutation tests with PHP 8.1: src/Utils/Query.php#L214
Escaped Mutant for Mutator "LogicalOrAllSubExprNegation": --- Original +++ New @@ @@ } elseif ($statement instanceof SetStatement) { $flags->queryType = StatementType::Set; } - if ($statement instanceof SelectStatement || $statement instanceof UpdateStatement || $statement instanceof DeleteStatement) { + if (!$statement instanceof SelectStatement || !$statement instanceof UpdateStatement || !$statement instanceof DeleteStatement) { if (!empty($statement->limit)) { $flags->limit = true; }
Mutation tests with PHP 8.1: src/Utils/Query.php#L215
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ } elseif ($statement instanceof SetStatement) { $flags->queryType = StatementType::Set; } - if ($statement instanceof SelectStatement || $statement instanceof UpdateStatement || $statement instanceof DeleteStatement) { + if ($statement instanceof SelectStatement || true || $statement instanceof DeleteStatement) { if (!empty($statement->limit)) { $flags->limit = true; }
Mutation tests with PHP 8.1: src/Utils/Query.php#L215
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ } elseif ($statement instanceof SetStatement) { $flags->queryType = StatementType::Set; } - if ($statement instanceof SelectStatement || $statement instanceof UpdateStatement || $statement instanceof DeleteStatement) { + if ($statement instanceof SelectStatement || false || $statement instanceof DeleteStatement) { if (!empty($statement->limit)) { $flags->limit = true; }
Mutation tests with PHP 8.1: src/Utils/Query.php#L216
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ } elseif ($statement instanceof SetStatement) { $flags->queryType = StatementType::Set; } - if ($statement instanceof SelectStatement || $statement instanceof UpdateStatement || $statement instanceof DeleteStatement) { + if ($statement instanceof SelectStatement || $statement instanceof UpdateStatement || true) { if (!empty($statement->limit)) { $flags->limit = true; }
Mutation tests with PHP 8.1: src/Utils/Query.php#L216
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ } elseif ($statement instanceof SetStatement) { $flags->queryType = StatementType::Set; } - if ($statement instanceof SelectStatement || $statement instanceof UpdateStatement || $statement instanceof DeleteStatement) { + if ($statement instanceof SelectStatement || $statement instanceof UpdateStatement || false) { if (!empty($statement->limit)) { $flags->limit = true; }
Mutation tests with PHP 8.1: src/Utils/Query.php#L248
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ $flags = static::getFlags($statement); $selectTables = []; $selectExpressions = []; - if ($statement instanceof SelectStatement) { + if (true) { // Finding tables' aliases and their associated real names. $tableAliases = []; foreach ($statement->from as $expr) {
Mutation tests with PHP 8.1: src/Utils/Query.php#L252
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ // Finding tables' aliases and their associated real names. $tableAliases = []; foreach ($statement->from as $expr) { - if (!isset($expr->table, $expr->alias) || $expr->table === '' || $expr->alias === '') { + if (!isset($expr->table, $expr->alias) && $expr->table === '' || $expr->alias === '') { continue; } $tableAliases[$expr->alias] = [$expr->table, $expr->database ?? null];
Mutation tests with PHP 8.1: src/Utils/Query.php#L252
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ // Finding tables' aliases and their associated real names. $tableAliases = []; foreach ($statement->from as $expr) { - if (!isset($expr->table, $expr->alias) || $expr->table === '' || $expr->alias === '') { + if ((!isset($expr->table, $expr->alias) || $expr->table === '') && $expr->alias === '') { continue; } $tableAliases[$expr->alias] = [$expr->table, $expr->database ?? null];
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/