1 | <?php |
||
20 | abstract class AbstractNumericNode extends ScalarNode |
||
21 | { |
||
22 | use MinMaxValueValidatorTrait; |
||
23 | |||
24 | /** |
||
25 | * @var int|float|double |
||
26 | */ |
||
27 | protected $min; |
||
28 | |||
29 | /** |
||
30 | * @var int|float|double |
||
31 | */ |
||
32 | protected $max; |
||
33 | |||
34 | /** |
||
35 | * Constructor. |
||
36 | * |
||
37 | * @param string $name |
||
38 | * @param NodeInterface|null $parent |
||
39 | * @param int|float|double|null $min |
||
40 | * @param int|float|double|null $max |
||
41 | */ |
||
42 | public function __construct($name, NodeInterface $parent = null, $min = null, $max = null) |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | protected function finalizeValue($value) |
||
59 | |||
60 | /** |
||
61 | * Assert that min or max value is valid. |
||
62 | * |
||
63 | * @param string $type |
||
64 | * @param string $label |
||
65 | * @param int|float $value |
||
66 | * |
||
67 | * @throws InvalidConfigurationException |
||
68 | */ |
||
69 | private function assertValidValue($type, $label, $value) |
||
84 | } |
||
85 |