1 | <?php |
||
10 | trait Aggregation |
||
11 | { |
||
12 | use Common; |
||
13 | use HasRelatedWith; |
||
14 | use HasPagination; |
||
15 | use HasJoinRelation; |
||
16 | |||
17 | private $field; |
||
18 | private $allowedMethods = [ |
||
19 | 'from', |
||
20 | 'join', |
||
21 | 'catJoin', |
||
22 | 'groupBy', |
||
23 | 'having', |
||
24 | 'orHaving', |
||
25 | 'orderBy', |
||
26 | 'catHaving', |
||
27 | 'where', |
||
28 | 'orWhere', |
||
29 | 'catWhere', |
||
30 | 'limit', |
||
31 | 'offset', |
||
32 | 'distinct', |
||
33 | 'forUpdate', |
||
34 | 'setFlag', |
||
35 | ]; |
||
36 | |||
37 | public function __construct(Table $table, string $field = 'id') |
||
53 | |||
54 | public function run() |
||
63 | } |
||
64 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: