@@ -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 XtoolsHttpException class. |
@@ -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 AppBundle class. |
@@ -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 AdminStats class. |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -declare(strict_types = 1); |
|
| 6 | +declare(strict_types=1); |
|
| 7 | 7 | |
| 8 | 8 | namespace AppBundle\Model; |
| 9 | 9 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | public function numDays(): int |
| 117 | 117 | { |
| 118 | - return (int)(($this->end - $this->start) / 60 / 60 / 24); |
|
| 118 | + return (int)(($this->end-$this->start) / 60 / 60 / 24); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $stats = $this->groupAdminStatsByUsername($stats, $abbreviateGroups); |
| 145 | 145 | |
| 146 | 146 | // Resort, as for some reason the SQL isn't doing this properly. |
| 147 | - uasort($stats, function ($a, $b) { |
|
| 147 | + uasort($stats, function($a, $b) { |
|
| 148 | 148 | if ($a['total'] === $b['total']) { |
| 149 | 149 | return 0; |
| 150 | 150 | } |
@@ -237,6 +237,6 @@ discard block |
||
| 237 | 237 | */ |
| 238 | 238 | public function getNumNonAdminsWithActions(): int |
| 239 | 239 | { |
| 240 | - return count($this->adminStats) - $this->numAdminsWithActions; |
|
| 240 | + return count($this->adminStats)-$this->numAdminsWithActions; |
|
| 241 | 241 | } |
| 242 | 242 | } |
@@ -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 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | || $projMetadata['url'] == "https://$project" |
| 166 | 166 | || $projMetadata['url'] == "https://$project.org" |
| 167 | 167 | || $projMetadata['url'] == "https://www.$project") { |
| 168 | - $this->log->debug(__METHOD__ . " Using cached data for $project"); |
|
| 168 | + $this->log->debug(__METHOD__." Using cached data for $project"); |
|
| 169 | 169 | return $projMetadata; |
| 170 | 170 | } |
| 171 | 171 | } |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | $optedIn = $this->container->getParameter('opted_in'); |
| 310 | 310 | // In case there's just one given. |
| 311 | 311 | if (!is_array($optedIn)) { |
| 312 | - $optedIn = [ $optedIn ]; |
|
| 312 | + $optedIn = [$optedIn]; |
|
| 313 | 313 | } |
| 314 | 314 | return $optedIn; |
| 315 | 315 | } |