| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | <?php | 
| 2 | -declare(strict_types = 1); | |
| 2 | +declare(strict_types=1); | |
| 3 | 3 | |
| 4 | 4 | namespace App\Twig; | 
| 5 | 5 | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | -declare(strict_types = 1); | |
| 3 | +declare(strict_types=1); | |
| 4 | 4 | |
| 5 | 5 | namespace App; | 
| 6 | 6 | |
| @@ -118,7 +118,7 @@ | ||
| 118 | 118 |          $actions = is_array($actionsQuery) ? $actionsQuery : explode('|', $actionsQuery); | 
| 119 | 119 | |
| 120 | 120 | // Filter out any invalid section IDs. | 
| 121 | -        $actions = array_filter($actions, function ($action) use ($group) { | |
| 121 | +        $actions = array_filter($actions, function($action) use ($group) { | |
| 122 | 122 | return in_array($action, $this->getActionNames($group)); | 
| 123 | 123 | }); | 
| 124 | 124 | |
| @@ -3,7 +3,7 @@ | ||
| 3 | 3 | * This file contains only the PageAssessmentsRepository class. | 
| 4 | 4 | */ | 
| 5 | 5 | |
| 6 | -declare(strict_types = 1); | |
| 6 | +declare(strict_types=1); | |
| 7 | 7 | |
| 8 | 8 | namespace App\Repository; | 
| 9 | 9 | |
| @@ -3,7 +3,7 @@ | ||
| 3 | 3 | * This file contains only the AdminStatsRepository class. | 
| 4 | 4 | */ | 
| 5 | 5 | |
| 6 | -declare(strict_types = 1); | |
| 6 | +declare(strict_types=1); | |
| 7 | 7 | |
| 8 | 8 | namespace App\Repository; | 
| 9 | 9 | |
| @@ -3,7 +3,7 @@ discard block | ||
| 3 | 3 | * This file contains only the Repository class. | 
| 4 | 4 | */ | 
| 5 | 5 | |
| 6 | -declare(strict_types = 1); | |
| 6 | +declare(strict_types=1); | |
| 7 | 7 | |
| 8 | 8 | namespace App\Repository; | 
| 9 | 9 | |
| @@ -221,7 +221,7 @@ discard block | ||
| 221 | 221 | // $tableExtension in order to generate the new table name | 
| 222 | 222 |          if ($this->isLabs() && null !== $tableExtension) { | 
| 223 | 223 | $mapped = true; | 
| 224 | -            $tableName .=('' === $tableExtension ? '' : '_'.$tableExtension); | |
| 224 | +            $tableName .= ('' === $tableExtension ? '' : '_'.$tableExtension); | |
| 225 | 225 |          } elseif ($this->container->hasParameter("app.table.$tableName")) { | 
| 226 | 226 | // Use the table specified in the table mapping configuration, if present. | 
| 227 | 227 | $mapped = true; | 
| @@ -233,7 +233,7 @@ discard block | ||
| 233 | 233 | // This is a safeguard in case table mapping isn't properly set up. | 
| 234 | 234 | $isLoggingOrRevision = in_array($tableName, ['revision', 'logging', 'archive']); | 
| 235 | 235 |          if (!$mapped && $isLoggingOrRevision && $this->isLabs()) { | 
| 236 | - $tableName .="_userindex"; | |
| 236 | + $tableName .= "_userindex"; | |
| 237 | 237 | } | 
| 238 | 238 | |
| 239 | 239 | // Figure out database name. | 
| @@ -352,7 +352,7 @@ discard block | ||
| 352 | 352 |              $offset = date('YmdHis', $offset); | 
| 353 | 353 |              $datesConditions .= " AND {$tableAlias}{$field} <= '$offset'"; | 
| 354 | 354 |          } elseif (is_int($end)) { | 
| 355 | -            $end = date('Ymd', $end) . '235959'; | |
| 355 | +            $end = date('Ymd', $end).'235959'; | |
| 356 | 356 |              $datesConditions .= " AND {$tableAlias}{$field} <= '$end'"; | 
| 357 | 357 | } | 
| 358 | 358 | |
| @@ -3,7 +3,7 @@ discard block | ||
| 3 | 3 | * This file contains only the Page class. | 
| 4 | 4 | */ | 
| 5 | 5 | |
| 6 | -declare(strict_types = 1); | |
| 6 | +declare(strict_types=1); | |
| 7 | 7 | |
| 8 | 8 | namespace App\Model; | 
| 9 | 9 | |
| @@ -126,7 +126,7 @@ discard block | ||
| 126 | 126 | $title = $info['title'] ?? $this->unnormalizedPageName; | 
| 127 | 127 | $nsName = $this->getNamespaceName(); | 
| 128 | 128 | return $nsName | 
| 129 | - ? str_replace($nsName . ':', '', $title) | |
| 129 | + ? str_replace($nsName.':', '', $title) | |
| 130 | 130 | : $title; | 
| 131 | 131 | } | 
| 132 | 132 | |
| @@ -332,7 +332,7 @@ discard block | ||
| 332 | 332 |      { | 
| 333 | 333 | $content = $this->getRepository()->getPagesWikitext( | 
| 334 | 334 | $this->getProject(), | 
| 335 | - [ $this->getTitle() ] | |
| 335 | + [$this->getTitle()] | |
| 336 | 336 | ); | 
| 337 | 337 | |
| 338 | 338 | return $content[$this->getTitle()] ?? null; | 
| @@ -398,7 +398,7 @@ discard block | ||
| 398 | 398 | |
| 399 | 399 | $wikidataInfo = $this->getRepository()->getWikidataInfo($this); | 
| 400 | 400 | |
| 401 | -        $terms = array_map(function ($entry) { | |
| 401 | +        $terms = array_map(function($entry) { | |
| 402 | 402 | return $entry['term']; | 
| 403 | 403 | }, $wikidataInfo); | 
| 404 | 404 | |
| @@ -409,7 +409,7 @@ discard block | ||
| 409 | 409 | 'prio' => 2, | 
| 410 | 410 | 'name' => 'Wikidata', | 
| 411 | 411 | 'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n | 
| 412 | - 'explanation' => "See: <a target='_blank' " . | |
| 412 | + 'explanation' => "See: <a target='_blank' ". | |
| 413 | 413 | "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>", | 
| 414 | 414 | ]; | 
| 415 | 415 | } | 
| @@ -419,7 +419,7 @@ discard block | ||
| 419 | 419 | 'prio' => 3, | 
| 420 | 420 | 'name' => 'Wikidata', | 
| 421 | 421 | 'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n | 
| 422 | - 'explanation' => "See: <a target='_blank' " . | |
| 422 | + 'explanation' => "See: <a target='_blank' ". | |
| 423 | 423 | "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>", | 
| 424 | 424 | ]; | 
| 425 | 425 | } | 
| @@ -497,7 +497,7 @@ discard block | ||
| 497 | 497 | return 0; | 
| 498 | 498 | } | 
| 499 | 499 | |
| 500 | -        return array_sum(array_map(function ($item) { | |
| 500 | +        return array_sum(array_map(function($item) { | |
| 501 | 501 | return (int)$item['views']; | 
| 502 | 502 | }, $pageviews['items'])); | 
| 503 | 503 | } | 
| @@ -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 App\Model; | 
| 9 | 9 | |
| @@ -96,7 +96,7 @@ discard block | ||
| 96 | 96 | $stats = $this->groupStatsByUsername($stats); | 
| 97 | 97 | |
| 98 | 98 | // Resort, as for some reason the SQL doesn't do this properly. | 
| 99 | -        uasort($stats, function ($a, $b) { | |
| 99 | +        uasort($stats, function($a, $b) { | |
| 100 | 100 |              if ($a['total'] === $b['total']) { | 
| 101 | 101 | return 0; | 
| 102 | 102 | } | 
| @@ -127,7 +127,7 @@ discard block | ||
| 127 | 127 | $this->usersAndGroups = $this->project->getUsersInGroups($groupUserGroups['local'], $groupUserGroups['global']); | 
| 128 | 128 | |
| 129 | 129 | // Populate $this->usersInGroup with users who are in the relevant user group for $this->group. | 
| 130 | -        $this->usersInGroup = array_keys(array_filter($this->usersAndGroups, function ($groups) { | |
| 130 | +        $this->usersInGroup = array_keys(array_filter($this->usersAndGroups, function($groups) { | |
| 131 | 131 | return in_array($this->getRelevantUserGroup(), $groups); | 
| 132 | 132 | })); | 
| 133 | 133 | |
| @@ -150,7 +150,7 @@ discard block | ||
| 150 | 150 | } | 
| 151 | 151 | |
| 152 | 152 |          if ($wikiPath) { | 
| 153 | -            $out = array_map(function ($url) { | |
| 153 | +            $out = array_map(function($url) { | |
| 154 | 154 |                  return str_replace('.svg.png', '.svg', preg_replace('/.*\/18px-/', '', $url)); | 
| 155 | 155 | }, $out); | 
| 156 | 156 | } | 
| @@ -164,7 +164,7 @@ discard block | ||
| 164 | 164 | */ | 
| 165 | 165 | public function numDays(): int | 
| 166 | 166 |      { | 
| 167 | - return (int)(($this->end - $this->start) / 60 / 60 / 24) + 1; | |
| 167 | + return (int)(($this->end-$this->start) / 60 / 60 / 24)+1; | |
| 168 | 168 | } | 
| 169 | 169 | |
| 170 | 170 | /** | 
| @@ -254,6 +254,6 @@ discard block | ||
| 254 | 254 | */ | 
| 255 | 255 | public function getNumWithActionsNotInGroup(): int | 
| 256 | 256 |      { | 
| 257 | - return count($this->adminStats) - $this->numWithActions; | |
| 257 | + return count($this->adminStats)-$this->numWithActions; | |
| 258 | 258 | } | 
| 259 | 259 | } | 
| @@ -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 App\Model; | 
| 9 | 9 | |