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