| Conditions | 5 |
| Paths | 5 |
| Total Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5.1158 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 1 | public function process(ContainerBuilder $container) |
|
| 25 | { |
||
| 26 | 1 | $plugins = $container->getParameter('eccube.plugins.disabled'); |
|
| 27 | |||
| 28 | 1 | if (empty($plugins)) { |
|
| 29 | $container->log($this, 'disabled plugins not found.'); |
||
| 30 | |||
| 31 | return; |
||
| 32 | } |
||
| 33 | |||
| 34 | 1 | $definitions = $container->getDefinitions(); |
|
| 35 | |||
| 36 | 1 | foreach ($definitions as $definition) { |
|
| 37 | 1 | $class = $definition->getClass(); |
|
| 38 | |||
| 39 | 1 | foreach ($plugins as $plugin) { |
|
| 40 | 1 | $namespace = 'Plugin\\'.$plugin; |
|
| 41 | |||
| 42 | 1 | if (false !== \strpos($class, $namespace)) { |
|
| 43 | 1 | $definition->clearTags(); |
|
| 44 | } |
||
| 45 | } |
||
| 46 | } |
||
| 47 | } |
||
| 48 | } |
||
| 49 |