Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
8 | class ContainsObjectWithRelationRule implements Rule |
||
9 | { |
||
10 | |||
11 | protected $validator; |
||
12 | |||
13 | /** |
||
14 | * Create a new rule instance. |
||
15 | * |
||
16 | * @param App\Models\Applicant $applicant |
||
17 | * @param string $relation |
||
18 | * @return void |
||
19 | */ |
||
20 | public function __construct($validator) |
||
21 | { |
||
22 | $this->validator = $validator; |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * This check passes if the $value is a collection which contains an object |
||
27 | * with a relationName relation equal to relationValue |
||
28 | * @param [type] $attribute [description] |
||
29 | * @param [type] $value [description] |
||
30 | * @return boolean [description] |
||
31 | */ |
||
32 | public function passes($attribute, $value) |
||
36 | }); |
||
37 | } |
||
38 | |||
39 | public function message() |
||
42 | } |
||
43 | } |
||
44 |