@@ -334,7 +334,7 @@ |
||
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 | } |
@@ -142,7 +142,7 @@ |
||
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) { |
@@ -261,7 +261,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
443 | 443 | 'summary' => $summary, |
444 | 444 | 'user' => $user, |
445 | 445 | ]); |
446 | - return (bool)$ok; |
|
446 | + return (bool) $ok; |
|
447 | 447 | } |
448 | 448 | |
449 | 449 | /** |
@@ -86,7 +86,7 @@ discard block |
||
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 |
||
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 | } |
@@ -202,7 +202,7 @@ discard block |
||
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 |
||
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']); |
@@ -381,7 +381,7 @@ discard block |
||
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 |
||
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 |
||
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; |