1 | <?php |
||
11 | class Bundle extends BaseBundle implements ConfigurableBundleInterface |
||
12 | { |
||
13 | public function build(ContainerBuilder $container) |
||
14 | { |
||
15 | $container->addCompilerPass(new Compiler\RemoveUnavailableServicesPass); |
||
16 | $container->addCompilerPass(new Compiler\RegisterAliceProvidersPass($this)); |
||
|
|||
17 | $container->addCompilerPass(new Compiler\RegisterDoctrineRepositoriesPass($this)); |
||
18 | $container->addCompilerPass(new Compiler\RegisterFormCreatorsPass); |
||
19 | $container->addCompilerPass(new Compiler\RegisterTwigExtensionsPass($this)); |
||
20 | $container->addCompilerPass(new Compiler\RegisterSecurityVotersPass($this)); |
||
21 | $container->addCompilerPass(new Compiler\RegisterAppBundlePass($this)); |
||
22 | $container->addCompilerPass(new Compiler\RegisterFormTypesPass($this)); |
||
23 | $container->addCompilerPass(new Compiler\RegisterFormTypeExtensionsPass($this)); |
||
24 | $container->addCompilerPass(new Compiler\RegisterValidatorConstraintsPass($this)); |
||
25 | $container->addCompilerPass(new Compiler\RegisterFormCreatorsPass); |
||
26 | } |
||
27 | |||
28 | public function getContainerExtension() |
||
36 | |||
37 | public function buildConfiguration(NodeParentInterface $rootNode) |
||
40 | |||
41 | public function buildContainer(array $config, ContainerBuilder $container) |
||
44 | } |
||
45 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.