@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * This file contains only the ExceptionListener class. |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the PageAssessments class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Model; |
9 | 9 |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * This file contains only the AdminScore class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Model; |
9 | 9 | |
@@ -103,8 +103,8 @@ discard block |
||
103 | 103 | $now = new DateTime(); |
104 | 104 | $date = new DateTime($value); |
105 | 105 | $diff = $date->diff($now); |
106 | - $formula = 365 * (int)$diff->format('%y') + 30 * |
|
107 | - (int)$diff->format('%m') + (int)$diff->format('%d'); |
|
106 | + $formula = 365 * (int)$diff->format('%y')+30 * |
|
107 | + (int)$diff->format('%m')+(int)$diff->format('%d'); |
|
108 | 108 | if ($formula < 365) { |
109 | 109 | $this->multipliers['account-age-mult'] = 0; |
110 | 110 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
115 | - $multiplierKey = $row['source'] . '-mult'; |
|
115 | + $multiplierKey = $row['source'].'-mult'; |
|
116 | 116 | $multiplier = $this->multipliers[$multiplierKey] ?? 1; |
117 | 117 | $score = max(min($value * $multiplier, 100), -100); |
118 | 118 | $this->scores[$key]['mult'] = $multiplier; |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the Pages class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Model; |
9 | 9 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the EditSummaryRepository class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Repository; |
9 | 9 |
@@ -330,9 +330,9 @@ |
||
330 | 330 | { |
331 | 331 | $pageTable = $this->getTableName($project->getDatabaseName(), 'page'); |
332 | 332 | $query = "SELECT page_id " |
333 | - . " FROM $pageTable " |
|
334 | - . " WHERE page_namespace = :ns AND page_title = :title AND page_len > 0 " |
|
335 | - . " LIMIT 1"; |
|
333 | + . " FROM $pageTable " |
|
334 | + . " WHERE page_namespace = :ns AND page_title = :title AND page_len > 0 " |
|
335 | + . " LIMIT 1"; |
|
336 | 336 | $params = [ |
337 | 337 | 'ns' => $namespaceId, |
338 | 338 | 'title' => str_replace(' ', '_', $pageTitle), |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * This file contains only the ProjectRepository class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Repository; |
9 | 9 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | || $projMetadata['url'] == "https://$project" |
167 | 167 | || $projMetadata['url'] == "https://$project.org" |
168 | 168 | || $projMetadata['url'] == "https://www.$project") { |
169 | - $this->log->debug(__METHOD__ . " Using cached data for $project"); |
|
169 | + $this->log->debug(__METHOD__." Using cached data for $project"); |
|
170 | 170 | return $projMetadata; |
171 | 171 | } |
172 | 172 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | $optedIn = $this->container->getParameter('opted_in'); |
311 | 311 | // In case there's just one given. |
312 | 312 | if (!is_array($optedIn)) { |
313 | - $optedIn = [ $optedIn ]; |
|
313 | + $optedIn = [$optedIn]; |
|
314 | 314 | } |
315 | 315 | return $optedIn; |
316 | 316 | } |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | ]])->getBody()->getContents(), true); |
379 | 379 | |
380 | 380 | $extensions = $res['query']['extensions'] ?? []; |
381 | - return array_map(function ($extension) { |
|
381 | + return array_map(function($extension) { |
|
382 | 382 | return $extension['name']; |
383 | 383 | }, $extensions); |
384 | 384 | } |
@@ -3,7 +3,7 @@ |
||
3 | 3 | * This file contains only the AdminScoreRepository class. |
4 | 4 | */ |
5 | 5 | |
6 | -declare(strict_types = 1); |
|
6 | +declare(strict_types=1); |
|
7 | 7 | |
8 | 8 | namespace AppBundle\Repository; |
9 | 9 |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | |
113 | 113 | // Construct the page name |
114 | 114 | if (!isset($this->getParameter('rfx')[$domain]['pages'][$type])) { |
115 | - $pageTitle= ''; |
|
115 | + $pageTitle = ''; |
|
116 | 116 | } else { |
117 | - $pageTitle= $this->getParameter('rfx')[$domain]['pages'][$type]; |
|
117 | + $pageTitle = $this->getParameter('rfx')[$domain]['pages'][$type]; |
|
118 | 118 | } |
119 | 119 | |
120 | - $pageTitle.= '/'.$this->user->getUsername(); |
|
120 | + $pageTitle .= '/'.$this->user->getUsername(); |
|
121 | 121 | $page = new Page($this->project, $pageTitle); |
122 | 122 | $pageRepo = new PageRepository(); |
123 | 123 | $pageRepo->setContainer($this->container); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $neutral = $rfx->getSection('neutral'); |
146 | 146 | $dup = $rfx->getDuplicates(); |
147 | 147 | |
148 | - $total = count($support) + count($oppose) + count($neutral); |
|
148 | + $total = count($support)+count($oppose)+count($neutral); |
|
149 | 149 | |
150 | 150 | if (0 === $total) { |
151 | 151 | $this->addFlashMessage('notice', 'no-result', [$pageTitle]); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | 'total_editcount' => $this->autoEdits->getEditCount(), |
245 | 245 | 'automated_editcount' => $this->autoEdits->getAutomatedCount(), |
246 | 246 | ]; |
247 | - $ret['nonautomated_editcount'] = $ret['total_editcount'] - $ret['automated_editcount']; |
|
247 | + $ret['nonautomated_editcount'] = $ret['total_editcount']-$ret['automated_editcount']; |
|
248 | 248 | |
249 | 249 | if ('' != $tools) { |
250 | 250 | $tools = $this->autoEdits->getToolCounts(); |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | |
277 | 277 | $this->setupAutoEdits(); |
278 | 278 | |
279 | - $ret = array_map(function ($rev) { |
|
279 | + $ret = array_map(function($rev) { |
|
280 | 280 | return array_merge([ |
281 | 281 | 'full_page_title' => $this->getPageFromNsAndTitle( |
282 | 282 | (int)$rev['page_namespace'], |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $ret['tool'] = $this->autoEdits->getTool(); |
318 | 318 | } |
319 | 319 | |
320 | - $ret['automated_edits'] = array_map(function ($rev) { |
|
320 | + $ret['automated_edits'] = array_map(function($rev) { |
|
321 | 321 | return array_merge([ |
322 | 322 | 'full_page_title' => $this->getPageFromNsAndTitle( |
323 | 323 | (int)$rev['page_namespace'], |