Completed
Push — master ( d81c19...f57266 )
by Kamil
20s
created

Bundle/InventoryBundle/test/app/AppKernel.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
/*
14
 * This file is part of the Sylius package.
15
 *
16
 * (c) Paweł Jędrzejewski
17
 *
18
 * For the full copyright and license information, please view the LICENSE
19
 * file that was distributed with this source code.
20
 */
21
22
use PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer;
23
use Symfony\Component\Config\Loader\LoaderInterface;
24
use Symfony\Component\HttpKernel\Kernel;
25
26
class AppKernel extends Kernel
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type AppKernel has been defined more than once; this definition is ignored, only the first definition in app/AppKernel.php (L16-38) is considered.

This check looks for classes that have been defined more than once.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
27
{
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function registerBundles(): array
32
    {
33
        return [
34
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
35
            new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
36
            new FOS\RestBundle\FOSRestBundle(),
37
            new JMS\SerializerBundle\JMSSerializerBundle($this),
38
            new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
39
            new Sylius\Bundle\InventoryBundle\SyliusInventoryBundle(),
40
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
41
            new Symfony\Bundle\TwigBundle\TwigBundle(),
42
        ];
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    public function registerContainerConfiguration(LoaderInterface $loader): void
49
    {
50
        $loader->load(__DIR__ . '/config/config.yml');
51
    }
52
53
    /**
54
     * {@inheritdoc}
55
     */
56
    protected function getContainerBaseClass(): string
57
    {
58
        if ('test' === $this->environment) {
59
            return MockerContainer::class;
60
        }
61
62
        return parent::getContainerBaseClass();
63
    }
64
}
65