Total Complexity | 3 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class QueryOrModelCaller |
||
9 | { |
||
10 | /** |
||
11 | * @var CachedBuilder |
||
12 | */ |
||
13 | protected $query; |
||
14 | /** |
||
15 | * @var Model |
||
16 | */ |
||
17 | protected $model; |
||
18 | /** |
||
19 | * @var bool |
||
20 | */ |
||
21 | protected $disableInConfig; |
||
22 | |||
23 | /** |
||
24 | * QueryOrModelCaller constructor. |
||
25 | * |
||
26 | * @param EloquentBuilder $query |
||
27 | * @param Model $model |
||
28 | * @param bool $disableInConfig |
||
29 | */ |
||
30 | public function __construct(EloquentBuilder $query, Model $model, bool $disableInConfig) |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param $name |
||
39 | * @param $arguments |
||
40 | * |
||
41 | * @return mixed |
||
42 | */ |
||
43 | public function __call($name, $arguments) |
||
55 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.