| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 | */ | 
| 55 | 55 | protected function getRevisionCounts() | 
| 56 | 56 |      { | 
| 57 | -        if (! is_array($this->revisionCounts)) { | |
| 57 | +        if (!is_array($this->revisionCounts)) { | |
| 58 | 58 | $this->revisionCounts = $this->getRepository() | 
| 59 | 59 | ->getRevisionCounts($this->project, $this->user); | 
| 60 | 60 | } | 
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 | */ | 
| 68 | 68 | protected function getRevisionDates() | 
| 69 | 69 |      { | 
| 70 | -        if (! is_array($this->revisionDates)) { | |
| 70 | +        if (!is_array($this->revisionDates)) { | |
| 71 | 71 | $this->revisionDates = $this->getRepository() | 
| 72 | 72 | ->getRevisionDates($this->project, $this->user); | 
| 73 | 73 | } | 
| @@ -80,7 +80,7 @@ discard block | ||
| 80 | 80 | */ | 
| 81 | 81 | protected function getPageCounts() | 
| 82 | 82 |      { | 
| 83 | -        if (! is_array($this->pageCounts)) { | |
| 83 | +        if (!is_array($this->pageCounts)) { | |
| 84 | 84 | $this->pageCounts = $this->getRepository() | 
| 85 | 85 | ->getPageCounts($this->project, $this->user); | 
| 86 | 86 | } | 
| @@ -93,7 +93,7 @@ discard block | ||
| 93 | 93 | */ | 
| 94 | 94 | protected function getLogCounts() | 
| 95 | 95 |      { | 
| 96 | -        if (! is_array($this->logCounts)) { | |
| 96 | +        if (!is_array($this->logCounts)) { | |
| 97 | 97 | $this->logCounts = $this->getRepository() | 
| 98 | 98 | ->getLogCounts($this->project, $this->user); | 
| 99 | 99 | } | 
| @@ -142,7 +142,7 @@ discard block | ||
| 142 | 142 | */ | 
| 143 | 143 | public function countAllRevisions() | 
| 144 | 144 |      { | 
| 145 | - return $this->countLiveRevisions() + $this->countDeletedRevisions(); | |
| 145 | + return $this->countLiveRevisions()+$this->countDeletedRevisions(); | |
| 146 | 146 | } | 
| 147 | 147 | |
| 148 | 148 | /** | 
| @@ -161,7 +161,7 @@ discard block | ||
| 161 | 161 | */ | 
| 162 | 162 | public function countRevisionsWithoutComments() | 
| 163 | 163 |      { | 
| 164 | - return $this->countAllRevisions() - $this->countRevisionsWithComments(); | |
| 164 | + return $this->countAllRevisions()-$this->countRevisionsWithComments(); | |
| 165 | 165 | } | 
| 166 | 166 | |
| 167 | 167 | /** | 
| @@ -228,7 +228,7 @@ discard block | ||
| 228 | 228 | */ | 
| 229 | 229 | public function countAllPagesEdited() | 
| 230 | 230 |      { | 
| 231 | - return $this->countLivePagesEdited() + $this->countDeletedPagesEdited(); | |
| 231 | + return $this->countLivePagesEdited()+$this->countDeletedPagesEdited(); | |
| 232 | 232 | } | 
| 233 | 233 | |
| 234 | 234 | /** | 
| @@ -238,7 +238,7 @@ discard block | ||
| 238 | 238 | */ | 
| 239 | 239 | public function countPagesCreated() | 
| 240 | 240 |      { | 
| 241 | - return $this->countCreatedPagesLive() + $this->countPagesCreatedDeleted(); | |
| 241 | + return $this->countCreatedPagesLive()+$this->countPagesCreatedDeleted(); | |
| 242 | 242 | } | 
| 243 | 243 | |
| 244 | 244 | /** | 
| @@ -290,7 +290,7 @@ discard block | ||
| 290 | 290 | $logCounts = $this->getLogCounts(); | 
| 291 | 291 | $block = isset($logCounts['block-block']) ? (int)$logCounts['block-block'] : 0; | 
| 292 | 292 | $reBlock = isset($logCounts['block-reblock']) ? (int)$logCounts['block-reblock'] : 0; | 
| 293 | - return $block + $reBlock; | |
| 293 | + return $block+$reBlock; | |
| 294 | 294 | } | 
| 295 | 295 | |
| 296 | 296 | /** | 
| @@ -388,7 +388,7 @@ discard block | ||
| 388 | 388 | $import = isset($logCounts['import-import']) ? (int)$logCounts['import-import'] : 0; | 
| 389 | 389 | $interwiki = isset($logCounts['import-interwiki']) ? (int)$logCounts['import-interwiki'] : 0; | 
| 390 | 390 | $upload = isset($logCounts['import-upload']) ? (int)$logCounts['import-upload'] : 0; | 
| 391 | - return $import + $interwiki + $upload; | |
| 391 | + return $import+$interwiki+$upload; | |
| 392 | 392 | } | 
| 393 | 393 | |
| 394 | 394 | /** | 
| @@ -521,9 +521,9 @@ discard block | ||
| 521 | 521 | public function approvals() | 
| 522 | 522 |      { | 
| 523 | 523 | $logCounts = $this->getLogCounts(); | 
| 524 | - $total = $logCounts['review-approve'] + | |
| 525 | - (!empty($logCounts['review-approve-a']) ? $logCounts['review-approve-a'] : 0) + | |
| 526 | - (!empty($logCounts['review-approve-i']) ? $logCounts['review-approve-i'] : 0) + | |
| 524 | + $total = $logCounts['review-approve']+ | |
| 525 | + (!empty($logCounts['review-approve-a']) ? $logCounts['review-approve-a'] : 0)+ | |
| 526 | + (!empty($logCounts['review-approve-i']) ? $logCounts['review-approve-i'] : 0)+ | |
| 527 | 527 | (!empty($logCounts['review-approve-ia']) ? $logCounts['review-approve-ia'] : 0); | 
| 528 | 528 | return $total; | 
| 529 | 529 | } | 
| @@ -605,14 +605,14 @@ discard block | ||
| 605 | 605 |              if (!isset($out['totals'][$ns])) { | 
| 606 | 606 | $out['totals'][$ns] = []; | 
| 607 | 607 | } | 
| 608 | - $out['totals'][$ns][$total['year'] . $total['month']] = $total['count']; | |
| 608 | + $out['totals'][$ns][$total['year'].$total['month']] = $total['count']; | |
| 609 | 609 | } | 
| 610 | 610 | // Fill in the blanks (where no edits were made in a given month for a namespace). | 
| 611 | 611 |          for ($y = $out['min_year']; $y <= $out['max_year']; $y++) { | 
| 612 | 612 |              for ($m = 1; $m <= 12; $m++) { | 
| 613 | 613 |                  foreach ($out['totals'] as $nsId => &$total) { | 
| 614 | -                    if (!isset($total[$y . $m])) { | |
| 615 | - $total[$y . $m] = 0; | |
| 614 | +                    if (!isset($total[$y.$m])) { | |
| 615 | + $total[$y.$m] = 0; | |
| 616 | 616 | } | 
| 617 | 617 | } | 
| 618 | 618 | } | 
| @@ -630,8 +630,8 @@ discard block | ||
| 630 | 630 | // Get counts. | 
| 631 | 631 | $editCounts = $this->globalEditCounts(); | 
| 632 | 632 | // Sort. | 
| 633 | -        uasort($editCounts, function ($a, $b) { | |
| 634 | - return $b['total'] - $a['total']; | |
| 633 | +        uasort($editCounts, function($a, $b) { | |
| 634 | + return $b['total']-$a['total']; | |
| 635 | 635 | }); | 
| 636 | 636 | // Truncate, and return. | 
| 637 | 637 | return array_slice($editCounts, 0, $numProjects); | 
| @@ -687,7 +687,7 @@ discard block | ||
| 687 | 687 |              foreach ($revisions as &$revision) { | 
| 688 | 688 | $nsName = $otherProject->getNamespaces()[$revision['page_namespace']]; | 
| 689 | 689 | $page = $otherProject->getRepository() | 
| 690 | - ->getPage($otherProject, $nsName . ':' . $revision['page_title']); | |
| 690 | + ->getPage($otherProject, $nsName.':'.$revision['page_title']); | |
| 691 | 691 | $edit = new Edit($page, $revision); | 
| 692 | 692 | |
| 693 | 693 | // If we've already got enough, only check for those newer than the current oldest. |