admissionAge::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Rules;
4
5
use Illuminate\Contracts\Validation\Rule;
6
7
class admissionAge implements Rule
8
{
9
    /**
10
     * Create a new rule instance.
11
     *
12
     * @return void
13
     */
14
    public function __construct()
15
    {
16
        //
17
    }
18
19
    /**
20
     * Determine if the validation rule passes.
21
     *
22
     * @param  string  $attribute
23
     * @param  mixed  $value
24
     * @return bool
25
     */
26
    public function passes($attribute, $value)
27
    {
28
        dd($value);
29
        //
30
    }
31
32
    /**
33
     * Get the validation error message.
34
     *
35
     * @return string
36
     */
37
    public function message()
38
    {
39
        return 'The student must be in the age of admission to this class';
40
    }
41
}
42