@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * Get the user's (system) edit count. |
| 96 | 96 | * @param string $databaseName The database to query. |
| 97 | 97 | * @param string $username The username to find. |
| 98 | - * @return int|null As returned by the database. |
|
| 98 | + * @return string|boolean As returned by the database. |
|
| 99 | 99 | */ |
| 100 | 100 | public function getEditCount($databaseName, $username) |
| 101 | 101 | { |
@@ -675,7 +675,7 @@ discard block |
||
| 675 | 675 | * @param string $namespace |
| 676 | 676 | * @param string $start |
| 677 | 677 | * @param string $end |
| 678 | - * @return Doctrine\DBAL\Statement |
|
| 678 | + * @return \Doctrine\DBAL\Driver\Statement |
|
| 679 | 679 | */ |
| 680 | 680 | private function executeQuery($sql, User $user, $namespace = 'all', $start = '', $end = '') |
| 681 | 681 | { |
@@ -262,8 +262,8 @@ discard block |
||
| 262 | 262 | FROM $pageTable |
| 263 | 263 | JOIN $revisionTable ON page_id = rev_page |
| 264 | 264 | $paJoin |
| 265 | - WHERE $whereRev AND rev_parent_id = '0' $namespaceConditionRev $redirectCondition" . |
|
| 266 | - ($hasPageAssessments ? 'GROUP BY rev_page' : '') . " |
|
| 265 | + WHERE $whereRev AND rev_parent_id = '0' $namespaceConditionRev $redirectCondition". |
|
| 266 | + ($hasPageAssessments ? 'GROUP BY rev_page' : '')." |
|
| 267 | 267 | ) |
| 268 | 268 | |
| 269 | 269 | UNION |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | $tagJoin = $tags != '' ? "LEFT OUTER JOIN $tagTable ON ct_rev_id = rev_id" : ''; |
| 376 | 376 | $condTools[] = "ct_tag IN ($tags)"; |
| 377 | 377 | } |
| 378 | - $condTool = 'AND (' . implode(' OR ', $condTools) . ')'; |
|
| 378 | + $condTool = 'AND ('.implode(' OR ', $condTools).')'; |
|
| 379 | 379 | |
| 380 | 380 | $sql = "SELECT COUNT(DISTINCT(rev_id)) |
| 381 | 381 | FROM $revisionTable |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | $condEnd"; |
| 389 | 389 | |
| 390 | 390 | $resultQuery = $this->executeQuery($sql, $user, $namespace, $start, $end); |
| 391 | - $result = (int) $resultQuery->fetchColumn(); |
|
| 391 | + $result = (int)$resultQuery->fetchColumn(); |
|
| 392 | 392 | |
| 393 | 393 | // Cache for 10 minutes, and return. |
| 394 | 394 | $cacheItem = $this->cache->getItem($cacheKey) |
@@ -540,13 +540,13 @@ discard block |
||
| 540 | 540 | if ($condTool === '') { |
| 541 | 541 | $condTool = "ct_tag = $tag"; |
| 542 | 542 | } else { |
| 543 | - $condTool = '(' . $condTool . " OR ct_tag = $tag)"; |
|
| 543 | + $condTool = '('.$condTool." OR ct_tag = $tag)"; |
|
| 544 | 544 | } |
| 545 | 545 | } |
| 546 | 546 | |
| 547 | 547 | // Developer error, no regex or tag provided for this tool. |
| 548 | 548 | if ($condTool === '') { |
| 549 | - throw new Exception("No regex or tag found for the tool $toolname. " . |
|
| 549 | + throw new Exception("No regex or tag found for the tool $toolname. ". |
|
| 550 | 550 | "Please verify this entry in semi_automated.yml"); |
| 551 | 551 | } |
| 552 | 552 | |
@@ -582,8 +582,8 @@ discard block |
||
| 582 | 582 | } |
| 583 | 583 | |
| 584 | 584 | // Sort the array by count |
| 585 | - uasort($results, function ($a, $b) { |
|
| 586 | - return $b['count'] - $a['count']; |
|
| 585 | + uasort($results, function($a, $b) { |
|
| 586 | + return $b['count']-$a['count']; |
|
| 587 | 587 | }); |
| 588 | 588 | |
| 589 | 589 | // Cache for 10 minutes, and return. |