| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 6 | public function __construct($valueOrValues) |
|
| 34 | { |
||
| 35 | 6 | parent::__construct($valueOrValues); |
|
| 36 | |||
| 37 | 6 | if (!array_key_exists('value', $valueOrValues) || $valueOrValues['value'] === '') { |
|
| 38 | 1 | throw new \InvalidArgumentException('@Route annotation should have value'); |
|
| 39 | } |
||
| 40 | |||
| 41 | // Set data |
||
| 42 | 5 | $this->path = $valueOrValues['value'] ?? null; |
|
| 43 | 5 | $this->identifier = $valueOrValues['name'] ?? uniqid(__CLASS__, true); |
|
| 44 | 5 | } |
|
| 45 | |||
| 62 |