| Total Complexity | 4 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Number extends Field |
||
| 6 | { |
||
| 7 | /** @var int */ |
||
| 8 | protected $min = 0; |
||
| 9 | |||
| 10 | /** @var null|int */ |
||
| 11 | protected $max = null; |
||
| 12 | |||
| 13 | /** @var int|double */ |
||
| 14 | protected $step = 1; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param int $min |
||
| 18 | * @return $this |
||
| 19 | */ |
||
| 20 | public function min(int $min): self |
||
| 21 | { |
||
| 22 | $this->min = $min; |
||
| 23 | |||
| 24 | return $this; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param null|int $max |
||
| 29 | * @return $this |
||
| 30 | */ |
||
| 31 | public function max(?int $max): self |
||
| 32 | { |
||
| 33 | $this->max = $max; |
||
| 34 | |||
| 35 | return $this; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param float|int $step |
||
| 40 | * @return $this |
||
| 41 | */ |
||
| 42 | public function step($step): self |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | public function getAttributes(): array |
||
| 59 | ]; |
||
| 60 | } |
||
| 61 | } |
||
| 62 |