Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public static function fromUdb3ModelCategory(Udb3ModelCategory $category): Theme |
||
23 | { |
||
24 | $label = $category->getLabel(); |
||
25 | |||
26 | if (is_null($label)) { |
||
27 | throw new InvalidArgumentException('Category label is required.'); |
||
28 | } |
||
29 | |||
30 | return new self( |
||
31 | $category->getId()->toString(), |
||
32 | $label->toString() |
||
33 | ); |
||
34 | } |
||
35 | } |
||
36 |