ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
CardinalDimension.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27{
28 public function __construct(array $value_labels = [])
29 {
30 $this->value_labels = $value_labels;
31 }
32
33 public function checkValue($value): void
34 {
35 if (!is_null($value) && !is_numeric($value)) {
36 throw new \InvalidArgumentException(
37 "Expected parameter to be numeric or null. '$value' is given."
38 );
39 }
40 }
41}