Passed
Push — master ( bcd4f7...1bf514 )
by Goffy
03:22
created
class/Github/Api.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             $urlPath = $this->expandUriTemplate($urlPath, $parameters, $this->defaultParameters);
255 255
         }
256 256
 
257
-        $url = rtrim($baseUrl, '/') . '/' . ltrim($urlPath, '/');
257
+        $url = rtrim($baseUrl, '/').'/'.ltrim($urlPath, '/');
258 258
 
259 259
         if ($content !== NULL && (is_array($content) || is_object($content))) {
260 260
             $headers['Content-Type'] = 'application/json; charset=utf-8';
@@ -394,13 +394,13 @@  discard block
 block discarded – undo
394 394
             }
395 395
             $parameter = $parameters[$m[2]];
396 396
             unset($parameters[$m[2]]);
397
-            return $m[1] . rawurlencode($parameter);
397
+            return $m[1].rawurlencode($parameter);
398 398
         }, $url);
399 399
 
400 400
         $url = rtrim($url, '/');
401 401
 
402 402
         if (count($parameters)) {
403
-            $url .= '?' . http_build_query($parameters);
403
+            $url .= '?'.http_build_query($parameters);
404 404
         }
405 405
 
406 406
         return $url;
@@ -421,14 +421,14 @@  discard block
 block discarded – undo
421 421
         $parameters += $defaultParameters;
422 422
 
423 423
         static $operatorFlags = [
424
-            ''  => ['prefix' => '',  'separator' => ',', 'named' => FALSE, 'ifEmpty' => '',  'reserved' => FALSE],
425
-            '+' => ['prefix' => '',  'separator' => ',', 'named' => FALSE, 'ifEmpty' => '',  'reserved' => TRUE],
426
-            '#' => ['prefix' => '#', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '',  'reserved' => TRUE],
427
-            '.' => ['prefix' => '.', 'separator' => '.', 'named' => FALSE, 'ifEmpty' => '',  'reserved' => FALSE],
428
-            '/' => ['prefix' => '/', 'separator' => '/', 'named' => FALSE, 'ifEmpty' => '',  'reserved' => FALSE],
429
-            ';' => ['prefix' => ';', 'separator' => ';', 'named' => TRUE,  'ifEmpty' => '',  'reserved' => FALSE],
430
-            '?' => ['prefix' => '?', 'separator' => '&', 'named' => TRUE,  'ifEmpty' => '=', 'reserved' => FALSE],
431
-            '&' => ['prefix' => '&', 'separator' => '&', 'named' => TRUE,  'ifEmpty' => '=', 'reserved' => FALSE],
424
+            ''  => ['prefix' => '', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => FALSE],
425
+            '+' => ['prefix' => '', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => TRUE],
426
+            '#' => ['prefix' => '#', 'separator' => ',', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => TRUE],
427
+            '.' => ['prefix' => '.', 'separator' => '.', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => FALSE],
428
+            '/' => ['prefix' => '/', 'separator' => '/', 'named' => FALSE, 'ifEmpty' => '', 'reserved' => FALSE],
429
+            ';' => ['prefix' => ';', 'separator' => ';', 'named' => TRUE, 'ifEmpty' => '', 'reserved' => FALSE],
430
+            '?' => ['prefix' => '?', 'separator' => '&', 'named' => TRUE, 'ifEmpty' => '=', 'reserved' => FALSE],
431
+            '&' => ['prefix' => '&', 'separator' => '&', 'named' => TRUE, 'ifEmpty' => '=', 'reserved' => FALSE],
432 432
         ];
433 433
 
434 434
         return preg_replace_callback('~{([+#./;?&])?([^}]+?)}~', function($m) use ($url, & $parameters, $operatorFlags) {
@@ -463,17 +463,17 @@  discard block
 block discarded – undo
463 463
                     if ($explode) {
464 464
                         $parts = [];
465 465
                         if ($isAssoc) {
466
-                            $this->walk($value, function ($v, $k) use (& $parts, $flags, $maxLength) {
466
+                            $this->walk($value, function($v, $k) use (& $parts, $flags, $maxLength) {
467 467
                                 $parts[] = $this->prefix(['named' => TRUE] + $flags, $k, $this->escape($flags, $v, $maxLength));
468 468
                             });
469 469
 
470 470
                         } elseif ($flags['named']) {
471
-                            $this->walk($value, function ($v) use (& $parts, $flags, $name, $maxLength) {
471
+                            $this->walk($value, function($v) use (& $parts, $flags, $name, $maxLength) {
472 472
                                 $parts[] = $this->prefix($flags, $name, $this->escape($flags, $v, $maxLength));
473 473
                             });
474 474
 
475 475
                         } else {
476
-                            $this->walk($value, function ($v) use (& $parts, $flags, $maxLength) {
476
+                            $this->walk($value, function($v) use (& $parts, $flags, $maxLength) {
477 477
                                 $parts[] = $this->escape($flags, $v, $maxLength);
478 478
                             });
479 479
                         }
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
             }
505 505
 
506 506
             if (isset($translated[0])) {
507
-                return $flags['prefix'] . implode($flags['separator'], $translated);
507
+                return $flags['prefix'].implode($flags['separator'], $translated);
508 508
             }
509 509
 
510 510
             return '';
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
             }
531 531
         }
532 532
 
533
-        return $prefix . $value;
533
+        return $prefix.$value;
534 534
     }
535 535
 
536 536
 
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
         $value = (string) $value;
546 546
 
547 547
         if ($maxLength !== NULL) {
548
-            if (preg_match('~^(.{' . $maxLength . '}).~u', $value, $m)) {
548
+            if (preg_match('~^(.{'.$maxLength.'}).~u', $value, $m)) {
549 549
                 $value = $m[1];
550 550
             } elseif (strlen($value) > $maxLength) {  # when malformed UTF-8
551 551
                 $value = substr($value, 0, $maxLength);
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 
559 559
             $escaped = '';
560 560
             for ($i = 0, $count = count($parts); $i < $count; $i += 2) {
561
-                $escaped .= rawurlencode($parts[$i]) . $parts[$i + 1];
561
+                $escaped .= rawurlencode($parts[$i]).$parts[$i + 1];
562 562
             }
563 563
 
564 564
             return $escaped;
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 
597 597
         if (isset($content->errors)) {
598 598
             $message .= implode(', ', array_map(function($error) {
599
-                return '[' . implode(':', (array) $error) . ']';
599
+                return '['.implode(':', (array) $error).']';
600 600
             }, $content->errors));
601 601
         }
602 602
 
Please login to merge, or discard this patch.
class/Github/Storages/FileCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             throw new MissingDirectoryException("Directory '$tempDir' is missing.");
28 28
         }
29 29
 
30
-        $dir = $tempDir . DIRECTORY_SEPARATOR . 'milo.github-api';
30
+        $dir = $tempDir.DIRECTORY_SEPARATOR.'milo.github-api';
31 31
 
32 32
         if (!is_dir($dir)) {
33 33
             set_error_handler(function($severity, $message, $file, $line) use ($dir, & $valid) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     private function filePath($key)
93 93
     {
94
-        return $this->dir . DIRECTORY_SEPARATOR . sha1($key) . '.php';
94
+        return $this->dir.DIRECTORY_SEPARATOR.sha1($key).'.php';
95 95
     }
96 96
 
97 97
 }
Please login to merge, or discard this patch.
class/Github/OAuth/Login.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 
65 65
         $this->storage->set('auth.state', $state);
66 66
 
67
-        $url = $this->authUrl . '?' . http_build_query($params);
67
+        $url = $this->authUrl.'?'.http_build_query($params);
68 68
         if ($redirectCb === NULL) {
69 69
             header("Location: $url");
70 70
             die();
Please login to merge, or discard this patch.
class/Directories.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -135,9 +135,9 @@
 block discarded – undo
135 135
         $ret['name']        = $this->getVar('dir_name');
136 136
         $ret['type']        = $this->getVar('dir_type');
137 137
         $ret['type_text']   = Constants::DIRECTORY_TYPE_USER == $this->getVar('dir_type') ? \_AM_WGGITHUB_DIRECTORY_TYPE_USER : \_AM_WGGITHUB_DIRECTORY_TYPE_ORG;
138
-        $ret['autoupdate']  = (int)$this->getVar('dir_autoupdate') > 0 ? _YES : _NO;
139
-        $ret['online']      = (int)$this->getVar('dir_online') > 0 ? _YES : _NO;
140
-        $ret['filterrelease'] = (int)$this->getVar('dir_filterrelease') > 0 ? _YES : _NO;
138
+        $ret['autoupdate']  = (int) $this->getVar('dir_autoupdate') > 0 ? _YES : _NO;
139
+        $ret['online']      = (int) $this->getVar('dir_online') > 0 ? _YES : _NO;
140
+        $ret['filterrelease'] = (int) $this->getVar('dir_filterrelease') > 0 ? _YES : _NO;
141 141
         $ret['datecreated'] = \formatTimestamp($this->getVar('dir_datecreated'), 's');
142 142
         $ret['submitter']   = \XoopsUser::getUnameFromId($this->getVar('dir_submitter'));
143 143
         return $ret;
Please login to merge, or discard this patch.
class/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
         $ret['options']       = \strip_tags($this->getVar('set_options', 'e'));
128 128
         $editorMaxchar = $helper->getConfig('editor_maxchar');
129 129
         $ret['options_short'] = $utility::truncateHtml($ret['options'], $editorMaxchar);
130
-        $ret['primary']       = (int)$this->getVar('set_primary') > 0 ? _YES : _NO;
130
+        $ret['primary']       = (int) $this->getVar('set_primary') > 0 ? _YES : _NO;
131 131
         $ret['date']          = \formatTimestamp($this->getVar('set_date'), 's');
132 132
         $ret['submitter']     = \XoopsUser::getUnameFromId($this->getVar('set_submitter'));
133 133
         return $ret;
Please login to merge, or discard this patch.
class/Constants.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     public const PERM_README_UPDATE = 3;
53 53
 
54 54
     // Constants for log type
55
-    public const LOG_TYPE_NONE  = 0;
55
+    public const LOG_TYPE_NONE = 0;
56 56
     public const LOG_TYPE_UPDATE_START = 1;
57 57
     public const LOG_TYPE_UPDATE_END   = 2;
58 58
     public const LOG_TYPE_REQUEST      = 3;
Please login to merge, or discard this patch.
class/Releases.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,15 +132,15 @@
 block discarded – undo
132 132
      */
133 133
     public function getValuesReleases($keys = null, $format = null, $maxDepth = null)
134 134
     {
135
-        $helper  = \XoopsModules\Wggithub\Helper::getInstance();
135
+        $helper = \XoopsModules\Wggithub\Helper::getInstance();
136 136
         $ret = $this->getValues($keys, $format, $maxDepth);
137
-        $ret['id']          = $this->getVar('rel_id');
137
+        $ret['id'] = $this->getVar('rel_id');
138 138
         $repositoriesHandler = $helper->getHandler('Repositories');
139 139
         $repositoriesObj = $repositoriesHandler->get($this->getVar('rel_repoid'));
140
-        $ret['repoid']        = $repositoriesObj->getVar('repo_name');
140
+        $ret['repoid'] = $repositoriesObj->getVar('repo_name');
141 141
         $ret['type']        = $this->getVar('rel_type');
142 142
         $ret['name']        = $this->getVar('rel_name');
143
-        $ret['prerelease']  = (int)$this->getVar('rel_prerelease') > 0 ? _YES : _NO;
143
+        $ret['prerelease']  = (int) $this->getVar('rel_prerelease') > 0 ? _YES : _NO;
144 144
         $ret['publishedat'] = \formatTimestamp($this->getVar('rel_publishedat'), 'm');
145 145
         $ret['tarballurl']  = $this->getVar('rel_tarballurl');
146 146
         $ret['zipballurl']  = $this->getVar('rel_zipballurl');
Please login to merge, or discard this patch.
readmes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 use XoopsModules\Wggithub\Constants;
26 26
 use XoopsModules\Wggithub\Common;
27 27
 
28
-require __DIR__ . '/header.php';
28
+require __DIR__.'/header.php';
29 29
 $GLOBALS['xoopsOption']['template_main'] = 'wggithub_readmes.tpl';
30
-include_once XOOPS_ROOT_PATH . '/header.php';
30
+include_once XOOPS_ROOT_PATH.'/header.php';
31 31
 
32 32
 $op    = Request::getCmd('op', 'list');
33 33
 $start = Request::getInt('start', 0);
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
             unset($readmes);
69 69
             // Display Navigation
70 70
             if ($readmesCount > $limit) {
71
-                include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
72
-                $pagenav = new \XoopsPageNav($readmesCount, $limit, $start, 'start', 'op=list&limit=' . $limit);
71
+                include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
72
+                $pagenav = new \XoopsPageNav($readmesCount, $limit, $start, 'start', 'op=list&limit='.$limit);
73 73
                 $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
74 74
             }
75 75
             $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type'));
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 $xoBreadcrumbs[] = ['title' => _MA_WGGITHUB_READMES];
84 84
 
85 85
 // Keywords
86
-wggithubMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords));
86
+wggithubMetaKeywords($helper->getConfig('keywords').', '.\implode(',', $keywords));
87 87
 unset($keywords);
88 88
 
89 89
 // Description
@@ -91,4 +91,4 @@  discard block
 block discarded – undo
91 91
 $GLOBALS['xoopsTpl']->assign('xoops_mpageurl', WGGITHUB_URL.'/readmes.php');
92 92
 $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL);
93 93
 
94
-require __DIR__ . '/footer.php';
94
+require __DIR__.'/footer.php';
Please login to merge, or discard this patch.
directories.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 use XoopsModules\Wggithub\Constants;
26 26
 use XoopsModules\Wggithub\Common;
27 27
 
28
-require __DIR__ . '/header.php';
28
+require __DIR__.'/header.php';
29 29
 $GLOBALS['xoopsOption']['template_main'] = 'wggithub_directories.tpl';
30
-include_once \XOOPS_ROOT_PATH . '/header.php';
30
+include_once \XOOPS_ROOT_PATH.'/header.php';
31 31
 
32 32
 $op    = Request::getCmd('op', 'list');
33 33
 $start = Request::getInt('start', 0);
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
             unset($directories);
71 71
             // Display Navigation
72 72
             if ($directoriesCount > $limit) {
73
-                include_once \XOOPS_ROOT_PATH . '/class/pagenav.php';
74
-                $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit=' . $limit);
73
+                include_once \XOOPS_ROOT_PATH.'/class/pagenav.php';
74
+                $pagenav = new \XoopsPageNav($directoriesCount, $limit, $start, 'start', 'op=list&limit='.$limit);
75 75
                 $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
76 76
             }
77 77
             $GLOBALS['xoopsTpl']->assign('type', $helper->getConfig('table_type'));
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 $xoBreadcrumbs[] = ['title' => \_MA_WGGITHUB_DIRECTORIES];
86 86
 
87 87
 // Keywords
88
-wggithubMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords));
88
+wggithubMetaKeywords($helper->getConfig('keywords').', '.\implode(',', $keywords));
89 89
 unset($keywords);
90 90
 
91 91
 // Description
@@ -93,4 +93,4 @@  discard block
 block discarded – undo
93 93
 $GLOBALS['xoopsTpl']->assign('xoops_mpageurl', WGGITHUB_URL.'/directories.php');
94 94
 $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL);
95 95
 
96
-require __DIR__ . '/footer.php';
96
+require __DIR__.'/footer.php';
Please login to merge, or discard this patch.