@@ -380,7 +380,6 @@ |
||
380 | 380 | |
381 | 381 | /** |
382 | 382 | * Get the size of the diff |
383 | - * @param int $rev The index of the revision within $this->pageHistory |
|
384 | 383 | * @return int Size of the diff |
385 | 384 | */ |
386 | 385 | private function getDiffSize($revIndex) |
@@ -164,7 +164,7 @@ |
||
164 | 164 | private function getRevCount() |
165 | 165 | { |
166 | 166 | $query = "SELECT COUNT(*) AS count FROM " . $this->revisionTable |
167 | - . " WHERE rev_page = '" . $this->pageInfo['id'] . "'"; |
|
167 | + . " WHERE rev_page = '" . $this->pageInfo['id'] . "'"; |
|
168 | 168 | $res = $this->conn->query($query)->fetchAll(); |
169 | 169 | return $res[0]['count']; |
170 | 170 | } |
@@ -37,6 +37,9 @@ discard block |
||
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
40 | + /** |
|
41 | + * @param string $username |
|
42 | + */ |
|
40 | 43 | public function groups($project, $username) |
41 | 44 | { |
42 | 45 | |
@@ -57,6 +60,9 @@ discard block |
||
57 | 60 | return $result; |
58 | 61 | } |
59 | 62 | |
63 | + /** |
|
64 | + * @param string $username |
|
65 | + */ |
|
60 | 66 | public function globalGroups($project, $username) |
61 | 67 | { |
62 | 68 | |
@@ -348,7 +354,7 @@ discard block |
||
348 | 354 | * Adapted from https://github.com/MusikAnimal/pageviews |
349 | 355 | * @param array $params Associative array of params to pass to API |
350 | 356 | * @param string $project Project to query, e.g. en.wikipedia.org |
351 | - * @param string|func $dataKey The key for the main chunk of data, in the query hash |
|
357 | + * @param \Closure $dataKey The key for the main chunk of data, in the query hash |
|
352 | 358 | * (e.g. 'categorymembers' for API:Categorymembers). |
353 | 359 | * If this is a function it is given the response data, |
354 | 360 | * and expected to return the data we want to concatentate. |
@@ -157,7 +157,7 @@ |
||
157 | 157 | /** |
158 | 158 | * Get links to pageviews tools for the given page |
159 | 159 | * @param string $title Title of page |
160 | - * @param string $projectUrl Project domain such as en.wikipedia.org |
|
160 | + * @param string $project Project domain such as en.wikipedia.org |
|
161 | 161 | * @return string Markup |
162 | 162 | */ |
163 | 163 | public function pageviewsLinks($title, $project) |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * Adds a mandatory requirement in form of a php.ini configuration. |
224 | 224 | * |
225 | 225 | * @param string $cfgName The configuration name used for ini_get() |
226 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
226 | + * @param boolean|string $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
227 | 227 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
228 | 228 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
229 | 229 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * Adds an optional recommendation in form of a php.ini configuration. |
242 | 242 | * |
243 | 243 | * @param string $cfgName The configuration name used for ini_get() |
244 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
244 | + * @param string|false $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
245 | 245 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
246 | 246 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
247 | 247 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
@@ -146,7 +146,7 @@ |
||
146 | 146 | |
147 | 147 | /** |
148 | 148 | * |
149 | - * @param $username |
|
149 | + * @param string $username |
|
150 | 150 | * @return integer |
151 | 151 | */ |
152 | 152 | public function getPageCounts($username, $totalRevisions) |
@@ -390,15 +390,15 @@ |
||
390 | 390 | } |
391 | 391 | |
392 | 392 | $sql = "SELECT " |
393 | - . " SUBSTR(CAST(rev_timestamp AS CHAR(6)), 1, 6) AS `month`," |
|
394 | - . " page_namespace," |
|
395 | - . " COUNT(rev_id) AS `count` " |
|
396 | - . " FROM ".$this->labsHelper->getTable('revision') |
|
397 | - . " JOIN " . $this->labsHelper->getTable('page') |
|
398 | - . " ON (rev_page = page_id)" |
|
399 | - . " WHERE rev_user_text = :username" |
|
400 | - . " GROUP BY SUBSTR(CAST(rev_timestamp AS CHAR(6)), 1, 6), page_namespace " |
|
401 | - . " ORDER BY rev_timestamp DESC "; |
|
393 | + . " SUBSTR(CAST(rev_timestamp AS CHAR(6)), 1, 6) AS `month`," |
|
394 | + . " page_namespace," |
|
395 | + . " COUNT(rev_id) AS `count` " |
|
396 | + . " FROM ".$this->labsHelper->getTable('revision') |
|
397 | + . " JOIN " . $this->labsHelper->getTable('page') |
|
398 | + . " ON (rev_page = page_id)" |
|
399 | + . " WHERE rev_user_text = :username" |
|
400 | + . " GROUP BY SUBSTR(CAST(rev_timestamp AS CHAR(6)), 1, 6), page_namespace " |
|
401 | + . " ORDER BY rev_timestamp DESC "; |
|
402 | 402 | $resultQuery = $this->replicas->prepare($sql); |
403 | 403 | $resultQuery->bindParam(":username", $username); |
404 | 404 | $resultQuery->execute(); |
@@ -125,7 +125,7 @@ |
||
125 | 125 | /** @var LabsHelper $labsHelper */ |
126 | 126 | $labsHelper = $this->container->get('app.labs_helper'); |
127 | 127 | $sql = "SELECT rev_comment FROM ".$labsHelper->getTable('revision') |
128 | - ." WHERE rev_user=:userId ORDER BY rev_timestamp DESC LIMIT 1000"; |
|
128 | + ." WHERE rev_user=:userId ORDER BY rev_timestamp DESC LIMIT 1000"; |
|
129 | 129 | $resultQuery = $replicas->prepare($sql); |
130 | 130 | $resultQuery->bindParam("userId", $userId); |
131 | 131 | $resultQuery->execute(); |