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