Passed
Push — master ( 2d8b0d...b00485 )
by Goffy
03:09
created
class/Common/VersionChecks.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
             $currentVer = $versionText;
50 50
         }
51 51
         if (null === $requiredVer) {
52
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
52
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
53 53
         }
54 54
         $success = true;
55 55
 
56 56
         if (\version_compare($currentVer, $requiredVer, '<')) {
57 57
             $success = false;
58
-            $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
58
+            $module->setErrors(\sprintf(\constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
59 59
         }
60 60
 
61 61
         return $success;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         if (false !== $reqVer && '' !== $reqVer) {
86 86
             if (\version_compare($verNum, $reqVer, '<')) {
87
-                $module->setErrors(\sprintf(\constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
87
+                $module->setErrors(\sprintf(\constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum));
88 88
                 $success = false;
89 89
             }
90 90
         }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $moduleDirName      = \basename(\dirname(__DIR__, 2));
107 107
         $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
108 108
         $update             = '';
109
-        $repository         = 'XoopsModules25x/' . $moduleDirName;
109
+        $repository         = 'XoopsModules25x/'.$moduleDirName;
110 110
         //        $repository         = 'XoopsModules25x/publisher'; //for testing only
111 111
         $ret             = '';
112 112
         $infoReleasesUrl = "https://api.github.com/repos/$repository/releases";
@@ -120,14 +120,14 @@  discard block
 block discarded – undo
120 120
                 if (false === $curlReturn) {
121 121
                     \trigger_error(\curl_error($curlHandle));
122 122
                 } elseif (mb_strpos($curlReturn, 'Not Found')) {
123
-                    \trigger_error('Repository Not Found: ' . $infoReleasesUrl);
123
+                    \trigger_error('Repository Not Found: '.$infoReleasesUrl);
124 124
                 } else {
125 125
                     $file              = \json_decode($curlReturn, false);
126 126
                     $latestVersionLink = \sprintf("https://github.com/$repository/archive/%s.zip", $file ? reset($file)->tag_name : $default);
127 127
                     $latestVersion     = $file[0]->tag_name;
128 128
                     $prerelease        = $file[0]->prerelease;
129 129
                     if ('master' !== $latestVersionLink) {
130
-                        $update = \constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion;
130
+                        $update = \constant('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION').$latestVersion;
131 131
                     }
132 132
                     //"PHP-standardized" version
133 133
                     $latestVersion = \mb_strtolower($latestVersion);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                         $latestVersion = \str_replace('_', '', \mb_strtolower($latestVersion));
136 136
                         $latestVersion = \str_replace('final', '', \mb_strtolower($latestVersion));
137 137
                     }
138
-                    $moduleVersion = ($helper->getModule()->getInfo('version') . '_' . $helper->getModule()->getInfo('module_status'));
138
+                    $moduleVersion = ($helper->getModule()->getInfo('version').'_'.$helper->getModule()->getInfo('module_status'));
139 139
                     //"PHP-standardized" version
140 140
                     $moduleVersion = \str_replace(' ', '', \mb_strtolower($moduleVersion));
141 141
                     //                    $moduleVersion = '1.0'; //for testing only
Please login to merge, or discard this patch.
class/Common/Breadcrumb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         require $GLOBALS['xoops']->path('class/template.php');
74 74
         $breadcrumbTpl = new \XoopsTpl();
75 75
         $breadcrumbTpl->assign('breadcrumb', $this->bread);
76
-        $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl');
76
+        $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl');
77 77
         unset($breadcrumbTpl);
78 78
 
79 79
         return $html;
Please login to merge, or discard this patch.
class/Common/ServerStats.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,19 +36,19 @@  discard block
 block discarded – undo
36 36
         //        $query = $GLOBALS['xoopsDB']->query($sql);
37 37
         //        list($meta) = $GLOBALS['xoopsDB']->fetchRow($query);
38 38
         $html .= '<fieldset>';
39
-        $html .= "<legend style='font-weight: bold; color: #900;'>" . \constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . '</legend>';
39
+        $html .= "<legend style='font-weight: bold; color: #900;'>".\constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO').'</legend>';
40 40
         $html .= "<div style='padding: 8px;'>";
41 41
         //        $html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>";
42 42
         //        $html .= "<br>";
43 43
         //        $html .= "<br>";
44
-        $html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . '</div>';
44
+        $html .= '<div>'.\constant('CO_'.$moduleDirNameUpper.'_SPHPINI').'</div>';
45 45
         $html .= '<ul>';
46 46
 
47
-        $gdlib = \function_exists('gd_info') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
48
-        $html  .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
47
+        $gdlib = \function_exists('gd_info') ? '<span style="color: #008000;">'.\constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: #ff0000;">'.\constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>';
48
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib;
49 49
         if (\function_exists('gd_info')) {
50 50
             if (true === ($gdlib = gd_info())) {
51
-                $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
51
+                $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>';
52 52
             }
53 53
         }
54 54
 
@@ -58,18 +58,18 @@  discard block
 block discarded – undo
58 58
         //    $registerglobals = (!\ini_get('register_globals')) ? "<span style=\"color: #008000;\">" . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: #ff0000;\">" . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>';
59 59
         //    $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
60 60
 
61
-        $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
62
-        $html      .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
61
+        $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">'.\constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: #ff0000;">'.\constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>';
62
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads;
63 63
 
64
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('upload_max_filesize') . '</span></b>';
65
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('post_max_size') . '</span></b>';
66
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: #0000ff;">' . \ini_get('memory_limit') . '</span></b>';
64
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: #0000ff;">'.\ini_get('upload_max_filesize').'</span></b>';
65
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: #0000ff;">'.\ini_get('post_max_size').'</span></b>';
66
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: #0000ff;">'.\ini_get('memory_limit').'</span></b>';
67 67
         $html .= '</ul>';
68 68
         $html .= '<ul>';
69
-        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . \XOOPS_ROOT_PATH . '</b>';
69
+        $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.\XOOPS_ROOT_PATH.'</b>';
70 70
         $html .= '</ul>';
71 71
         $html .= '<br>';
72
-        $html .= \constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . '';
72
+        $html .= \constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC').'';
73 73
         $html .= '</div>';
74 74
         $html .= '</fieldset><br>';
75 75
 
Please login to merge, or discard this patch.
class/SettingsHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function setPrimarySetting($setId)
150 150
     {
151
-        $helper  = \XoopsModules\Wggithub\Helper::getInstance();
151
+        $helper = \XoopsModules\Wggithub\Helper::getInstance();
152 152
         $settingsObj = null;
153 153
         $settingsHandler = $helper->getHandler('Settings');
154 154
         if (isset($setId)) {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         }
159 159
 
160 160
         // reset all
161
-        $strSQL = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('wggithub_settings') . ' SET ' . $GLOBALS['xoopsDB']->prefix('wggithub_settings') . '.set_primary = 0';
161
+        $strSQL = 'UPDATE '.$GLOBALS['xoopsDB']->prefix('wggithub_settings').' SET '.$GLOBALS['xoopsDB']->prefix('wggithub_settings').'.set_primary = 0';
162 162
         $GLOBALS['xoopsDB']->queryF($strSQL);
163 163
         // Set Vars
164 164
         $settingsObj->setVar('set_primary', 1);
Please login to merge, or discard this patch.
class/Releases.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function getValuesReleases($keys = null, $format = null, $maxDepth = null)
138 138
     {
139
-        $helper  = \XoopsModules\Wggithub\Helper::getInstance();
139
+        $helper = \XoopsModules\Wggithub\Helper::getInstance();
140 140
         $ret = $this->getValues($keys, $format, $maxDepth);
141
-        $ret['id']          = $this->getVar('rel_id');
141
+        $ret['id'] = $this->getVar('rel_id');
142 142
         $repositoriesHandler = $helper->getHandler('Repositories');
143 143
         $repositoriesObj = $repositoriesHandler->get($this->getVar('rel_repoid'));
144 144
         if (\is_object($repositoriesObj)) {
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         }
149 149
         $ret['type']        = $this->getVar('rel_type');
150 150
         $ret['name']        = $this->getVar('rel_name');
151
-        $ret['prerelease']  = (int)$this->getVar('rel_prerelease') > 0 ? _YES : _NO;
151
+        $ret['prerelease']  = (int) $this->getVar('rel_prerelease') > 0 ? _YES : _NO;
152 152
         $ret['publishedat'] = \formatTimestamp($this->getVar('rel_publishedat'), 'm');
153 153
         $ret['tarballurl']  = $this->getVar('rel_tarballurl');
154 154
         $ret['zipballurl']  = $this->getVar('rel_zipballurl');
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
  * @author         Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com>
21 21
  */
22 22
 
23
-include \dirname(__DIR__, 2) . '/mainfile.php';
24
-include __DIR__ . '/include/common.php';
23
+include \dirname(__DIR__, 2).'/mainfile.php';
24
+include __DIR__.'/include/common.php';
25 25
 $moduleDirName = \basename(__DIR__);
26 26
 // Breadcrumbs
27 27
 $xoBreadcrumbs = [];
28
-$xoBreadcrumbs[] = ['title' => \_MA_WGGITHUB_TITLE, 'link' => WGGITHUB_URL . '/'];
28
+$xoBreadcrumbs[] = ['title' => \_MA_WGGITHUB_TITLE, 'link' => WGGITHUB_URL.'/'];
29 29
 // Get instance of module
30 30
 $helper = \XoopsModules\Wggithub\Helper::getInstance();
31 31
 $settingsHandler = $helper->getHandler('Settings');
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 // 
39 39
 $myts = MyTextSanitizer::getInstance();
40 40
 // Default Css Style
41
-$style = WGGITHUB_URL . '/assets/css/style.css';
41
+$style = WGGITHUB_URL.'/assets/css/style.css';
42 42
 // Smarty Default
43 43
 $sysPathIcon16 = $GLOBALS['xoopsModule']->getInfo('sysicons16');
44 44
 $sysPathIcon32 = $GLOBALS['xoopsModule']->getInfo('sysicons32');
Please login to merge, or discard this patch.
blocks/repositories.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 use XoopsModules\Wggithub\Helper;
25 25
 use XoopsModules\Wggithub\Constants;
26 26
 
27
-include_once \XOOPS_ROOT_PATH . '/modules/wggithub/include/common.php';
27
+include_once \XOOPS_ROOT_PATH.'/modules/wggithub/include/common.php';
28 28
 
29 29
 /**
30 30
  * Function show block
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
  */
34 34
 function b_wggithub_repositories_show($options)
35 35
 {
36
-    include_once \XOOPS_ROOT_PATH . '/modules/wggithub/class/repositories.php';
36
+    include_once \XOOPS_ROOT_PATH.'/modules/wggithub/class/repositories.php';
37 37
     $myts = MyTextSanitizer::getInstance();
38 38
     $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL);
39 39
     $block       = [];
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
  */
100 100
 function b_wggithub_repositories_edit($options)
101 101
 {
102
-    include_once \XOOPS_ROOT_PATH . '/modules/wggithub/class/repositories.php';
102
+    include_once \XOOPS_ROOT_PATH.'/modules/wggithub/class/repositories.php';
103 103
     $helper = Helper::getInstance();
104 104
     $repositoriesHandler = $helper->getHandler('Repositories');
105 105
     $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL);
106 106
     $form = \_MB_WGGITHUB_DISPLAY;
107 107
     $form .= "<input type='hidden' name='options[0]' value='".$options[0]."' />";
108
-    $form .= "<input type='text' name='options[1]' size='5' maxlength='255' value='" . $options[1] . "' />&nbsp;<br>";
109
-    $form .= \_MB_WGGITHUB_TITLE_LENGTH . " : <input type='text' name='options[2]' size='5' maxlength='255' value='" . $options[2] . "' /><br><br>";
108
+    $form .= "<input type='text' name='options[1]' size='5' maxlength='255' value='".$options[1]."' />&nbsp;<br>";
109
+    $form .= \_MB_WGGITHUB_TITLE_LENGTH." : <input type='text' name='options[2]' size='5' maxlength='255' value='".$options[2]."' /><br><br>";
110 110
     \array_shift($options);
111 111
     \array_shift($options);
112 112
     \array_shift($options);
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
     $crRepositories->setOrder('ASC');
118 118
     $repositoriesAll = $repositoriesHandler->getAll($crRepositories);
119 119
     unset($crRepositories);
120
-    $form .= \_MB_WGGITHUB_REPOSITORIES_TO_DISPLAY . "<br><select name='options[]' multiple='multiple' size='5'>";
121
-    $form .= "<option value='0' " . (\in_array(0, $options) == false ? '' : "selected='selected'") . '>' . \_MB_WGGITHUB_ALL_REPOSITORIES . '</option>';
120
+    $form .= \_MB_WGGITHUB_REPOSITORIES_TO_DISPLAY."<br><select name='options[]' multiple='multiple' size='5'>";
121
+    $form .= "<option value='0' ".(\in_array(0, $options) == false ? '' : "selected='selected'").'>'.\_MB_WGGITHUB_ALL_REPOSITORIES.'</option>';
122 122
     foreach (\array_keys($repositoriesAll) as $i) {
123 123
         $repo_id = $repositoriesAll[$i]->getVar('repo_id');
124
-        $form .= "<option value='" . $repo_id . "' " . (\in_array($repo_id, $options) == false ? '' : "selected='selected'") . '>' . $repositoriesAll[$i]->getVar('repo_name') . '</option>';
124
+        $form .= "<option value='".$repo_id."' ".(\in_array($repo_id, $options) == false ? '' : "selected='selected'").'>'.$repositoriesAll[$i]->getVar('repo_name').'</option>';
125 125
     }
126 126
     $form .= '</select>';
127 127
 
Please login to merge, or discard this patch.
class/Directories.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -176,10 +176,10 @@
 block discarded – undo
176 176
                 break;
177 177
         }
178 178
         $ret['content_shorttext'] = Utility::truncateHtml($content_text);
179
-        $ret['autoupdate']        = (int)$this->getVar('dir_autoupdate') > 0 ? _YES : _NO;
180
-        $ret['online']            = (int)$this->getVar('dir_online') > 0 ? _YES : _NO;
181
-        $ret['filterrelease']     = (int)$this->getVar('dir_filterrelease') > 0 ? _YES : _NO;
182
-        $ret['weight']            = (int)$this->getVar('dir_weight');
179
+        $ret['autoupdate']        = (int) $this->getVar('dir_autoupdate') > 0 ? _YES : _NO;
180
+        $ret['online']            = (int) $this->getVar('dir_online') > 0 ? _YES : _NO;
181
+        $ret['filterrelease']     = (int) $this->getVar('dir_filterrelease') > 0 ? _YES : _NO;
182
+        $ret['weight']            = (int) $this->getVar('dir_weight');
183 183
         $ret['datecreated']       = \formatTimestamp($this->getVar('dir_datecreated'), 's');
184 184
         $ret['submitter']         = \XoopsUser::getUnameFromId($this->getVar('dir_submitter'));
185 185
         return $ret;
Please login to merge, or discard this patch.
class/Github/GithubClient.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
     public function testApi1($url) {
83 83
         $api = new Github\Api;
84
-        $response = $api->get(static::BASE_URL . $url);
84
+        $response = $api->get(static::BASE_URL.$url);
85 85
         $data = $api->decode($response);
86 86
         
87 87
         return $data;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         $token = new Github\OAuth\Token('{myKey}', 'bearer', ['repo', 'user', 'public_repo']);
94 94
         $api->setToken($token);
95
-        $response = $api->get(static::BASE_URL . $url);
95
+        $response = $api->get(static::BASE_URL.$url);
96 96
 
97 97
         $data = $api->decode($response);
98 98
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function getUserRepositories($username, $per_page = 100, $page = 1)
119 119
     {
120
-        $url = static::BASE_URL . 'users/' . \rawurlencode($username) . '/repos?per_page=' . $per_page . '&page=' . $page;
120
+        $url = static::BASE_URL.'users/'.\rawurlencode($username).'/repos?per_page='.$per_page.'&page='.$page;
121 121
 
122 122
         return $this->_get($url);
123 123
     }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public function getOrgRepositories($org, $per_page = 100, $page = 1)
134 134
     {
135
-        $url = static::BASE_URL . 'orgs/' . \rawurlencode($org) . '/repos?per_page=' . $per_page . '&page=' . $page;
135
+        $url = static::BASE_URL.'orgs/'.\rawurlencode($org).'/repos?per_page='.$per_page.'&page='.$page;
136 136
 
137 137
         return $this->_get($url);
138 138
     }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public function getReadme($username, $repository)
148 148
     {
149
-        $url = static::BASE_URL . 'repos/' . \rawurlencode($username) . '/' . \rawurlencode($repository) . '/readme';
149
+        $url = static::BASE_URL.'repos/'.\rawurlencode($username).'/'.\rawurlencode($repository).'/readme';
150 150
 
151 151
         return $this->_get($url, true);
152 152
     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function getReleases($username, $repository)
162 162
     {
163
-        $url = static::BASE_URL . 'repos/' . $username . '/' . $repository . '/releases';
163
+        $url = static::BASE_URL.'repos/'.$username.'/'.$repository.'/releases';
164 164
 
165 165
         return $this->_get($url, true);
166 166
     }
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
     public function getLatestRelease($username, $repository, $prerelease = false)
177 177
     {
178 178
         if ($prerelease) {
179
-            $url = static::BASE_URL . 'repos/' . $username . '/' . $repository . '/releases';
179
+            $url = static::BASE_URL.'repos/'.$username.'/'.$repository.'/releases';
180 180
         } else {
181
-            $url = static::BASE_URL . 'repos/' . $username . '/' . $repository . '/releases/latest';
181
+            $url = static::BASE_URL.'repos/'.$username.'/'.$repository.'/releases/latest';
182 182
         }
183 183
         $result = $this->_get($url);
184 184
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     public function getRepositoryContent($username, $repository)
204 204
     {
205
-        $url = static::BASE_URL . 'repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents';
205
+        $url = static::BASE_URL.'repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents';
206 206
 
207 207
         return $this->_get($url);
208 208
     }
@@ -235,14 +235,14 @@  discard block
 block discarded – undo
235 235
             } else {
236 236
                 $error = true;
237 237
                 $errMsg = $response->getContent();
238
-                $logsHandler->updateTableLogs(Constants::LOG_TYPE_ERROR, $errMsg, 'ERROR ' . $code);
238
+                $logsHandler->updateTableLogs(Constants::LOG_TYPE_ERROR, $errMsg, 'ERROR '.$code);
239 239
             }
240 240
         }
241 241
         if ($error) {
242 242
             //catch common errors
243 243
             switch ($code) {
244 244
                 case 401:
245
-                    throw new \RuntimeException('"' . \_MA_WGGITHUB_READGH_ERROR_API_401 . '"');
245
+                    throw new \RuntimeException('"'.\_MA_WGGITHUB_READGH_ERROR_API_401.'"');
246 246
                     break;
247 247
                 case 403:
248 248
                     /*
@@ -250,21 +250,21 @@  discard block
 block discarded – undo
250 250
                         $GLOBALS['xoopsTpl']->assign('apiexceed', true);
251 251
                     }
252 252
                     */
253
-                    throw new \RuntimeException('"' . \_MA_WGGITHUB_READGH_ERROR_API_403 . '"');
253
+                    throw new \RuntimeException('"'.\_MA_WGGITHUB_READGH_ERROR_API_403.'"');
254 254
                     break;
255 255
                 case 404:
256
-                    throw new \RuntimeException('"' . \_MA_WGGITHUB_READGH_ERROR_API_404 . '"');
256
+                    throw new \RuntimeException('"'.\_MA_WGGITHUB_READGH_ERROR_API_404.'"');
257 257
                     break;
258 258
                 case 405:
259
-                    throw new \RuntimeException('"' . \_MA_WGGITHUB_READGH_ERROR_API_405 . '"');
259
+                    throw new \RuntimeException('"'.\_MA_WGGITHUB_READGH_ERROR_API_405.'"');
260 260
                     break;
261 261
                 case 0:
262 262
                 default:
263
-                    throw new \RuntimeException('"' . \_MA_WGGITHUB_READGH_ERROR_API . $errMsg . '"');
263
+                    throw new \RuntimeException('"'.\_MA_WGGITHUB_READGH_ERROR_API.$errMsg.'"');
264 264
                     break;
265 265
             }
266 266
         }
267
-        $data = (array)$api->decode($response);
267
+        $data = (array) $api->decode($response);
268 268
 
269 269
 
270 270
         return $data;
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
         $setting = $settingsHandler->getPrimarySetting();
343 343
 
344 344
         if (0 == \count($setting)) {
345
-            \redirect_header(\XOOPS_URL . '/index.php', 3, \_AM_WGGITHUB_THEREARENT_SETTINGS);
345
+            \redirect_header(\XOOPS_URL.'/index.php', 3, \_AM_WGGITHUB_THEREARENT_SETTINGS);
346 346
         }
347 347
         //$this->userAuth = $setting['user'];
348 348
         $this->tokenAuth = $setting['token'];
Please login to merge, or discard this patch.