1 | <?php |
||
11 | class DatabaseLogReader { |
||
12 | |||
13 | private static $titleCache = []; |
||
14 | private $query; |
||
15 | private $log; |
||
16 | private $db; |
||
17 | private $titleKey; |
||
18 | private $type; |
||
19 | |||
20 | /** |
||
21 | * @param AppFactory $appFactory injected AppFactory |
||
|
|||
22 | * @param string $titleKey from page name |
||
23 | * @param string $type of log (default: approval) |
||
24 | */ |
||
25 | public function __construct( DatabaseBase $db, $titleKey, $type = 'approval' ) { |
||
30 | |||
31 | /** |
||
32 | * Take care of loading from the cache or filling the query. |
||
33 | */ |
||
34 | private function init() { |
||
52 | |||
53 | /** |
||
54 | * Fetch the results using our conditions |
||
55 | * |
||
56 | * @return IResultWrapper |
||
57 | * @throws DBError |
||
58 | */ |
||
59 | private function getLog() { |
||
68 | |||
69 | /** |
||
70 | * Fetch the query parameters for later calls |
||
71 | * |
||
72 | * @return array of parameters for SELECT call |
||
73 | */ |
||
74 | public function getQuery() { |
||
77 | |||
78 | /** |
||
79 | * @return User |
||
80 | */ |
||
81 | public function getUserForLogEntry() { |
||
88 | |||
89 | /** |
||
90 | * @return Timestamp |
||
91 | */ |
||
92 | public function getDateOfLogEntry() { |
||
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | public function getStatusOfLogEntry() { |
||
110 | } |
||
111 |
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.