Completed
Push — master ( 4ffd57...6a646c )
by Michael
02:30
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.
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   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
             $versions = array_map('trim', explode(',', $versions));
382 382
         }
383 383
         if (!empty($versions[0]['name'])) {
384
-            $versions = array_map(function ($version) {
384
+            $versions = array_map(function($version) {
385 385
                 return $version['name'];
386 386
             }, $versions);
387 387
         }
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
         if (!$util->isValidTimeStamp($updated)) {
410 410
             $updated = strtotime($updated);
411 411
         }
412
-        $this->updated = (int)$updated;
412
+        $this->updated = (int) $updated;
413 413
         return $this;
414 414
     }
415 415
 
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
     private function calculateColor($color)
691 691
     {
692 692
         /** @noinspection PrintfScanfArgumentsInspection */
693
-        list($r, $g, $b) = array_map(function ($color8bit) {
693
+        list($r, $g, $b) = array_map(function($color8bit) {
694 694
             $c = $color8bit / 255;
695 695
             if ($c <= 0.03928) {
696 696
                 $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
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     {
193 193
         $groups = $this->makeSingleGitLabGetRequest('/groups');
194 194
 
195
-        return array_map(function ($group) {
195
+        return array_map(function($group) {
196 196
             return $group['full_path'];
197 197
         }, $groups);
198 198
     }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                 $endpoint = "/projects/$organisation%2F{$project['path']}/hooks?per_page=100";
215 215
                 $repoHooks = $this->makeSingleGitLabGetRequest($endpoint);
216 216
             } catch (HTTPRequestException $e) {
217
-                $repo->error = (int)$e->getCode();
217
+                $repo->error = (int) $e->getCode();
218 218
             }
219 219
 
220 220
             $repoHooks = array_filter($repoHooks, [$this, 'isOurIssueHook']);
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
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
         $html = '<div class="org_repos">';
137 137
         $html .= '<p>' . $this->getLang('text:repo admin') . '</p>';
138 138
         $html .= '<div><ul>';
139
-        usort($repos, function ($repo1, $repo2) {
139
+        usort($repos, function($repo1, $repo2) {
140 140
             return $repo1->displayName < $repo2->displayName ? -1 : 1;
141 141
         });
142 142
         $importSVG = inlineSVG(__DIR__ . '/../images/import.svg');
Please login to merge, or discard this patch.