| 1 | <?php |
||
| 18 | class Timezone implements Rule |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Create a new rule instance. |
||
| 22 | * |
||
| 23 | * @return void |
||
|
|
|||
| 24 | */ |
||
| 25 | public function __construct() |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Determine if the validation rule passes. |
||
| 32 | * |
||
| 33 | * @param string $attribute |
||
| 34 | * @param mixed $value |
||
| 35 | * @return bool |
||
| 36 | */ |
||
| 37 | public function passes($attribute, $value) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Get the validation error message. |
||
| 44 | * |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function message() |
||
| 51 | } |
||
| 52 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.