| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function __construct($identifierOrReference) |
||
| 28 | { |
||
| 29 | if ((bool) preg_match('/^__(?P<container_identifier>.+?)__\.(?P<service_identifier>.++)$/', (string) $identifierOrReference, $matches)) { |
||
| 30 | $this->containerIdentifier = $matches['container_identifier']; |
||
| 31 | $this->serviceIdentifier = $matches['service_identifier']; |
||
| 32 | } |
||
| 33 | |||
| 34 | if (null === $this->containerIdentifier || null === $this->serviceIdentifier) { |
||
| 35 | throw new \InvalidArgumentException(sprintf( |
||
| 36 | 'Given argument "%s" is not an external reference.', |
||
| 37 | $identifierOrReference |
||
| 38 | )); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 74 |