1 | <?php |
||
8 | class LeapYearValidator implements ValidatorInterface |
||
9 | { |
||
10 | use ValidIntegerValidator; |
||
11 | |||
12 | /** @var int */ |
||
13 | protected $year; |
||
14 | |||
15 | /** |
||
16 | * Leap Year Validator constructor. |
||
17 | * |
||
18 | * @param $year int the year |
||
19 | */ |
||
20 | 77 | public function __construct($year) |
|
24 | |||
25 | /** |
||
26 | * @return bool true if valid |
||
27 | */ |
||
28 | 77 | public function isValid() |
|
34 | |||
35 | /** |
||
36 | * @param $year int |
||
37 | * |
||
38 | * @return bool true if valid |
||
39 | */ |
||
40 | 77 | protected function isValidLeapYear($year) |
|
44 | } |
||
45 |