| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 13 | public function parse($value, Presentation $presentation) |
||
| 14 | { |
||
| 15 | if (!is_string($value)) { |
||
| 16 | throw new ConfigException('License must be a string.'); |
||
| 17 | } |
||
| 18 | |||
| 19 | if (empty($value)) { |
||
| 20 | throw new ConfigException('License must not be empty.'); |
||
| 21 | } |
||
| 22 | |||
| 23 | $presentation->license = $value; |
||
| 24 | } |
||
| 25 | } |
||
| 26 |