ikoene /
symfony-micro
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; |
||
| 4 | use Symfony\Component\Config\Loader\LoaderInterface; |
||
| 5 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
| 6 | use Symfony\Component\HttpKernel\Kernel; |
||
| 7 | use Symfony\Component\Routing\RouteCollectionBuilder; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @author Koen Vinken <[email protected]> |
||
| 11 | */ |
||
| 12 | class MicroKernel extends Kernel |
||
| 13 | { |
||
| 14 | use MicroKernelTrait; |
||
| 15 | |||
| 16 | /* |
||
| 17 | * {@inheritDoc} |
||
| 18 | */ |
||
| 19 | public function registerBundles() |
||
| 20 | { |
||
| 21 | $bundles = array( |
||
| 22 | new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), |
||
| 23 | new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), |
||
| 24 | new Symfony\Bundle\TwigBundle\TwigBundle(), |
||
| 25 | new AppBundle\AppBundle(), |
||
| 26 | ); |
||
| 27 | |||
| 28 | if (in_array($this->getEnvironment(), array('dev', 'test'), true)) { |
||
| 29 | $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); |
||
| 30 | $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); |
||
| 31 | } |
||
| 32 | |||
| 33 | return $bundles; |
||
| 34 | } |
||
| 35 | |||
| 36 | /* |
||
| 37 | * {@inheritDoc} |
||
| 38 | */ |
||
| 39 | protected function configureRoutes(RouteCollectionBuilder $routes) |
||
| 40 | { |
||
| 41 | if (in_array($this->getEnvironment(), array('dev', 'test'), true)) { |
||
| 42 | $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt'); |
||
| 43 | $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler'); |
||
| 44 | } |
||
| 45 | |||
| 46 | $routes->import('@AppBundle/Controller', '/', 'annotation'); |
||
| 47 | } |
||
| 48 | |||
| 49 | /* |
||
| 50 | * {@inheritDoc} |
||
| 51 | */ |
||
| 52 | protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader) |
||
|
0 ignored issues
–
show
|
|||
| 53 | { |
||
| 54 | $loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml'); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.