1 | <?php |
||
13 | class Hooks { |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private $handlers = []; |
||
19 | |||
20 | /** |
||
21 | * @since 1.0 |
||
22 | * |
||
23 | * @param array $config |
||
24 | */ |
||
25 | 2 | public function __construct( $config = [] ) { |
|
28 | |||
29 | /** |
||
30 | * @since 1.0 |
||
31 | */ |
||
32 | public static function hasPropertyCollisions( $var ) { |
||
54 | |||
55 | /** |
||
56 | * @since 1.0 |
||
57 | */ |
||
58 | 1 | public function register() { |
|
63 | |||
64 | /** |
||
65 | * @since 1.0 |
||
66 | */ |
||
67 | 1 | public function deregister() { |
|
79 | |||
80 | /** |
||
81 | * @since 1.0 |
||
82 | * |
||
83 | * @param string $name |
||
84 | * |
||
85 | * @return boolean |
||
86 | */ |
||
87 | 1 | public function isRegistered( $name ) { |
|
90 | |||
91 | /** |
||
92 | * @since 1.0 |
||
93 | * |
||
94 | * @param string $name |
||
95 | * |
||
96 | * @return array |
||
97 | */ |
||
98 | 1 | public function getHandlers( $name ) { |
|
101 | |||
102 | /** |
||
103 | * @since 1.0 |
||
104 | * |
||
105 | * @param Title $title |
||
106 | * @param integer $latestRevID |
||
107 | */ |
||
108 | 1 | public function onSkipUpdate( $title, $latestRevID ) { |
|
116 | |||
117 | /** |
||
118 | * @since 1.0 |
||
119 | * |
||
120 | * @param Title $title |
||
121 | * @param Revision|null &$revision |
||
122 | */ |
||
123 | 1 | public function onChangeRevision( $title, &$revision ) { |
|
133 | |||
134 | /** |
||
135 | * @since 1.0 |
||
136 | * |
||
137 | * @param Title $title |
||
138 | * @param integer &$latestRevID |
||
139 | */ |
||
140 | 1 | public function onOverrideRevisionID( $title, &$latestRevID ) { |
|
150 | |||
151 | /** |
||
152 | * @see https://www.semantic-mediawiki.org/wiki/Hooks#SMW::Property::initProperties |
||
153 | * |
||
154 | * @since 1.0 |
||
155 | * |
||
156 | * @param ProertyRegistry $$registry |
||
|
|||
157 | * @param integer &$latestRevID |
||
158 | */ |
||
159 | public function onInitProperties( $registry ) { |
||
166 | |||
167 | /** |
||
168 | * @see https://www.semantic-mediawiki.org/wiki/Hooks#SMWStore::updateDataBefore |
||
169 | * |
||
170 | * @since 1.0 |
||
171 | * |
||
172 | * @param ProertyRegistry $$registry |
||
173 | * @param integer &$latestRevID |
||
174 | */ |
||
175 | public function onUpdateDataBefore( $store, $semanticData ) { |
||
189 | |||
190 | 2 | private function registerHandlers( $config ) { |
|
200 | |||
201 | } |
||
202 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.