Passed
Push — master ( 0ddf87...7b0474 )
by Michael
02:03
created
services/GitHub.service.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -334,7 +334,7 @@
 block discarded – undo
334 334
             }
335 335
         }
336 336
         // fixme: add 'user repos'!
337
-        return array_map(function ($org) {
337
+        return array_map(function($org) {
338 338
             return $org['login'];
339 339
         }, $this->orgs);
340 340
     }
Please login to merge, or discard this patch.
action/ajax.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
         $html = '<div class="org_repos">';
143 143
         $html .= '<p>Below are the repositories of the organisation to which the authorized user has access to. Click on the icon to create/delete the webhook.</p>';
144 144
         $html .= '<div><ul>';
145
-        usort($repos, function ($repo1, $repo2) {
145
+        usort($repos, function($repo1, $repo2) {
146 146
             return $repo1->displayName < $repo2->displayName ? -1 : 1;
147 147
         });
148 148
         foreach ($repos as $repo) {
Please login to merge, or discard this patch.
helper/db.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
             'versions' => implode(',', $issue->getVersions()),
262 262
             'updated' => $issue->getUpdated(),
263 263
         ]);
264
-        return (bool)$ok;
264
+        return (bool) $ok;
265 265
     }
266 266
 
267 267
     /**
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
         if (!$util->isValidTimeStamp($rev)) {
394 394
             throw new InvalidArgumentException("Second parameter must be a valid timestamp!");
395 395
         }
396
-        if ((int)$rev === 0) {
396
+        if ((int) $rev === 0) {
397 397
             $rev = filemtime(wikiFN($page));
398 398
             $changelog = new PageChangelog($page);
399 399
             $rev_info = $changelog->getRevisionInfo($rev);
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
             $this->savePageRev($page, $rev, $rev_info['sum'], $user);
402 402
         }
403 403
         /** @noinspection TypeUnsafeComparisonInspection this is done to ensure $issue_id is a natural number */
404
-        if (!is_numeric($issue_id) || (int)$issue_id != $issue_id) {
404
+        if (!is_numeric($issue_id) || (int) $issue_id != $issue_id) {
405 405
             throw new InvalidArgumentException("IssueId must be an integer!");
406 406
         }
407 407
         $ok = $this->saveEntity('pagerev_issues', [
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
             'type' => $type,
415 415
         ]);
416 416
 
417
-        return (bool)$ok;
417
+        return (bool) $ok;
418 418
     }
419 419
 
420 420
     /**
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
             'summary' => $summary,
444 444
             'user' => $user,
445 445
         ]);
446
-        return (bool)$ok;
446
+        return (bool) $ok;
447 447
     }
448 448
 
449 449
     /**
Please login to merge, or discard this patch.
helper/util.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function sendResponse($code, $msg)
87 87
     {
88 88
         header('Content-Type: application/json');
89
-        if ((int)$code === 204) {
89
+        if ((int) $code === 204) {
90 90
             http_status(200);
91 91
         } else {
92 92
             http_status($code);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function isValidTimeStamp($timestamp)
109 109
     {
110
-        return ((string)(int)$timestamp === (string)$timestamp);
110
+        return ((string) (int) $timestamp === (string) $timestamp);
111 111
     }
112 112
 
113 113
 }
Please login to merge, or discard this patch.
classes/Issue.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             $components = array_filter(array_map('trim', explode(',', $components)));
297 297
         }
298 298
         if (!empty($components[0]['name'])) {
299
-            $components = array_map(function ($component) {
299
+            $components = array_map(function($component) {
300 300
                 return $component['name'];
301 301
             }, $components);
302 302
         }
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
             $versions = array_map('trim', explode(',', $versions));
384 384
         }
385 385
         if (!empty($versions[0]['name'])) {
386
-            $versions = array_map(function ($version) {
386
+            $versions = array_map(function($version) {
387 387
                 return $version['name'];
388 388
             }, $versions);
389 389
         }
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         if (!$util->isValidTimeStamp($updated)) {
412 412
             $updated = strtotime($updated);
413 413
         }
414
-        $this->updated = (int)$updated;
414
+        $this->updated = (int) $updated;
415 415
         return $this;
416 416
     }
417 417
 
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
     private function calculateColor($color)
707 707
     {
708 708
         /** @noinspection PrintfScanfArgumentsInspection */
709
-        list($r, $g, $b) = array_map(function ($color8bit) {
709
+        list($r, $g, $b) = array_map(function($color8bit) {
710 710
             $c = $color8bit / 255;
711 711
             if ($c <= 0.03928) {
712 712
                 $cl = $c / 12.92;
Please login to merge, or discard this patch.
services/GitLab.service.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     {
203 203
         $groups = $this->makeSingleGitLabGetRequest('/groups');
204 204
 
205
-        return array_map(function ($group) {
205
+        return array_map(function($group) {
206 206
             return $group['full_path'];
207 207
         }, $groups);
208 208
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             try {
226 226
                 $repoHooks = $this->makeSingleGitLabGetRequest("/projects/$organisation%2F{$project['path']}/hooks?per_page=100");
227 227
             } catch (HTTPRequestException $e) {
228
-                $repo->error = (int)$e->getCode();
228
+                $repo->error = (int) $e->getCode();
229 229
             }
230 230
 
231 231
             $repoHooks = array_filter($repoHooks, [$this, 'isOurIssueHook']);
Please login to merge, or discard this patch.