Skip to content

Commit ab91aad

Browse files
committed
Merge branch 'master' of https://github.com/contributte/datagrid
2 parents 1a72233 + dd37e31 commit ab91aad

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- cron: "0 8 * * 1" # At 08:00 on Monday
1212

1313
env:
14-
extensions: "json"
14+
extensions: "json, mysqli, pdo_sqlite"
1515
cache-version: "1"
1616
composer-version: "v2"
1717
composer-install: "composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-stable"

phpstan.neon

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,3 @@ parameters:
3737
message: '/^Instanceof between Dibi\\Result and Dibi\\Result will always evaluate to true\.$/'
3838
count: 1
3939
path: src/DataSource/DibiFluentMssqlDataSource.php
40-
-
41-
message: '/^Parameter #2 \$offset of method Nette\\Database\\Table\\Selection::limit\(\) expects int<0, max>\|null, int given\.$/'
42-
count: 1
43-
path: src/DataSource/NetteDatabaseTableDataSource.php
44-
-
45-
message: '/^Parameter #1 \$limit of method Nette\\Database\\Table\\Selection::limit\(\) expects int<0, max>\|null, int given\.$/'
46-
count: 1
47-
path: src/DataSource/NetteDatabaseTableDataSource.php

src/DataSource/IDataSource.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public function filterOne(array $condition): self;
3737
/**
3838
* Apply limit and offset on data
3939
*
40+
* @phpstan-param positive-int|0 $offset
41+
* @phpstan-param positive-int|0 $limit
4042
* @return static
4143
*/
4244
public function limit(int $offset, int $limit): self;

src/DataSource/NetteDatabaseTableDataSource.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ public function filterOne(array $condition): IDataSource
100100
}
101101

102102

103+
/**
104+
* @phpstan-param positive-int|0 $offset
105+
* @phpstan-param positive-int|0 $limit
106+
*/
103107
public function limit(int $offset, int $limit): IDataSource
104108
{
105109
$this->data = $this->dataSource->limit($limit, $offset)->fetchAll();

0 commit comments

Comments
 (0)