Total Complexity | 4 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | final class NameFactory |
||
21 | { |
||
22 | /** |
||
23 | * @param string|string[]|Name|null $name1 |
||
24 | * @param string|string[]|Name|null $name2 |
||
25 | */ |
||
26 | public static function concat($name1, $name2, array $attributes = []): Name |
||
27 | { |
||
28 | if (null === $name1 && null === $name2) { |
||
29 | throw new InvalidArgumentException('Expected one of the names to not be null'); |
||
30 | } |
||
31 | |||
32 | return Name::concat($name1, $name2, $attributes); |
||
|
|||
33 | } |
||
34 | |||
35 | private function __construct() |
||
37 | } |
||
38 | } |
||
39 |