1 | <?php |
||
9 | class Criteria |
||
10 | { |
||
11 | use Concerns\BuildsQueries, |
||
12 | Concerns\QueriesRelationships, |
||
13 | Concerns\EloquentBuildsQueries, |
||
14 | Concerns\SoftDeletingScope; |
||
15 | |||
16 | /** |
||
17 | * $methods. |
||
18 | * |
||
19 | * @var \Recca0120\Repository\Method[] |
||
20 | */ |
||
21 | protected $methods = []; |
||
22 | |||
23 | /** |
||
24 | * Handle dynamic method calls into the method. |
||
25 | * |
||
26 | * @param string $method |
||
27 | * @param array $parameters |
||
28 | * @return mixed |
||
29 | * |
||
30 | * @throws \BadMethodCallException |
||
31 | */ |
||
32 | 1 | public function __call($method, $parameters) |
|
42 | |||
43 | /** |
||
44 | * create. |
||
45 | * |
||
46 | * @return static |
||
47 | */ |
||
48 | 101 | public static function create() |
|
52 | |||
53 | /** |
||
54 | * alias raw. |
||
55 | * |
||
56 | * @param mixed $value |
||
57 | * @return Expression |
||
58 | */ |
||
59 | 2 | public static function expr($value) |
|
63 | |||
64 | /** |
||
65 | * @param mixed $value |
||
66 | * @return \Recca0120\Repository\Expression |
||
67 | */ |
||
68 | 3 | public static function raw($value) |
|
72 | |||
73 | /** |
||
74 | * each. |
||
75 | * |
||
76 | * @param Closure $callback |
||
77 | * @return void |
||
78 | */ |
||
79 | 14 | public function each(Closure $callback) |
|
85 | |||
86 | /** |
||
87 | * toArray. |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | public function toArray() |
||
100 | } |
||
101 |
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: