| 1 | <?php |
||
| 17 | trait MinMaxValueValidatorTrait |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Check if min or max value is valid. |
||
| 21 | * |
||
| 22 | * @param string $type (min|max) |
||
| 23 | * @param int|float $value |
||
| 24 | * @param string $operator |
||
| 25 | * |
||
| 26 | * @return bool |
||
| 27 | */ |
||
| 28 | protected function isValid($type, $value, $operator = null) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $type (min|max) |
||
| 41 | * @param int|float $value |
||
| 42 | * @param string $operator |
||
| 43 | * |
||
| 44 | * @return bool |
||
| 45 | */ |
||
| 46 | private function compute($operator, $type, $value) |
||
| 57 | } |
||
| 58 |