Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.8437 |
Changes | 0 |
1 | <?php |
||
24 | 5 | public function __construct(...$identifier) { |
|
25 | 5 | if (empty($identifier) || empty($identifier[0])) { |
|
26 | throw new \InvalidArgumentException("The identifier is empty.", 500); |
||
27 | } |
||
28 | 5 | if (count($identifier) === 1) { |
|
29 | $this->parts = explode('.', $identifier[0]); |
||
30 | } else { |
||
31 | 5 | $this->parts = $identifier; |
|
32 | } |
||
33 | 5 | } |
|
34 | |||
54 |