| Total Complexity | 5 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Extension |
||
| 8 | { |
||
| 9 | protected $ext; |
||
| 10 | |||
| 11 | public function __construct($type) |
||
| 12 | { |
||
| 13 | $className = 'Sludio\\HelperBundle\\DependencyInjection\\Component\\'.ucfirst($type); |
||
| 14 | $this->setExt(class_exists($className) ? new $className() : null); |
||
| 15 | } |
||
| 16 | |||
| 17 | public function configure(ContainerBuilder &$container) |
||
| 18 | { |
||
| 19 | return $this->getExtension()->configure($container); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function getExtension() |
||
| 23 | { |
||
| 24 | return $this->ext; |
||
| 25 | } |
||
| 26 | |||
| 27 | function setExt($ext) |
||
| 30 | } |
||
| 31 | } |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.