Small fixes #476
Annotations
10 warnings
mutation / PHP 8.2-ubuntu-latest:
src/BaseListView.php#L268
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#L346
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#L366
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
return $dataReader;
}
}
- if ($dataReader->isPaginationRequired()) {
+ if (!$dataReader->isPaginationRequired()) {
if ($pageSize !== null) {
$dataReader = $dataReader->withPageSize((int) $pageSize);
}
|
mutation / PHP 8.2-ubuntu-latest:
src/BaseListView.php#L378
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#L390
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#L390
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#L390
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#L679
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
// The page number (1-based) current being displayed
$currentPage = $dataReader->getCurrentPage();
// The starting row number (1-based) currently being displayed
- $begin = ($currentPage - 1) * $dataReader->getPageSize() + 1;
+ $begin = ($currentPage - 0) * $dataReader->getPageSize() + 1;
// The number of rows currently being displayed
$count = $dataReader->getCurrentPageSize();
// The ending row number (1-based) currently being displayed
|
mutation / PHP 8.2-ubuntu-latest:
src/BaseListView.php#L679
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
// The page number (1-based) current being displayed
$currentPage = $dataReader->getCurrentPage();
// The starting row number (1-based) currently being displayed
- $begin = ($currentPage - 1) * $dataReader->getPageSize() + 1;
+ $begin = ($currentPage - 2) * $dataReader->getPageSize() + 1;
// The number of rows currently being displayed
$count = $dataReader->getCurrentPageSize();
// The ending row number (1-based) currently being displayed
|
mutation / PHP 8.2-ubuntu-latest:
src/BaseListView.php#L679
Escaped Mutant for Mutator "Minus":
--- Original
+++ New
@@ @@
// The page number (1-based) current being displayed
$currentPage = $dataReader->getCurrentPage();
// The starting row number (1-based) currently being displayed
- $begin = ($currentPage - 1) * $dataReader->getPageSize() + 1;
+ $begin = ($currentPage + 1) * $dataReader->getPageSize() + 1;
// The number of rows currently being displayed
$count = $dataReader->getCurrentPageSize();
// The ending row number (1-based) currently being displayed
|