Passed
Pull Request — master (#369)
by MarcoAurelio
15:42
created
src/AppBundle/Repository/TopEditsRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the TopEditsRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments() && 0 === $namespace;
59 59
         $paTable = $this->getTableName($project->getDatabaseName(), 'page_assessments');
60 60
         $paSelect = $hasPageAssessments
61
-            ?  ", (
61
+            ? ", (
62 62
                     SELECT pa_class
63 63
                     FROM $paTable
64 64
                     WHERE pa_page_id = page_id
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $hasPageAssessments = $this->isLabs() && $project->hasPageAssessments();
140 140
         $pageAssessmentsTable = $this->getTableName($project->getDatabaseName(), 'page_assessments');
141 141
         $paSelect = $hasPageAssessments
142
-            ?  ", (
142
+            ? ", (
143 143
                     SELECT pa_class
144 144
                     FROM $pageAssessmentsTable
145 145
                     WHERE pa_page_id = e.page_id
Please login to merge, or discard this patch.
src/AppBundle/Repository/PageAssessmentsRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
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 AppBundle\Repository;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/AdminStatsRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
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 AppBundle\Repository;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/CategoryEditsRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the CategoryEditsRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/UserRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the UserRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Repository/SimpleEditCounterRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the SimpleEditCounterRepository class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Repository;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Model/Page.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
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 AppBundle\Model;
9 9
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $info = $this->getPageInfo();
94 94
         $title = $info['title'] ?? $this->unnormalizedPageName;
95 95
         $nsName = $this->getNamespaceName();
96
-        return str_replace($nsName . ':', '', $title);
96
+        return str_replace($nsName.':', '', $title);
97 97
     }
98 98
 
99 99
     /**
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
     {
292 292
         $content = $this->getRepository()->getPagesWikitext(
293 293
             $this->getProject(),
294
-            [ $this->getTitle() ]
294
+            [$this->getTitle()]
295 295
         );
296 296
 
297 297
         return $content[$this->getTitle()] ?? null;
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 
360 360
         $wikidataInfo = $this->getRepository()->getWikidataInfo($this);
361 361
 
362
-        $terms = array_map(function ($entry) {
362
+        $terms = array_map(function($entry) {
363 363
             return $entry['term'];
364 364
         }, $wikidataInfo);
365 365
 
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                 'prio' => 2,
371 371
                 'name' => 'Wikidata',
372 372
                 'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
373
-                'explanation' => "See: <a target='_blank' " .
373
+                'explanation' => "See: <a target='_blank' ".
374 374
                     "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
375 375
             ];
376 376
         }
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
                 'prio' => 3,
381 381
                 'name' => 'Wikidata',
382 382
                 'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
383
-                'explanation' => "See: <a target='_blank' " .
383
+                'explanation' => "See: <a target='_blank' ".
384 384
                     "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
385 385
             ];
386 386
         }
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
             return 0;
459 459
         }
460 460
 
461
-        return array_sum(array_map(function ($item) {
461
+        return array_sum(array_map(function($item) {
462 462
             return (int)$item['views'];
463 463
         }, $pageviews['items']));
464 464
     }
Please login to merge, or discard this patch.
src/AppBundle/Model/Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
  * This file contains only the Model class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Model/Project.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the Project class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function getUrl(bool $withTrailingSlash = true): string
147 147
     {
148
-        return rtrim($this->getBasicInfo()['url'], '/') . ($withTrailingSlash ? '/' : '');
148
+        return rtrim($this->getBasicInfo()['url'], '/').($withTrailingSlash ? '/' : '');
149 149
     }
150 150
 
151 151
     /**
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     public function getScript(): string
191 191
     {
192 192
         $metadata = $this->getMetadata();
193
-        return $metadata['general']['script'] ?? $this->getScriptPath() . '/index.php';
193
+        return $metadata['general']['script'] ?? $this->getScriptPath().'/index.php';
194 194
     }
195 195
 
196 196
     /**
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      */
200 200
     public function getApiUrl(): string
201 201
     {
202
-        return rtrim($this->getUrl(), '/') . $this->getRepository()->getApiPath();
202
+        return rtrim($this->getUrl(), '/').$this->getRepository()->getApiPath();
203 203
     }
204 204
 
205 205
     /**
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function userOptInPage(User $user): string
260 260
     {
261
-        $localPageName = 'User:' . $user->getUsername() . '/EditCounterOptIn.js';
261
+        $localPageName = 'User:'.$user->getUsername().'/EditCounterOptIn.js';
262 262
         return $localPageName;
263 263
     }
264 264
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
         }
294 294
 
295 295
         // 4. Lastly, see if they've opted in globally on the default project or Meta.
296
-        $globalPageName = $user->getUsername() . '/EditCounterGlobalOptIn.js';
296
+        $globalPageName = $user->getUsername().'/EditCounterGlobalOptIn.js';
297 297
         $globalProject = $this->getRepository()->getGlobalProject();
298 298
         if ($globalProject instanceof Project) {
299 299
             $globalExists = $globalProject->getRepository()
Please login to merge, or discard this patch.