| Conditions | 5 |
| Paths | 7 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 30 | public function getContainerExtension() |
||
| 31 | { |
||
| 32 | if (null === $this->extension) { |
||
| 33 | $class = $this->getContainerExtensionClass(); |
||
| 34 | |||
| 35 | if (class_exists($class)) { |
||
| 36 | $extension = new $class(); |
||
| 37 | |||
| 38 | if (!$extension instanceof ExtensionInterface) { |
||
| 39 | throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', $class)); |
||
| 40 | } |
||
| 41 | $this->extension = $extension; |
||
| 42 | } else { |
||
| 43 | $this->extension = false; |
||
| 44 | } |
||
| 45 | } |
||
| 46 | if ($this->extension) { |
||
| 47 | return $this->extension; |
||
| 48 | } |
||
| 49 | } |
||
| 50 | } |
||
| 51 |