Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
28 | 18 | public function passes($attribute, $value): bool |
|
29 | { |
||
30 | 18 | $this->attribute = $attribute; |
|
31 | |||
32 | 18 | $value = array_filter($value); |
|
33 | |||
34 | 18 | $this->modelIds = array_unique($value); |
|
35 | |||
36 | 18 | $modelCount = $this->modelClassName::whereIn($this->modelAttribute, $this->modelIds)->count(); |
|
|
|||
37 | |||
38 | 18 | return count($this->modelIds) === $modelCount; |
|
39 | } |
||
40 | |||
55 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.