Total Complexity | 8 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
6 | trait FloatBase |
||
7 | { |
||
8 | /** |
||
9 | * @var float |
||
10 | */ |
||
11 | private $min = PHP_FLOAT_MIN; |
||
12 | |||
13 | /** |
||
14 | * @var float |
||
15 | */ |
||
16 | private $max = PHP_FLOAT_MAX; |
||
17 | |||
18 | public function between(float $min, float $max): self |
||
19 | { |
||
20 | $this->min = $min; |
||
21 | $this->max = $max; |
||
22 | |||
23 | return $this; |
||
24 | } |
||
25 | |||
26 | public function min(float $min): self |
||
27 | { |
||
28 | $this->min = $min; |
||
29 | |||
30 | return $this; |
||
31 | } |
||
32 | |||
33 | public function max(float $max): self |
||
38 | } |
||
39 | |||
40 | protected function validation($input, &$value): bool |
||
58 | } |
||
59 | } |
||
60 |