Skip to content

Commit

Permalink
Remove Ignored error pattern @ DataGrid.php
Browse files Browse the repository at this point in the history
  • Loading branch information
radimvaculik authored and f3l1x committed Dec 26, 2022
1 parent 932a097 commit 1b0ff6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
5 changes: 0 additions & 5 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ includes:

parameters:
level: 8
phpVersion: 70200

paths:
- src
Expand All @@ -21,10 +20,6 @@ parameters:
message: '/^Instanceof between Ublaboo\\DataGrid\\Filter\\Filter and Ublaboo\\DataGrid\\Filter\\FilterDateRange will always evaluate to false\.$/'
count: 1
path: src/DataGrid.php
-
message: "/^Cannot access offset 'submit' on Nette\\\\ComponentModel\\\\IComponent\\.$/"
count: 3
path: src/DataGrid.php
-
message: '/^Class dibi referenced with incorrect case\: Dibi\.$/'
count: 1
Expand Down
9 changes: 2 additions & 7 deletions src/DataSource/DoctrineCollectionDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(Collection $collection, string $primaryKey)

public function getCount(): int
{
return $this->getFilteredCollection()->count();
return $this->dataSource->matching($this->criteria)->count();
}


Expand All @@ -68,7 +68,7 @@ public function getCount(): int
*/
public function getData(): array
{
return $this->getFilteredCollection()->toArray();
return $this->dataSource->matching($this->criteria)->toArray();
}


Expand Down Expand Up @@ -248,9 +248,4 @@ protected function applyFilterSelect(FilterSelect $filter): void
}
}


private function getFilteredCollection(): Collection
{
return $this->dataSource->matching($this->criteria);
}
}

0 comments on commit 1b0ff6a

Please sign in to comment.