Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php namespace Salah3id\Domains\Validator; |
||
10 | class LaravelValidator extends AbstractValidator |
||
11 | { |
||
12 | /** |
||
13 | * Validator |
||
14 | * |
||
15 | * @var \Illuminate\Validation\Factory |
||
16 | */ |
||
17 | protected $validator; |
||
18 | |||
19 | /** |
||
20 | * Construct |
||
21 | * |
||
22 | * @param \Illuminate\Contracts\Validation\Factory $validator |
||
23 | */ |
||
24 | public function __construct(Factory $validator) |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Pass the data and the rules to the validator |
||
31 | * |
||
32 | * @param string $action |
||
33 | * @return bool |
||
34 | */ |
||
35 | public function passes($action = null) |
||
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.