Passed
Pull Request — master (#316)
by
unknown
17:11 queued 11:20
created
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.
src/AppBundle/Model/RFX.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
  * An RFX object contains the parsed information for an RFX
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             }
107 107
         }
108 108
 
109
-        $final = [];    // initialize the final array
109
+        $final = []; // initialize the final array
110 110
         $finalRaw = []; // Initialize the raw data array
111 111
 
112 112
         foreach (array_keys($this->data) as $key) {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
         $final = array_count_values($final); // find repetition and its count
121 121
 
122
-        $final = array_diff($final, [1]);    // remove single occurrences
122
+        $final = array_diff($final, [1]); // remove single occurrences
123 123
 
124 124
         $this->duplicates = array_keys($final);
125 125
     }
Please login to merge, or discard this patch.
src/AppBundle/Model/UserRights.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 UserRights 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/AutoEdits.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the AutoEdits class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     private function getEditsFromRevs(array $revs): array
190 190
     {
191
-        return array_map(function ($rev) {
191
+        return array_map(function($rev) {
192 192
             /** @var Page $page Page object to be passed to the Edit contructor. */
193 193
             $page = $this->getPageFromRev($rev);
194 194
             $rev['user'] = $this->user;
@@ -251,8 +251,8 @@  discard block
 block discarded – undo
251 251
     public function getToolsTotal(): int
252 252
     {
253 253
         if (!is_int($this->toolsTotal)) {
254
-            $this->toolsTotal = array_reduce($this->getToolCounts(), function ($a, $b) {
255
-                return $a + $b['count'];
254
+            $this->toolsTotal = array_reduce($this->getToolCounts(), function($a, $b) {
255
+                return $a+$b['count'];
256 256
             });
257 257
         }
258 258
 
Please login to merge, or discard this patch.
src/AppBundle/EventSubscriber/DisabledToolSubscriber.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 DisabledToolSubscriber class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\EventSubscriber;
9 9
 
Please login to merge, or discard this patch.
src/AppBundle/Model/Edit.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the Edit class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         $isSection = preg_match_all("/^\/\* (.*?) \*\//", $summary, $sectionMatch);
277 277
 
278 278
         if ($isSection && isset($page)) {
279
-            $pageUrl = $project->getUrl(false) . str_replace(
279
+            $pageUrl = $project->getUrl(false).str_replace(
280 280
                 '$1',
281 281
                 $page->getTitle($useUnnormalizedPageTitle),
282 282
                 $project->getArticlePath()
@@ -286,8 +286,8 @@  discard block
 block discarded – undo
286 286
             // Must have underscores for the link to properly go to the section.
287 287
             $sectionTitleLink = htmlspecialchars(str_replace(' ', '_', $sectionTitle));
288 288
 
289
-            $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>&rarr;</a>" .
290
-                "<em class='text-muted'>" . htmlspecialchars($sectionTitle) . ":</em> ";
289
+            $sectionWikitext = "<a target='_blank' href='$pageUrl#$sectionTitleLink'>&rarr;</a>".
290
+                "<em class='text-muted'>".htmlspecialchars($sectionTitle).":</em> ";
291 291
             $summary = str_replace($sectionMatch[0][0], $sectionWikitext, $summary);
292 292
         }
293 293
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             );
302 302
 
303 303
             // Use normalized page title (underscored, capitalized).
304
-            $pageUrl = $project->getUrl(false) . str_replace(
304
+            $pageUrl = $project->getUrl(false).str_replace(
305 305
                 '$1',
306 306
                 ucfirst(str_replace(' ', '_', $wikiLinkPath)),
307 307
                 $project->getArticlePath()
@@ -339,8 +339,8 @@  discard block
 block discarded – undo
339 339
     public function getDiffUrl(): string
340 340
     {
341 341
         $project = $this->getProject();
342
-        $path = str_replace('$1', 'Special:Diff/' . $this->id, $project->getArticlePath());
343
-        return rtrim($project->getUrl(), '/') . $path;
342
+        $path = str_replace('$1', 'Special:Diff/'.$this->id, $project->getArticlePath());
343
+        return rtrim($project->getUrl(), '/').$path;
344 344
     }
345 345
 
346 346
     /**
@@ -350,8 +350,8 @@  discard block
 block discarded – undo
350 350
     public function getPermaUrl(): string
351 351
     {
352 352
         $project = $this->getProject();
353
-        $path = str_replace('$1', 'Special:PermaLink/' . $this->id, $project->getArticlePath());
354
-        return rtrim($project->getUrl(), '/') . $path;
353
+        $path = str_replace('$1', 'Special:PermaLink/'.$this->id, $project->getArticlePath());
354
+        return rtrim($project->getUrl(), '/').$path;
355 355
     }
356 356
 
357 357
     /**
Please login to merge, or discard this patch.
src/AppBundle/Model/TopEdits.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * This file contains only the TopEdits class.
4 4
  */
5 5
 
6
-declare(strict_types = 1);
6
+declare(strict_types=1);
7 7
 
8 8
 namespace AppBundle\Model;
9 9
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $firstDateTime = $this->topEdits[0]->getTimestamp();
141 141
         $lastDateTime = end($this->topEdits)->getTimestamp();
142
-        $secs = $firstDateTime->getTimestamp() - $lastDateTime->getTimestamp();
142
+        $secs = $firstDateTime->getTimestamp()-$lastDateTime->getTimestamp();
143 143
         $days = $secs / (60 * 60 * 24);
144 144
         return $days / count($this->topEdits);
145 145
     }
Please login to merge, or discard this patch.
src/AppBundle/Model/EditSummary.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 EditSummary 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.