|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace hiqdev\billing\hiapi\bill\Search; |
|
4
|
|
|
|
|
5
|
|
|
use hiapi\commands\Search\Filter\Type\IntegerFilter; |
|
|
|
|
|
|
6
|
|
|
use hiapi\commands\SearchCommand; |
|
7
|
|
|
use hiqdev\billing\hiapi\models\Bill as BillModel; |
|
8
|
|
|
use hiapi\commands\Search\Filter\Type\GenericFilter as Filter; |
|
|
|
|
|
|
9
|
|
|
use hiqdev\billing\hiapi\models\Customer; |
|
10
|
|
|
use hiqdev\billing\hiapi\models\Money; |
|
11
|
|
|
use hiqdev\billing\hiapi\models\Plan; |
|
12
|
|
|
use hiqdev\billing\hiapi\models\Quantity; |
|
13
|
|
|
use hiqdev\billing\hiapi\models\Target; |
|
14
|
|
|
use hiqdev\billing\hiapi\models\Type; |
|
15
|
|
|
use hiqdev\yii\DataMapper\query\attributes\DateTimeAttribute; |
|
16
|
|
|
use hiqdev\yii\DataMapper\query\attributes\IntegerAttribute; |
|
17
|
|
|
use hiqdev\yii\DataMapper\validators\WhereValidator; |
|
|
|
|
|
|
18
|
|
|
|
|
19
|
|
|
class BillSearchCommand extends SearchCommand |
|
20
|
|
|
{ |
|
21
|
|
|
public function getEntityClass(): string |
|
22
|
|
|
{ |
|
23
|
|
|
return Bill::class; |
|
24
|
|
|
} |
|
25
|
|
|
|
|
26
|
|
|
public function filters() |
|
27
|
|
|
{ |
|
28
|
|
|
$filters = new FiltersCollection(); |
|
|
|
|
|
|
29
|
|
|
$filters->addMultiple( |
|
30
|
|
|
// Probably good. Except too many boilerplate classes and imperative code style |
|
31
|
|
|
new IntegerFilter('id'), |
|
32
|
|
|
// Also may be good, but harder to extend |
|
33
|
|
|
Filter::integer('seller_id'), |
|
34
|
|
|
// Would not go this way |
|
35
|
|
|
['client_id', Filter::INTEGER], |
|
36
|
|
|
|
|
37
|
|
|
// new IntegerFilter('object_id'), |
|
38
|
|
|
// new RefFilter('type'), |
|
39
|
|
|
// new MoneyFilter('sum'), |
|
40
|
|
|
// new DateTimeFilter('time') |
|
41
|
|
|
); |
|
42
|
|
|
} |
|
43
|
|
|
} |
|
44
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths