Skip to content

Add support for nested aggregations #293

Add support for nested aggregations

Add support for nested aggregations #293

Triggered via pull request April 25, 2024 07:57
Status Success
Total duration 1m 34s
Artifacts

review.yml

on: pull_request
Matrix: fight-mutants
Fit to window
Zoom out
Zoom in

Annotations

15 warnings
Mutation Testing Code Review Annotations 8.3
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Mutation Testing Code Review Annotations 8.3
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Mutation Testing Code Review Annotations 8.3: src/Application/Results.php#L36
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations = []; foreach ($this->rawResults['aggregations'] as $name => $rawAggregation) { if (array_key_exists('doc_count', $rawAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawAggregation)); + $aggregations = $this->parseNestedAggregation($rawAggregation); continue; } $aggregations[] = new AggregationResult($name, $rawAggregation['buckets'] ?? $rawAggregation);
Mutation Testing Code Review Annotations 8.3: src/Application/Results.php#L61
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets']); } if (is_array($rawNestedAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawNestedAggregation)); + $aggregations = $aggregations; } } }
Mutation Testing Code Review Annotations 8.3: src/Application/Results.php#L66
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ } } } - return $aggregations; + return count($aggregations) > 1 ? array_slice($aggregations, 0, 1, true) : $aggregations; } }
Mutation Testing Code Review Annotations 8.2
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Mutation Testing Code Review Annotations 8.2
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Mutation Testing Code Review Annotations 8.2: src/Application/Results.php#L36
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations = []; foreach ($this->rawResults['aggregations'] as $name => $rawAggregation) { if (array_key_exists('doc_count', $rawAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawAggregation)); + $aggregations = $this->parseNestedAggregation($rawAggregation); continue; } $aggregations[] = new AggregationResult($name, $rawAggregation['buckets'] ?? $rawAggregation);
Mutation Testing Code Review Annotations 8.2: src/Application/Results.php#L61
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets']); } if (is_array($rawNestedAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawNestedAggregation)); + $aggregations = $aggregations; } } }
Mutation Testing Code Review Annotations 8.2: src/Application/Results.php#L66
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ } } } - return $aggregations; + return count($aggregations) > 1 ? array_slice($aggregations, 0, 1, true) : $aggregations; } }
Mutation Testing Code Review Annotations 8.1
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Mutation Testing Code Review Annotations 8.1
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Mutation Testing Code Review Annotations 8.1: src/Application/Results.php#L36
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations = []; foreach ($this->rawResults['aggregations'] as $name => $rawAggregation) { if (array_key_exists('doc_count', $rawAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawAggregation)); + $aggregations = $this->parseNestedAggregation($rawAggregation); continue; } $aggregations[] = new AggregationResult($name, $rawAggregation['buckets'] ?? $rawAggregation);
Mutation Testing Code Review Annotations 8.1: src/Application/Results.php#L61
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ $aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets']); } if (is_array($rawNestedAggregation)) { - $aggregations = array_merge($aggregations, $this->parseNestedAggregation($rawNestedAggregation)); + $aggregations = $aggregations; } } }
Mutation Testing Code Review Annotations 8.1: src/Application/Results.php#L66
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ } } } - return $aggregations; + return count($aggregations) > 1 ? array_slice($aggregations, 0, 1, true) : $aggregations; } }