• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

contributte / datagrid / 8230157862

11 Mar 2024 09:02AM UTC coverage: 34.102%. First build
8230157862

Pull #1060

github

radimvaculik
Fix failing tests
Pull Request #1060: [7.x] Next

117 of 435 new or added lines in 54 files covered. (26.9%)

1124 of 3296 relevant lines covered (34.1%)

0.34 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/DataSource/DibiFluentPostgreDataSource.php
1
<?php declare(strict_types = 1);
2

3
namespace Contributte\Datagrid\DataSource;
4

5
use Contributte\Datagrid\Filter\FilterText;
6

7
class DibiFluentPostgreDataSource extends DibiFluentDataSource
8
{
9

10
        protected function applyFilterText(FilterText $filter): void
11
        {
12
                $condition = $filter->getCondition();
×
13
                $driver = $this->dataSource->getConnection()->getDriver();
×
14
                $or = [];
×
15

16
                foreach ($condition as $column => $value) {
×
17

18
                        $column = '[' . $column . ']';
×
19

20
                        if ($filter->isExactSearch()) {
×
NEW
21
                                $this->dataSource->where(sprintf('%s = %%s', $column), $value);
×
22

23
                                continue;
×
24
                        }
25

26
                        $words = $filter->hasSplitWordsSearch() === false ? [$value] : explode(' ', $value);
×
27

28
                        foreach ($words as $word) {
×
NEW
29
                                $or[] = $column . ' ILIKE ' . $driver->escapeText('%' . $word . '%');
×
30
                        }
31
                }
32

NEW
33
                if (count($or) > 1) {
×
34
                        $this->dataSource->where('(%or)', $or);
×
35
                } else {
36
                        $this->dataSource->where($or);
×
37
                }
38
        }
39

40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc