@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | protected function getRevisionCounts() |
53 | 53 | { |
54 | - if (! is_array($this->revisionCounts)) { |
|
54 | + if (!is_array($this->revisionCounts)) { |
|
55 | 55 | $this->revisionCounts = $this->getRepository() |
56 | 56 | ->getRevisionCounts($this->project, $this->user); |
57 | 57 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | protected function getRevisionDates() |
66 | 66 | { |
67 | - if (! is_array($this->revisionDates)) { |
|
67 | + if (!is_array($this->revisionDates)) { |
|
68 | 68 | $this->revisionDates = $this->getRepository() |
69 | 69 | ->getRevisionDates($this->project, $this->user); |
70 | 70 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | protected function getPageCounts() |
79 | 79 | { |
80 | - if (! is_array($this->pageCounts)) { |
|
80 | + if (!is_array($this->pageCounts)) { |
|
81 | 81 | $this->pageCounts = $this->getRepository() |
82 | 82 | ->getPageCounts($this->project, $this->user); |
83 | 83 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | protected function getLogCounts() |
92 | 92 | { |
93 | - if (! is_array($this->logCounts)) { |
|
93 | + if (!is_array($this->logCounts)) { |
|
94 | 94 | $this->logCounts = $this->getRepository() |
95 | 95 | ->getLogCounts($this->project, $this->user); |
96 | 96 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function countAllRevisions() |
121 | 121 | { |
122 | - return $this->countLiveRevisions() + $this->countDeletedRevisions(); |
|
122 | + return $this->countLiveRevisions()+$this->countDeletedRevisions(); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function countRevisionsWithoutComments() |
140 | 140 | { |
141 | - return $this->countAllRevisions() - $this->countRevisionsWithComments(); |
|
141 | + return $this->countAllRevisions()-$this->countRevisionsWithComments(); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | public function countAllPagesEdited() |
207 | 207 | { |
208 | - return $this->countLivePagesEdited() + $this->countDeletedPagesEdited(); |
|
208 | + return $this->countLivePagesEdited()+$this->countDeletedPagesEdited(); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | */ |
216 | 216 | public function countPagesCreated() |
217 | 217 | { |
218 | - return $this->countCreatedPagesLive() + $this->countPagesCreatedDeleted(); |
|
218 | + return $this->countCreatedPagesLive()+$this->countPagesCreatedDeleted(); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
@@ -373,9 +373,9 @@ discard block |
||
373 | 373 | public function approvals() |
374 | 374 | { |
375 | 375 | $logCounts = $this->getLogCounts(); |
376 | - $total = $logCounts['review-approve'] + |
|
377 | - (!empty($logCounts['review-approve-a']) ? $logCounts['review-approve-a'] : 0) + |
|
378 | - (!empty($logCounts['review-approve-i']) ? $logCounts['review-approve-i'] : 0) + |
|
376 | + $total = $logCounts['review-approve']+ |
|
377 | + (!empty($logCounts['review-approve-a']) ? $logCounts['review-approve-a'] : 0)+ |
|
378 | + (!empty($logCounts['review-approve-i']) ? $logCounts['review-approve-i'] : 0)+ |
|
379 | 379 | (!empty($logCounts['review-approve-ia']) ? $logCounts['review-approve-ia'] : 0); |
380 | 380 | return $total; |
381 | 381 | } |
@@ -452,14 +452,14 @@ discard block |
||
452 | 452 | if (!isset($out['totals'][$ns])) { |
453 | 453 | $out['totals'][$ns] = []; |
454 | 454 | } |
455 | - $out['totals'][$ns][$total['year'] . $total['month']] = $total['count']; |
|
455 | + $out['totals'][$ns][$total['year'].$total['month']] = $total['count']; |
|
456 | 456 | } |
457 | 457 | // Fill in the blanks (where no edits were made in a given month for a namespace). |
458 | 458 | for ($y = $out['min_year']; $y <= $out['max_year']; $y++) { |
459 | 459 | for ($m = 1; $m <= 12; $m++) { |
460 | 460 | foreach ($out['totals'] as $nsId => &$total) { |
461 | - if (!isset($total[$y . $m])) { |
|
462 | - $total[$y . $m] = 0; |
|
461 | + if (!isset($total[$y.$m])) { |
|
462 | + $total[$y.$m] = 0; |
|
463 | 463 | } |
464 | 464 | } |
465 | 465 | } |
@@ -477,8 +477,8 @@ discard block |
||
477 | 477 | // Get counts. |
478 | 478 | $editCounts = $this->globalEditCounts(); |
479 | 479 | // Sort. |
480 | - uasort($editCounts, function ($a, $b) { |
|
481 | - return $b['total'] - $a['total']; |
|
480 | + uasort($editCounts, function($a, $b) { |
|
481 | + return $b['total']-$a['total']; |
|
482 | 482 | }); |
483 | 483 | // Truncate, and return. |
484 | 484 | return array_slice($editCounts, 0, $numProjects); |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | foreach ($revisions as &$revision) { |
535 | 535 | $nsName = $otherProject->getNamespaces()[$revision['page_namespace']]; |
536 | 536 | $page = $otherProject->getRepository() |
537 | - ->getPage($otherProject, $nsName . ':' . $revision['page_title']); |
|
537 | + ->getPage($otherProject, $nsName.':'.$revision['page_title']); |
|
538 | 538 | $edit = new Edit($page, $revision); |
539 | 539 | |
540 | 540 | // If we've already got enough, only check for those newer than the current oldest. |