blob: ec5bdb0c270bb27d21fd28d5121f3fbf3010cdb8 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Adldap\Configuration\Validators;
4
5use Adldap\Configuration\ConfigurationException;
6
7/**
8 * Class ArrayValidator.
9 *
10 * Validates that the configuration value is an array.
11 */
12class ArrayValidator extends Validator
13{
14 /**
15 * {@inheritdoc}
16 */
17 public function validate()
18 {
19 if (!is_array($this->value)) {
20 throw new ConfigurationException("Option {$this->key} must be an array.");
21 }
22
23 return true;
24 }
25}