| Conditions | 6 |
| Paths | 5 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 6 | public function aliasHelper(string $alias): void |
|
| 24 | { |
||
| 25 | 6 | if (!($this instanceof AliasInterface)) { |
|
| 26 | 1 | throw RegisterException::noAlias(); |
|
| 27 | } |
||
| 28 | 5 | if (!$alias) { |
|
| 29 | 1 | throw RegisterException::blank(); |
|
| 30 | } |
||
| 31 | 4 | if ($this instanceof ContainerAwareInterface && $this->isBound()) { |
|
| 32 | 1 | if (!$this->getManager()->isRegistered($alias)) { |
|
| 33 | 1 | $this->getManager()->register($this, $alias); |
|
| 34 | } |
||
| 46 |