These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Knp\Rad\FixturesLoad\Bundle; |
||
6 | |||
7 | use Knp\Rad\FixturesLoad\DependencyInjection\Compiler\FactorySwitcherPass; |
||
8 | use Knp\Rad\FixturesLoad\DependencyInjection\Compiler\ProcessorRegistrationPass; |
||
9 | use Knp\Rad\FixturesLoad\DependencyInjection\Compiler\ProviderRegistrationPass; |
||
10 | use Knp\Rad\FixturesLoad\DependencyInjection\FixturesLoadExtension; |
||
11 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
12 | use Symfony\Component\HttpKernel\Bundle\Bundle; |
||
13 | |||
14 | class FixturesLoadBundle extends Bundle |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | public function build(ContainerBuilder $container) |
||
20 | { |
||
21 | $container->addCompilerPass(new FactorySwitcherPass()); |
||
22 | $container->addCompilerPass(new ProcessorRegistrationPass()); |
||
23 | $container->addCompilerPass(new ProviderRegistrationPass()); |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | public function getNamespace() |
||
30 | { |
||
31 | $namespace = parent::getNamespace(); |
||
32 | |||
33 | return substr($namespace, 0, strrpos($namespace, '\\')); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | public function getPath() |
||
40 | { |
||
41 | return \dirname(parent::getPath()); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function getContainerExtensionClass() |
||
0 ignored issues
–
show
|
|||
48 | { |
||
49 | return FixturesLoadExtension::class; |
||
50 | } |
||
51 | } |
||
52 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.