| Total Complexity | 2 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | trait AssertZoomFactorTrait |
||
| 26 | { |
||
| 27 | use ValueToStringTrait; |
||
| 28 | use AssertRangeTrait; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Minimum zoom factor |
||
| 32 | * |
||
| 33 | * @var int |
||
| 34 | */ |
||
| 35 | private static int $zoomFactorMin = 1; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Maximum zoom factor |
||
| 39 | * |
||
| 40 | * @var int |
||
| 41 | */ |
||
| 42 | private static int $zoomFactorMax = 400; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Check value is a valid zoom factor |
||
| 46 | * |
||
| 47 | * @param int $value |
||
| 48 | * @param string $message |
||
| 49 | * |
||
| 50 | * @return void |
||
| 51 | * @throws InvalidArgumentException |
||
| 52 | */ |
||
| 53 | 18 | public static function assertZoomFactor(int $value, string $message = ''): void |
|
| 66 |