Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | <?php |
2 | |||||
3 | namespace LdapRecord\Configuration\Validators; | ||||
4 | |||||
5 | class BooleanValidator extends Validator | ||||
6 | { | ||||
7 | /** | ||||
8 | * The validation exception message. | ||||
9 | * | ||||
10 | * @var string | ||||
11 | */ | ||||
12 | protected $message = 'Option [:option] must be a boolean.'; | ||||
13 | |||||
14 | /** | ||||
15 | * @inheritdoc | ||||
16 | */ | ||||
17 | public function passes() | ||||
18 | { | ||||
19 | return is_bool($this->value); | ||||
20 | } | ||||
21 | } |