@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function isAutomated($summary, $projectDomain) |
| 59 | 59 | { |
| 60 | - return (bool) $this->getTool($summary, $projectDomain); |
|
| 60 | + return (bool)$this->getTool($summary, $projectDomain); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -145,14 +145,14 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $revertEntries = array_filter( |
| 147 | 147 | $this->getTools($projectDomain), |
| 148 | - function ($tool) { |
|
| 148 | + function($tool) { |
|
| 149 | 149 | return isset($tool['revert']); |
| 150 | 150 | } |
| 151 | 151 | ); |
| 152 | 152 | |
| 153 | 153 | // If 'revert' is set to `true`, then use 'regex' as the regular expression, |
| 154 | 154 | // otherwise 'revert' is assumed to be the regex string. |
| 155 | - $this->revertTools[$projectDomain] = array_map(function ($revertTool) { |
|
| 155 | + $this->revertTools[$projectDomain] = array_map(function($revertTool) { |
|
| 156 | 156 | return [ |
| 157 | 157 | 'link' => $revertTool['link'], |
| 158 | 158 | 'regex' => $revertTool['revert'] === true ? $revertTool['regex'] : $revertTool['revert'] |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments() && $namespace === 0; |
| 48 | 48 | $paTable = $this->getTableName($project->getDatabaseName(), 'page_assessments'); |
| 49 | 49 | $paSelect = $hasPageAssessments |
| 50 | - ? ", ( |
|
| 50 | + ? ", ( |
|
| 51 | 51 | SELECT pa_class |
| 52 | 52 | FROM $paTable |
| 53 | 53 | WHERE pa_page_id = page_id |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments(); |
| 99 | 99 | $pageAssessmentsTable = $this->getTableName($project->getDatabaseName(), 'page_assessments'); |
| 100 | 100 | $paSelect = $hasPageAssessments |
| 101 | - ? ", ( |
|
| 101 | + ? ", ( |
|
| 102 | 102 | SELECT pa_class |
| 103 | 103 | FROM $pageAssessmentsTable |
| 104 | 104 | WHERE pa_page_id = e.page_id |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | { |
| 164 | 164 | $firstDateTime = $this->topEdits[0]->getTimestamp(); |
| 165 | 165 | $lastDateTime = end($this->topEdits)->getTimestamp(); |
| 166 | - $secs = $firstDateTime->getTimestamp() - $lastDateTime->getTimestamp(); |
|
| 166 | + $secs = $firstDateTime->getTimestamp()-$lastDateTime->getTimestamp(); |
|
| 167 | 167 | $days = $secs / (60 * 60 * 24); |
| 168 | 168 | return $days / count($this->topEdits); |
| 169 | 169 | } |
@@ -297,9 +297,9 @@ discard block |
||
| 297 | 297 | $displayTitles = $this->getDisplayTitles($pages); |
| 298 | 298 | |
| 299 | 299 | foreach ($pages as $page) { |
| 300 | - $nsId = (int) $page['page_namespace']; |
|
| 301 | - $nsTitle = $nsId > 0 ? $this->project->getNamespaces()[$page['page_namespace']] . ':' : ''; |
|
| 302 | - $pageTitle = $nsTitle . $page['page_title']; |
|
| 300 | + $nsId = (int)$page['page_namespace']; |
|
| 301 | + $nsTitle = $nsId > 0 ? $this->project->getNamespaces()[$page['page_namespace']].':' : ''; |
|
| 302 | + $pageTitle = $nsTitle.$page['page_title']; |
|
| 303 | 303 | $page['displaytitle'] = $displayTitles[$pageTitle]; |
| 304 | 304 | |
| 305 | 305 | // $page['page_title'] is retained without the namespace |
@@ -326,11 +326,11 @@ discard block |
||
| 326 | 326 | $namespaces = $this->project->getNamespaces(); |
| 327 | 327 | |
| 328 | 328 | // First extract page titles including namespace. |
| 329 | - $pageTitles = array_map(function ($page) use ($namespaces) { |
|
| 329 | + $pageTitles = array_map(function($page) use ($namespaces) { |
|
| 330 | 330 | // If non-mainspace, prepend namespace to the titles. |
| 331 | 331 | $ns = $page['page_namespace']; |
| 332 | - $nsTitle = $ns > 0 ? $namespaces[$page['page_namespace']] . ':' : ''; |
|
| 333 | - return $nsTitle . $page['page_title']; |
|
| 332 | + $nsTitle = $ns > 0 ? $namespaces[$page['page_namespace']].':' : ''; |
|
| 333 | + return $nsTitle.$page['page_title']; |
|
| 334 | 334 | }, $topPages); |
| 335 | 335 | |
| 336 | 336 | return $this->getRepository()->getDisplayTitles($this->project, $pageTitles); |