composer package updates
[openemr.git] / vendor / adldap2 / adldap2 / src / Configuration / Validators / BooleanValidator.php
blobe89acd61e9631f62df35da9dd3f92c116741c071
1 <?php
3 namespace Adldap\Configuration\Validators;
5 use Adldap\Configuration\ConfigurationException;
7 /**
8 * Class BooleanValidator
10 * Validates that the configuration value is a boolean.
12 * @package Adldap\Configuration\Validators
14 class BooleanValidator extends Validator
16 /**
17 * {@inheritdoc}
19 public function validate()
21 if (!is_bool($this->value)) {
22 throw new ConfigurationException("Option {$this->key} must be a boolean.");
25 return true;