Add support of yiisoft/view
version ^11
(#220)
#535
Annotations
10 warnings
Run roave infection.:
src/BaseListView.php#L274
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
*
* @psalm-return list{FilterInterface[]|null,ValidationResult}
*/
- protected function makeFilters() : array
+ private function makeFilters() : array
{
return [[], new ValidationResult()];
}
|
Run roave infection.:
src/BaseListView.php#L352
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) {
|
Run roave infection.:
src/BaseListView.php#L372
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
return $dataReader;
}
}
- if ($dataReader->isPaginationRequired()) {
+ if (!$dataReader->isPaginationRequired()) {
if ($pageSize !== null) {
$dataReader = $dataReader->withPageSize((int) $pageSize);
}
|
Run roave infection.:
src/BaseListView.php#L384
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);
|
Run roave infection.:
src/BaseListView.php#L396
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;
|
Run roave infection.:
src/BaseListView.php#L396
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;
|
Run roave infection.:
src/BaseListView.php#L396
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;
|
Run roave infection.:
src/BaseListView.php#L484
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function offsetPaginationConfig(array $config) : static
{
- $new = clone $this;
+ $new = $this;
$new->offsetPaginationConfig = $config;
return $new;
}
|
Run roave infection.:
src/BaseListView.php#L497
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function keysetPaginationConfig(array $config) : static
{
- $new = clone $this;
+ $new = $this;
$new->keysetPaginationConfig = $config;
return $new;
}
|
Run roave infection.:
src/BaseListView.php#L680
Escaped Mutant for Mutator "NotIdentical":
--- Original
+++ New
@@ @@
} else {
return '';
}
- if ($this->urlCreator !== null) {
+ if ($this->urlCreator === null) {
$pagination = $pagination->urlCreator($this->urlCreator);
}
return $pagination->defaultPageSize($this->getDefaultPageSize())->urlConfig($this->urlConfig)->render();
|
Loading