1 | <?php |
||
33 | trait ExtendedContainerTrait |
||
34 | { |
||
35 | // ExtendedContainerInterface related |
||
36 | |||
37 | /** |
||
38 | * {@inheritDoc} |
||
39 | */ |
||
40 | public function one(/*# string */ $id, array $arguments = []) |
||
46 | |||
47 | /** |
||
48 | * {@inheritDoc} |
||
49 | */ |
||
50 | public function run($callable, array $arguments = []) |
||
57 | |||
58 | /** |
||
59 | * {@inheritDoc} |
||
60 | */ |
||
61 | public function param(/*# string */ $name, $value) |
||
66 | |||
67 | // AutoWiringInterface related |
||
68 | |||
69 | /** |
||
70 | * {@inheritDoc} |
||
71 | */ |
||
72 | public function auto(/*# bool */ $flag = true) |
||
77 | |||
78 | /** |
||
79 | * {@inheritDoc} |
||
80 | */ |
||
81 | public function isAuto()/*# : bool */ |
||
85 | |||
86 | // ReferenceResolveInterface related |
||
87 | |||
88 | /** |
||
89 | * {@inheritDoc} |
||
90 | */ |
||
91 | public function resolve(&$toResolve) |
||
96 | |||
97 | /** |
||
98 | * From ContainerInterface |
||
99 | * |
||
100 | * @param string $id Identifier of the entry to look for. |
||
101 | * @return mixed Entry. |
||
102 | */ |
||
103 | abstract public function get($id); |
||
104 | |||
105 | /** |
||
106 | * From ContainerHelperTrait |
||
107 | * |
||
108 | * @return ResolverInterface |
||
109 | */ |
||
110 | abstract protected function getResolver()/*# : ResolverInterface */; |
||
111 | |||
112 | /** |
||
113 | * From ContainerHelperTrait |
||
114 | * |
||
115 | * @return FactoryInterface |
||
116 | */ |
||
117 | abstract protected function getFactory()/*# : FactoryInterface */; |
||
118 | |||
119 | /** |
||
120 | * From ScopeTrait |
||
121 | * |
||
122 | * @param string $id |
||
123 | * @param string $scope |
||
124 | * @return string |
||
125 | */ |
||
126 | abstract protected function scopedId( |
||
130 | } |
||
131 |
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.