1 | <?php |
||
19 | class IdTaskHandler extends TaskHandler { |
||
20 | |||
21 | /** |
||
22 | * @var Store |
||
23 | */ |
||
24 | private $store; |
||
25 | |||
26 | /** |
||
27 | * @var HtmlFormRenderer |
||
28 | */ |
||
29 | private $htmlFormRenderer; |
||
30 | |||
31 | /** |
||
32 | * @var OutputFormatter |
||
33 | */ |
||
34 | private $outputFormatter; |
||
35 | |||
36 | /** |
||
37 | * @var User|null |
||
38 | */ |
||
39 | private $user; |
||
40 | |||
41 | /** |
||
42 | * @since 2.5 |
||
43 | * |
||
44 | * @param Store $store |
||
45 | * @param HtmlFormRenderer $htmlFormRenderer |
||
46 | * @param OutputFormatter $outputFormatter |
||
47 | */ |
||
48 | public function __construct( Store $store, HtmlFormRenderer $htmlFormRenderer, OutputFormatter $outputFormatter ) { |
||
53 | |||
54 | /** |
||
55 | * @since 2.5 |
||
56 | * |
||
57 | * {@inheritDoc} |
||
58 | */ |
||
59 | public function isTaskFor( $task ) { |
||
62 | |||
63 | /** |
||
64 | * @since 2.5 |
||
65 | * |
||
66 | * {@inheritDoc} |
||
67 | */ |
||
68 | public function setUser( $user = null ) { |
||
71 | |||
72 | /** |
||
73 | * @since 2.5 |
||
74 | * |
||
75 | * {@inheritDoc} |
||
76 | */ |
||
77 | public function getHtml() { |
||
89 | |||
90 | /** |
||
91 | * @since 2.5 |
||
92 | * |
||
93 | * {@inheritDoc} |
||
94 | */ |
||
95 | public function handleRequest( WebRequest $webRequest ) { |
||
108 | |||
109 | /** |
||
110 | * @param integer $id |
||
111 | * @param User|null $use |
||
|
|||
112 | */ |
||
113 | private function doDispose( $id ) { |
||
125 | |||
126 | private function getForm( $webRequest, $id ) { |
||
188 | |||
189 | private function createInfoMessageById( $webRequest, &$id ) { |
||
190 | |||
191 | if ( $webRequest->getText( 'action' ) !== 'idlookup' || $id === '' ) { |
||
192 | return ''; |
||
193 | } |
||
194 | |||
195 | $connection = $this->store->getConnection( 'mw.db' ); |
||
196 | |||
197 | if ( intval( $id ) ) { |
||
198 | $condition = 'smw_id=' . intval( $id ); |
||
199 | } else { |
||
200 | $condition = 'smw_sortkey=' . $connection->addQuotes( $id ); |
||
201 | } |
||
202 | |||
203 | $rows = $connection->select( |
||
204 | \SMWSql3SmwIds::TABLE_NAME, |
||
205 | array( |
||
206 | 'smw_id', |
||
207 | 'smw_title', |
||
208 | 'smw_namespace', |
||
209 | 'smw_iw', |
||
210 | 'smw_subobject', |
||
211 | 'smw_sortkey' |
||
212 | ), |
||
213 | $condition, |
||
214 | __METHOD__ |
||
215 | ); |
||
216 | |||
217 | return $this->createMessageFromRows( $id, $rows ); |
||
218 | } |
||
219 | |||
220 | private function createMessageFromRows( &$id, $rows ) { |
||
258 | |||
259 | } |
||
260 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.