| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 60 | private function __construct(string $type) |
||
| 61 | { |
||
| 62 | if (!\in_array($type, [self::TYPE_ALERT, self::TYPE_BACKGROUND], true)) { |
||
| 63 | throw new \InvalidArgumentException(\sprintf( |
||
| 64 | 'Invalid priority "%d". Can be "%s" or "%s".', |
||
| 65 | $type, |
||
| 66 | self::TYPE_BACKGROUND, |
||
| 67 | self::TYPE_ALERT |
||
| 68 | )); |
||
| 69 | } |
||
| 70 | |||
| 71 | $this->value = $type; |
||
| 72 | } |
||
| 73 | } |
||
| 74 |