1 | <?php |
||
12 | class DatabaseLogReader { |
||
13 | |||
14 | private static $titleCache = []; |
||
15 | |||
16 | /** |
||
17 | * @var DatabaseBase |
||
18 | */ |
||
19 | private $dbr; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $query; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $log; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $dbKey; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $type; |
||
40 | |||
41 | /** |
||
42 | * @param DatabaseaBase $dbr injected connection |
||
43 | * @param string $dbKey from page name |
||
|
|||
44 | * @param string $type of log (default: approval) |
||
45 | */ |
||
46 | public function __construct( DatabaseBase $dbr, Title $title = null , $type = 'approval' ) { |
||
51 | |||
52 | public function clearCache() { |
||
55 | |||
56 | /** |
||
57 | * Take care of loading from the cache or filling the query. |
||
58 | */ |
||
59 | private function init() { |
||
81 | |||
82 | /** |
||
83 | * Fetch the results using our conditions |
||
84 | * |
||
85 | * @return IResultWrapper |
||
86 | * @throws DBError |
||
87 | */ |
||
88 | private function getLog() { |
||
113 | |||
114 | /** |
||
115 | * Fetch the query parameters for later calls |
||
116 | * |
||
117 | * @return array of parameters for SELECT call |
||
118 | */ |
||
119 | public function getQuery() { |
||
122 | |||
123 | /** |
||
124 | * @return User |
||
125 | */ |
||
126 | public function getUserForLogEntry() { |
||
134 | |||
135 | /** |
||
136 | * @return Timestamp |
||
137 | */ |
||
138 | public function getDateOfLogEntry() { |
||
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | public function getStatusOfLogEntry() { |
||
158 | } |
||
159 |
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.