| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function __construct(?string $platform = null) |
||
| 26 | { |
||
| 27 | if ($platform === null) { |
||
| 28 | $platform = self::getCurrentPlatform(); |
||
| 29 | } else { |
||
| 30 | if (in_array(mb_strtoupper($platform), self::SUPPORTED_PLATFORMS, true)) { |
||
| 31 | throw new \InvalidArgumentException(sprintf( |
||
| 32 | 'Platform \'%s\' is not supported', |
||
| 33 | $platform |
||
| 34 | )); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | $this->platform = mb_strtoupper($platform); |
||
| 38 | } |
||
| 58 |