Passed
Push — master ( 86de2c...0deb8f )
by Goffy
03:37
created
class/Repositories.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@
 block discarded – undo
173 173
 		$ret = $this->getValues($keys, $format, $maxDepth);
174 174
 		$ret['id']          = $this->getVar('repo_id');
175 175
 		$ret['nodeid']      = $this->getVar('repo_nodeid');
176
-        $ret['user']        = $this->getVar('repo_user');
176
+        $ret['user'] = $this->getVar('repo_user');
177 177
 		$ret['name']        = $this->getVar('repo_name');
178 178
 		$ret['fullname']    = $this->getVar('repo_fullname');
179 179
 		$ret['createdat']   = \formatTimestamp($this->getVar('repo_createdat'), 'm');
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
@@ -167,9 +167,9 @@
 block discarded – undo
167 167
 		$ret['name']        = $this->getVar('dir_name');
168 168
 		$ret['type']        = $this->getVar('dir_type');
169 169
         $ret['type_text']   = Constants::DIRECTORY_TYPE_USER == $this->getVar('dir_type') ? \_AM_WGGITHUB_DIRECTORY_TYPE_USER : \_AM_WGGITHUB_DIRECTORY_TYPE_ORG;
170
-        $ret['autoupdate']  = (int)$this->getVar('dir_autoupdate') > 0 ? _YES : _NO;
171
-        $ret['online']      = (int)$this->getVar('dir_online') > 0 ? _YES : _NO;
172
-        $ret['filterrelease'] = (int)$this->getVar('dir_filterrelease') > 0 ? _YES : _NO;
170
+        $ret['autoupdate']  = (int) $this->getVar('dir_autoupdate') > 0 ? _YES : _NO;
171
+        $ret['online']      = (int) $this->getVar('dir_online') > 0 ? _YES : _NO;
172
+        $ret['filterrelease'] = (int) $this->getVar('dir_filterrelease') > 0 ? _YES : _NO;
173 173
 		$ret['datecreated'] = \formatTimestamp($this->getVar('dir_datecreated'), 's');
174 174
 		$ret['submitter']   = \XoopsUser::getUnameFromId($this->getVar('dir_submitter'));
175 175
 		return $ret;
Please login to merge, or discard this patch.
class/Utility.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
     {
57 57
         if ($considerHtml) {
58 58
             // if the plain text is shorter than the maximum length, return the whole text
59
-            if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
59
+            if (mb_strlen(\preg_replace('/<.*?'.'>/', '', $text)) <= $length) {
60 60
                 return $text;
61 61
             }
62 62
             // splits all html-tags to scanable lines
63
-            \preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
63
+            \preg_match_all('/(<.+?'.'>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
64 64
             $total_length = mb_strlen($ending);
65 65
             $open_tags    = [];
66 66
             $truncate     = '';
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                             unset($open_tags[$pos]);
79 79
                         }
80 80
                         // if tag is an opening tag
81
-                    } elseif (\preg_match('/^<\s*([^\s>!]+).*?' . '>$/s', $line_matchings[1], $tag_matchings)) {
81
+                    } elseif (\preg_match('/^<\s*([^\s>!]+).*?'.'>$/s', $line_matchings[1], $tag_matchings)) {
82 82
                         // add tag to the beginning of $open_tags list
83 83
                         \array_unshift($open_tags, \mb_strtolower($tag_matchings[1]));
84 84
                     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         if ($considerHtml) {
139 139
             // close all unclosed html-tags
140 140
             foreach ($open_tags as $tag) {
141
-                $truncate .= '</' . $tag . '>';
141
+                $truncate .= '</'.$tag.'>';
142 142
             }
143 143
         }
144 144
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 //--></script>
212 212
 <!-- End Form Validation JavaScript //-->',
213 213
         ];
214
-        $paypalform   = [
214
+        $paypalform = [
215 215
             0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">',
216 216
             1 => '<input name="cmd" value="_s-xclick" type="hidden">',
217 217
             2 => '<input name="hosted_button_id" value="%s" type="hidden">',
@@ -224,11 +224,11 @@  discard block
 block discarded – undo
224 224
                 case 2:
225 225
                     $donationform[$key] = \sprintf(
226 226
                         $donationform[$key],
227
-                        $GLOBALS['xoopsConfig']['sitename'] . ' - ' . ('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name') . ' [' . $GLOBALS['xoopsUser']->getVar('uname') . ']' : $GLOBALS['xoopsUser']->getVar('uname')),
227
+                        $GLOBALS['xoopsConfig']['sitename'].' - '.('' != $GLOBALS['xoopsUser']->getVar('name') ? $GLOBALS['xoopsUser']->getVar('name').' ['.$GLOBALS['xoopsUser']->getVar('uname').']' : $GLOBALS['xoopsUser']->getVar('uname')),
228 228
                         $GLOBALS['xoopsUser']->getVar('email'),
229 229
                         XOOPS_LICENSE_KEY,
230 230
                         \mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')),
231
-                        \mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')) . ' ' . $GLOBALS['xoopsModule']->getVar('name')
231
+                        \mb_strtoupper($GLOBALS['xoopsModule']->getVar('dirname')).' '.$GLOBALS['xoopsModule']->getVar('name')
232 232
                     );
233 233
                     break;
234 234
             }
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       = [];
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
  */
99 99
 function b_wggithub_repositories_edit($options)
100 100
 {
101
-	include_once XOOPS_ROOT_PATH . '/modules/wggithub/class/repositories.php';
101
+	include_once XOOPS_ROOT_PATH.'/modules/wggithub/class/repositories.php';
102 102
 	$helper = Helper::getInstance();
103 103
 	$repositoriesHandler = $helper->getHandler('Repositories');
104 104
 	$GLOBALS['xoopsTpl']->assign('wggithub_upload_url', WGGITHUB_UPLOAD_URL);
105 105
 	$form = _MB_WGGITHUB_DISPLAY;
106 106
 	$form .= "<input type='hidden' name='options[0]' value='".$options[0]."' />";
107
-	$form .= "<input type='text' name='options[1]' size='5' maxlength='255' value='" . $options[1] . "' />&nbsp;<br>";
108
-	$form .= _MB_WGGITHUB_TITLE_LENGTH . " : <input type='text' name='options[2]' size='5' maxlength='255' value='" . $options[2] . "' /><br><br>";
107
+	$form .= "<input type='text' name='options[1]' size='5' maxlength='255' value='".$options[1]."' />&nbsp;<br>";
108
+	$form .= _MB_WGGITHUB_TITLE_LENGTH." : <input type='text' name='options[2]' size='5' maxlength='255' value='".$options[2]."' /><br><br>";
109 109
 	\array_shift($options);
110 110
 	\array_shift($options);
111 111
 	\array_shift($options);
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 	$crRepositories->setOrder('ASC');
117 117
 	$repositoriesAll = $repositoriesHandler->getAll($crRepositories);
118 118
 	unset($crRepositories);
119
-	$form .= _MB_WGGITHUB_REPOSITORIES_TO_DISPLAY . "<br><select name='options[]' multiple='multiple' size='5'>";
120
-	$form .= "<option value='0' " . (\in_array(0, $options) == false ? '' : "selected='selected'") . '>' . _MB_WGGITHUB_ALL_REPOSITORIES . '</option>';
119
+	$form .= _MB_WGGITHUB_REPOSITORIES_TO_DISPLAY."<br><select name='options[]' multiple='multiple' size='5'>";
120
+	$form .= "<option value='0' ".(\in_array(0, $options) == false ? '' : "selected='selected'").'>'._MB_WGGITHUB_ALL_REPOSITORIES.'</option>';
121 121
 	foreach (\array_keys($repositoriesAll) as $i) {
122 122
 		$repo_id = $repositoriesAll[$i]->getVar('repo_id');
123
-		$form .= "<option value='" . $repo_id . "' " . (\in_array($repo_id, $options) == false ? '' : "selected='selected'") . '>' . $repositoriesAll[$i]->getVar('repo_name') . '</option>';
123
+		$form .= "<option value='".$repo_id."' ".(\in_array($repo_id, $options) == false ? '' : "selected='selected'").'>'.$repositoriesAll[$i]->getVar('repo_name').'</option>';
124 124
 	}
125 125
 	$form .= '</select>';
126 126
 
Please login to merge, or discard this patch.
config/icons.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@
 block discarded – undo
5 5
     $pathIcon16    = \Xmf\Module\Admin::iconUrl('', 16);
6 6
     $moduleDirName = \basename(\dirname(__DIR__));
7 7
 
8
-    return (object)[
9
-        'name'  => \mb_strtoupper($moduleDirName) . ' IconConfigurator',
8
+    return (object) [
9
+        'name'  => \mb_strtoupper($moduleDirName).' IconConfigurator',
10 10
         'icons' => [
11
-            'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . "' align='middle'>",
12
-            'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>",
13
-            'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>",
14
-            'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>",
15
-            'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>",
16
-            'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>",
17
-            'add'     => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>",
18
-            '0'       => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>",
19
-            '1'       => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>",
11
+            'edit'    => "<img src='".$pathIcon16."/edit.png'  alt="._EDIT."' align='middle'>",
12
+            'delete'  => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>",
13
+            'clone'   => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>",
14
+            'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>",
15
+            'print'   => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>",
16
+            'pdf'     => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>",
17
+            'add'     => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>",
18
+            '0'       => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>",
19
+            '1'       => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>",
20 20
         ],
21 21
     ];
22 22
 }
Please login to merge, or discard this patch.
config/paths.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,20 +5,20 @@
 block discarded – undo
5 5
     $moduleDirName      = \basename(\dirname(__DIR__));
6 6
     $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
7 7
 
8
-    return (object)[
9
-        'name'          => \mb_strtoupper($moduleDirName) . ' PathConfigurator',
8
+    return (object) [
9
+        'name'          => \mb_strtoupper($moduleDirName).' PathConfigurator',
10 10
         'paths'         => [
11 11
             'dirname'    => $moduleDirName,
12
-            'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
13
-            'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
14
-            'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
15
-            'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
16
-            'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
12
+            'admin'      => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
13
+            'modPath'    => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
14
+            'modUrl'     => XOOPS_URL.'/modules/'.$moduleDirName,
15
+            'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
16
+            'uploadUrl'  => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
17 17
         ],
18 18
         'uploadFolders' => [
19
-            XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
20
-            XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
21
-            XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
19
+            XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
20
+            XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/category',
21
+            XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots',
22 22
             //XOOPS_UPLOAD_PATH . '/flags'
23 23
         ],
24 24
     ];
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -24,26 +24,26 @@  discard block
 block discarded – undo
24 24
  * return object
25 25
  */
26 26
 
27
-$moduleDirName  = \basename(\dirname(__DIR__));
28
-$moduleDirNameUpper  = \mb_strtoupper($moduleDirName);
29
-return (object)[
30
-	'name'           => \mb_strtoupper($moduleDirName) . ' Module Configurator',
27
+$moduleDirName = \basename(\dirname(__DIR__));
28
+$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
29
+return (object) [
30
+	'name'           => \mb_strtoupper($moduleDirName).' Module Configurator',
31 31
 	'paths'          => [
32 32
 		'dirname'    => $moduleDirName,
33
-		'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
34
-		'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
35
-		'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
36
-		'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
37
-		'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
33
+		'admin'      => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
34
+		'modPath'    => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
35
+		'modUrl'     => XOOPS_URL.'/modules/'.$moduleDirName,
36
+		'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
37
+		'uploadUrl'  => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
38 38
 	],
39 39
 	'uploadFolders'  => [
40
-		XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
40
+		XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
41 41
 	],
42 42
 	'copyBlankFiles'  => [
43 43
 	],
44 44
 	'copyTestFolders'  => [
45
-		[XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/uploads',
46
-		XOOPS_UPLOAD_PATH . '/' . $moduleDirName],
45
+		[XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/testdata/uploads',
46
+		XOOPS_UPLOAD_PATH.'/'.$moduleDirName],
47 47
 	],
48 48
 	'templateFolders'  => [
49 49
 		'/templates/',
@@ -56,5 +56,5 @@  discard block
 block discarded – undo
56 56
 	],
57 57
 	'moduleStats'  => [
58 58
 	],
59
-	'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'><img src='" . XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . "/assets/images/logo/logoModule.png' alt='XOOPS Project'></a>",
59
+	'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'><img src='".XOOPS_ROOT_PATH.'/modules/'.$moduleDirName."/assets/images/logo/logoModule.png' alt='XOOPS Project'></a>",
60 60
 ];
Please login to merge, or discard this patch.
preloads/autoloader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@  discard block
 block discarded – undo
4 4
  * @see http://www.php-fig.org/psr/psr-4/examples/
5 5
  */
6 6
 spl_autoload_register(
7
-    static function ($class) {
7
+    static function($class) {
8 8
         // project-specific namespace prefix
9
-        $prefix = 'XoopsModules\\' . \ucfirst(\basename(\dirname(__DIR__)));
9
+        $prefix = 'XoopsModules\\'.\ucfirst(\basename(\dirname(__DIR__)));
10 10
 
11 11
         // base directory for the namespace prefix
12
-        $baseDir = __DIR__ . '/../class/';
12
+        $baseDir = __DIR__.'/../class/';
13 13
 
14 14
         // does the class use the namespace prefix?
15 15
         $len = mb_strlen($prefix);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         // replace the namespace prefix with the base directory, replace namespace
25 25
         // separators with directory separators in the relative class name, append
26 26
         // with .php
27
-        $file = $baseDir . \str_replace('\\', '/', $relativeClass) . '.php';
27
+        $file = $baseDir.\str_replace('\\', '/', $relativeClass).'.php';
28 28
 
29 29
         // if the file exists, require it
30 30
         if (\file_exists($file)) {
Please login to merge, or discard this patch.