| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | private function configureBundleDirs(InputInterface $input, Configuration $config): void |
||
| 21 | { |
||
| 22 | if ($bundleName = $input->getOption('bundle')) { |
||
| 23 | if (0 === \strpos($bundleName, '@')) { |
||
| 24 | if (false === $pos = \strpos($bundleName, '/')) { |
||
| 25 | $bundleName = \substr($bundleName, 1); |
||
| 26 | } else { |
||
| 27 | $bundleName = \substr($bundleName, 1, $pos - 2); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | /** @var Bundle $bundle */ |
||
| 32 | $bundle = $this->getApplication() |
||
|
|
|||
| 33 | ->getKernel() |
||
| 34 | ->getBundle($bundleName) |
||
| 35 | ; |
||
| 36 | |||
| 37 | $config->reconfigureBundleDirs($bundle->getPath(), $bundle->getPath().'/Resources/translations'); |
||
| 38 | } |
||
| 41 |