Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Salah3id\Domains\Validator; |
||
35 | public function passes($action = null) |
||
36 | { |
||
37 | $rules = $this->getRules($action); |
||
38 | $messages = $this->getMessages(); |
||
39 | $attributes = $this->getAttributes(); |
||
40 | $validator = $this->validator->make($this->data, $rules, $messages, $attributes); |
||
41 | |||
42 | if ($validator->fails()) { |
||
43 | $this->errors = $validator->messages(); |
||
44 | return false; |
||
45 | } |
||
46 | |||
47 | return true; |
||
48 | } |
||
50 |
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.