Skip to content

Fix #218: Add ability to set page size #562

Fix #218: Add ability to set page size

Fix #218: Add ability to set page size #562

Triggered via pull request November 22, 2024 12:22
Status Success
Total duration 2m 38s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L311
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ * * @psalm-return list{FilterInterface[]|null,ValidationResult} */ - protected function makeFilters() : array + private function makeFilters() : array { return [[], new ValidationResult()]; }
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L389
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ { $dataReader = $this->getDataReader(); if (!$dataReader instanceof PaginatorInterface) { - if ($dataReader instanceof OffsetableDataInterface && $dataReader instanceof CountableDataInterface && $dataReader instanceof LimitableDataInterface) { + if (($dataReader instanceof OffsetableDataInterface || $dataReader instanceof CountableDataInterface) && $dataReader instanceof LimitableDataInterface) { $dataReader = new OffsetPaginator($dataReader); } elseif ($dataReader instanceof FilterableDataInterface && $dataReader instanceof SortableDataInterface && $dataReader instanceof LimitableDataInterface) { if ($dataReader->getSort() !== null) {
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L409
Escaped Mutant for Mutator "IfNegation": --- Original +++ New @@ @@ return $dataReader; } } - if ($dataReader->isPaginationRequired()) { + if (!$dataReader->isPaginationRequired()) { $dataReader = $dataReader->withPageSize($this->preparePageSize($pageSize) ?? $this->getDefaultPageSize()); if ($page !== null) { $dataReader = $dataReader->withToken(PageToken::next($page));
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L421
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation": --- Original +++ New @@ @@ $dataReader = $dataReader->withToken(PageToken::previous($previousPage)); } } - if (!empty($sort) && $dataReader->isSortable()) { + if (!empty($sort) && !$dataReader->isSortable()) { $sortObject = $dataReader->getSort(); if ($sortObject !== null) { $order = OrderHelper::stringToArray($sort);
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L433
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ $dataReader = $dataReader->withSort($sortObject->withOrder($order)); } } - if (!empty($filters) && $dataReader->isFilterable()) { + if (!empty($filters) || $dataReader->isFilterable()) { $dataReader = $dataReader->withFilter(new All(...$filters)); } return $dataReader;
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L433
Escaped Mutant for Mutator "LogicalAndNegation": --- Original +++ New @@ @@ $dataReader = $dataReader->withSort($sortObject->withOrder($order)); } } - if (!empty($filters) && $dataReader->isFilterable()) { + if (!(!empty($filters) && $dataReader->isFilterable())) { $dataReader = $dataReader->withFilter(new All(...$filters)); } return $dataReader;
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L433
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation": --- Original +++ New @@ @@ $dataReader = $dataReader->withSort($sortObject->withOrder($order)); } } - if (!empty($filters) && $dataReader->isFilterable()) { + if (!empty($filters) && !$dataReader->isFilterable()) { $dataReader = $dataReader->withFilter(new All(...$filters)); } return $dataReader;
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L568
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function offsetPaginationConfig(array $config) : static { - $new = clone $this; + $new = $this; $new->offsetPaginationConfig = $config; return $new; }
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L581
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function keysetPaginationConfig(array $config) : static { - $new = clone $this; + $new = $this; $new->keysetPaginationConfig = $config; return $new; }
mutation / PHP 8.2-ubuntu-latest: src/BaseListView.php#L774
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ * * @psalm-return array<string, string> */ - protected function getOverrideOrderFields() : array + private function getOverrideOrderFields() : array { return []; }