Passed
Push — master ( 8f2fe2...24b5f5 )
by Michael
02:49
created
xoops_version.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
     'license_url'         => 'www.gnu.org/licenses/gpl-2.0.html/',
48 48
     // ------------------- Folders & Files -------------------
49 49
     'release_info'        => 'Changelog',
50
-    'release_file'        => XOOPS_URL . "/modules/$moduleDirName/docs/changelog.txt",
50
+    'release_file'        => XOOPS_URL."/modules/$moduleDirName/docs/changelog.txt",
51 51
 
52 52
     'manual'              => 'link to manual file',
53
-    'manual_file'         => XOOPS_URL . "/modules/$moduleDirName/docs/install.txt",
53
+    'manual_file'         => XOOPS_URL."/modules/$moduleDirName/docs/install.txt",
54 54
     // images
55 55
     'image'               => 'assets/images/logoModule.png',
56 56
     'iconsmall'           => 'assets/images/iconsmall.png',
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     'demo_site_name'      => 'XOOPS Demo Site',
69 69
     'support_url'         => 'https://xoops.org/modules/newbb/viewforum.php?forum=28/',
70 70
     'support_name'        => 'Support Forum',
71
-    'submit_bug'          => 'https://github.com/XoopsModules25x/' . $moduleDirName . '/issues',
71
+    'submit_bug'          => 'https://github.com/XoopsModules25x/'.$moduleDirName.'/issues',
72 72
     'module_website_url'  => 'www.xoops.org',
73 73
     'module_website_name' => 'XOOPS Project',
74 74
     // ------------------- Min Requirements -------------------
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     // -------------------  PayPal ---------------------------
90 90
     'paypal'              => [
91 91
         'business'      => '[email protected]',
92
-        'item_name'     => 'Donation : ' . _MI_CHESS_NAME,
92
+        'item_name'     => 'Donation : '._MI_CHESS_NAME,
93 93
         'amount'        => 0,
94 94
         'currency_code' => 'USD',
95 95
     ],
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
     'sqlfile'             => ['mysql' => 'sql/mysql.sql'],
110 110
     // ------------------- Tables ----------------------------
111 111
     'tables'              => [
112
-        $moduleDirName . '_' . 'games',
113
-        $moduleDirName . '_' . 'challenges',
114
-        $moduleDirName . '_' . 'ratings',
112
+        $moduleDirName.'_'.'games',
113
+        $moduleDirName.'_'.'challenges',
114
+        $moduleDirName.'_'.'ratings',
115 115
     ],
116 116
 ];
117 117
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
     if (is_object($xoopsUser)) {
236 236
         $modversion['sub'][5]['name'] = _MI_CHESS_SMNAME5;
237
-        $modversion['sub'][5]['url']  = 'player_stats.php?player_uid=' . $xoopsUser->getVar('uid');
237
+        $modversion['sub'][5]['url']  = 'player_stats.php?player_uid='.$xoopsUser->getVar('uid');
238 238
     }
239 239
 }
240 240
 
Please login to merge, or discard this patch.
language/english/main.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
 define('_MD_CHESS_LABEL_GAMETYPE_OPEN', 'Open challenge');
23 23
 define('_MD_CHESS_LABEL_GAMETYPE_USER', 'Individual challenge');
24 24
 define('_MD_CHESS_LABEL_GAMETYPE_SELF', 'Self-play');
25
-define('_MD_CHESS_MENU_GAMETYPE_OPEN', _MD_CHESS_LABEL_GAMETYPE_OPEN . ' - anyone can accept your challenge');
26
-define('_MD_CHESS_MENU_GAMETYPE_USER', _MD_CHESS_LABEL_GAMETYPE_USER . ' - only the specified user can accept your challenge');
27
-define('_MD_CHESS_MENU_GAMETYPE_SELF', _MD_CHESS_LABEL_GAMETYPE_SELF . ' - play against yourself (for learning or testing)');
25
+define('_MD_CHESS_MENU_GAMETYPE_OPEN', _MD_CHESS_LABEL_GAMETYPE_OPEN.' - anyone can accept your challenge');
26
+define('_MD_CHESS_MENU_GAMETYPE_USER', _MD_CHESS_LABEL_GAMETYPE_USER.' - only the specified user can accept your challenge');
27
+define('_MD_CHESS_MENU_GAMETYPE_SELF', _MD_CHESS_LABEL_GAMETYPE_SELF.' - play against yourself (for learning or testing)');
28 28
 
29 29
 // opponent
30 30
 define('_MD_CHESS_LABEL_OPPONENT', 'Opponent');
Please login to merge, or discard this patch.
language/german/main.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
 define('_MD_CHESS_LABEL_GAMETYPE_OPEN', 'Offene Herausforderung');
23 23
 define('_MD_CHESS_LABEL_GAMETYPE_USER', 'Persönliche Herausforderung');
24 24
 define('_MD_CHESS_LABEL_GAMETYPE_SELF', 'Spiel gegen sich selbst');
25
-define('_MD_CHESS_MENU_GAMETYPE_OPEN', _MD_CHESS_LABEL_GAMETYPE_OPEN . ' - Jeder kann die Herausforderung annehmen');
26
-define('_MD_CHESS_MENU_GAMETYPE_USER', _MD_CHESS_LABEL_GAMETYPE_USER . ' - nur der herausgeforderte Benutzer kann die Herausforderung annehmen');
27
-define('_MD_CHESS_MENU_GAMETYPE_SELF', _MD_CHESS_LABEL_GAMETYPE_SELF . ' - Partie mit sich selbst spielen');
25
+define('_MD_CHESS_MENU_GAMETYPE_OPEN', _MD_CHESS_LABEL_GAMETYPE_OPEN.' - Jeder kann die Herausforderung annehmen');
26
+define('_MD_CHESS_MENU_GAMETYPE_USER', _MD_CHESS_LABEL_GAMETYPE_USER.' - nur der herausgeforderte Benutzer kann die Herausforderung annehmen');
27
+define('_MD_CHESS_MENU_GAMETYPE_SELF', _MD_CHESS_LABEL_GAMETYPE_SELF.' - Partie mit sich selbst spielen');
28 28
 
29 29
 // opponent
30 30
 define('_MD_CHESS_LABEL_OPPONENT', 'Gegner');
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,14 +4,14 @@  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 9
 
10
-        $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__)));
10
+        $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__)));
11 11
 
12 12
         // base directory for the namespace prefix
13 13
 
14
-        $baseDir = dirname(__DIR__) . '/class/';
14
+        $baseDir = dirname(__DIR__).'/class/';
15 15
 
16 16
         // does the class use the namespace prefix?
17 17
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
         // with .php
33 33
 
34
-        $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php';
34
+        $file = $baseDir.str_replace('\\', '/', $relativeClass).'.php';
35 35
 
36 36
         // if the file exists, require it
37 37
 
Please login to merge, or discard this patch.
preloads/core.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
      */
29 29
     public static function eventCoreIncludeCommonEnd($args)
30 30
     {
31
-        require __DIR__ . '/autoloader.php';
31
+        require __DIR__.'/autoloader.php';
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
include/notification.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 // The language file gets automatically included within this module,
40 40
 // but not when viewing the notifications page via notifications.php.
41 41
 global $xoopsConfig;
42
-if (file_exists(XOOPS_ROOT_PATH . "/modules/chess/language/{$xoopsConfig['language']}/main.php")) {
43
-    require_once XOOPS_ROOT_PATH . "/modules/chess/language/{$xoopsConfig['language']}/main.php";
42
+if (file_exists(XOOPS_ROOT_PATH."/modules/chess/language/{$xoopsConfig['language']}/main.php")) {
43
+    require_once XOOPS_ROOT_PATH."/modules/chess/language/{$xoopsConfig['language']}/main.php";
44 44
 } else {
45
-    require_once XOOPS_ROOT_PATH . '/modules/chess/language/english/main.php';
45
+    require_once XOOPS_ROOT_PATH.'/modules/chess/language/english/main.php';
46 46
 }
47 47
 /**#@-*/
48 48
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     if ('global' == $category) {
61 61
         $item['name'] = 'Chess';
62 62
 
63
-        $item['url'] = XOOPS_URL . '/modules/chess/';
63
+        $item['url'] = XOOPS_URL.'/modules/chess/';
64 64
 
65 65
         return $item;
66 66
     } elseif ('game' == $category) {
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
             $date = _MD_CHESS_NA;
105 105
         }
106 106
 
107
-        $item['name'] = "$username_white " . _MD_CHESS_LABEL_VS . " $username_black ($date)";
107
+        $item['name'] = "$username_white "._MD_CHESS_LABEL_VS." $username_black ($date)";
108 108
 
109
-        $item['url'] = XOOPS_URL . '/modules/chess/game.php?game_id=' . $item_id;
109
+        $item['url'] = XOOPS_URL.'/modules/chess/game.php?game_id='.$item_id;
110 110
 
111 111
         return $item;
112 112
     }
Please login to merge, or discard this patch.
include/install.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
     $GLOBALS['chess_module_pre_update_called'] = true;
58 58
 
59 59
     if ($oldversion < 102) { // old version < 1.02: direct update not supported.
60
-        $docfile = XOOPS_ROOT_PATH . '/modules/chess/docs/INSTALL.TXT';
60
+        $docfile = XOOPS_ROOT_PATH.'/modules/chess/docs/INSTALL.TXT';
61 61
 
62
-        chess_set_message($module, sprintf(_MI_CHESS_OLD_VERSION, (string)$oldversion, $docfile), true);
62
+        chess_set_message($module, sprintf(_MI_CHESS_OLD_VERSION, (string) $oldversion, $docfile), true);
63 63
 
64 64
         return false;
65 65
     } elseif ($oldversion >= 107) { // old version >= 1.07:  no action needed.
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
         $mysql_error = $xoopsDB->error();
87 87
 
88
-        chess_set_message($module, sprintf(_MI_CHESS_RATINGS_TABLE_2, $ratings_table, (string)$mysql_errno, $mysql_error), true);
88
+        chess_set_message($module, sprintf(_MI_CHESS_RATINGS_TABLE_2, $ratings_table, (string) $mysql_errno, $mysql_error), true);
89 89
 
90 90
         return false;
91 91
     }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         $mysql_error = $xoopsDB->error();
131 131
 
132
-        chess_set_message($module, sprintf(_MI_CHESS_GAMES_TABLE_2, $games_table, (string)$mysql_errno, $mysql_error), true);
132
+        chess_set_message($module, sprintf(_MI_CHESS_GAMES_TABLE_2, $games_table, (string) $mysql_errno, $mysql_error), true);
133 133
 
134 134
         return false;
135 135
     }
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 {
313 313
     $lang = $GLOBALS['xoopsConfig']['language'];
314 314
 
315
-    $path = XOOPS_ROOT_PATH . (empty($module) ? '/' : "/modules/$module/") . 'language';
315
+    $path = XOOPS_ROOT_PATH.(empty($module) ? '/' : "/modules/$module/").'language';
316 316
 
317 317
     if (!($ret = @include_once("$path/$lang/$filename.php"))) {
318 318
         $ret = include_once("$path/$default/$filename.php");
Please login to merge, or discard this patch.
include/common.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 use XoopsModules\Chess;
22 22
 
23
-include dirname(__DIR__) . '/preloads/autoloader.php';
23
+include dirname(__DIR__).'/preloads/autoloader.php';
24 24
 
25 25
 $moduleDirName      = basename(dirname(__DIR__));
26 26
 $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName
@@ -47,42 +47,42 @@  discard block
 block discarded – undo
47 47
     $pathModIcon32 = $helper->getModule()->getInfo('modicons32');
48 48
 }
49 49
 
50
-if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) {
51
-    define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__)));
50
+if (!defined($moduleDirNameUpper.'_CONSTANTS_DEFINED')) {
51
+    define($moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__)));
52 52
 
53
-    define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
53
+    define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
54 54
 
55
-    define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
55
+    define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
56 56
 
57
-    define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/');
57
+    define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.$moduleDirName.'/');
58 58
 
59
-    define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/');
59
+    define($moduleDirNameUpper.'_IMAGE_URL', constant($moduleDirNameUpper.'_URL').'/assets/images/');
60 60
 
61
-    define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images');
61
+    define($moduleDirNameUpper.'_IMAGE_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/assets/images');
62 62
 
63
-    define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/');
63
+    define($moduleDirNameUpper.'_ADMIN_URL', constant($moduleDirNameUpper.'_URL').'/admin/');
64 64
 
65
-    define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/');
65
+    define($moduleDirNameUpper.'_ADMIN_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/admin/');
66 66
 
67
-    define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php');
67
+    define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php');
68 68
     //    define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png');
69
-    define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash
70
-    define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash
71
-    define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', $pathIcon32 . '/xoopsmicrobutton.gif');
69
+    define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash
70
+    define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash
71
+    define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', $pathIcon32.'/xoopsmicrobutton.gif');
72 72
 
73
-    define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1);
73
+    define($moduleDirNameUpper.'_CONSTANTS_DEFINED', 1);
74 74
 }
75 75
 
76 76
 $icons = [
77
-    'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . "' align='middle'>",
78
-    'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>",
79
-    'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>",
80
-    'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>",
81
-    'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>",
82
-    'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>",
83
-    'add'     => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>",
84
-    '0'       => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>",
85
-    '1'       => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>",
77
+    'edit'    => "<img src='".$pathIcon16."/edit.png'  alt="._EDIT."' align='middle'>",
78
+    'delete'  => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>",
79
+    'clone'   => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>",
80
+    'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>",
81
+    'print'   => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>",
82
+    'pdf'     => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>",
83
+    'add'     => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>",
84
+    '0'       => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>",
85
+    '1'       => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>",
86 86
 ];
87 87
 
88 88
 $debug = false;
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
     $GLOBALS['xoopsTpl'] = new \XoopsTpl();
97 97
 }
98 98
 
99
-$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL . '/modules/' . $moduleDirName);
99
+$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL.'/modules/'.$moduleDirName);
100 100
 // Local icons path
101 101
 if (is_object($helper->getModule())) {
102 102
     $pathModIcon16 = $helper->getModule()->getInfo('modicons16');
103 103
 
104 104
     $pathModIcon32 = $helper->getModule()->getInfo('modicons32');
105 105
 
106
-    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16);
106
+    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL.'/modules/'.$moduleDirName.'/'.$pathModIcon16);
107 107
 
108 108
     $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32);
109 109
 }
Please login to merge, or discard this patch.
include/install.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 
57 57
     if ($oldversion < 102) { // old version < 1.02: direct update not supported.
58 58
 
59
-        $docfile = XOOPS_ROOT_PATH . '/modules/chess/docs/INSTALL.TXT';
60
-        chess_set_message($module, sprintf(_MI_CHESS_OLD_VERSION, (string)$oldversion, $docfile), true);
59
+        $docfile = XOOPS_ROOT_PATH.'/modules/chess/docs/INSTALL.TXT';
60
+        chess_set_message($module, sprintf(_MI_CHESS_OLD_VERSION, (string) $oldversion, $docfile), true);
61 61
         return false;
62 62
     } elseif ($oldversion >= 107) { // old version >= 1.07:  no action needed.
63 63
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     if (!$result) {
77 77
         $mysql_errno = $xoopsDB->errno();
78 78
         $mysql_error = $xoopsDB->error();
79
-        chess_set_message($module, sprintf(_MI_CHESS_RATINGS_TABLE_2, $ratings_table, (string)$mysql_errno, $mysql_error), true);
79
+        chess_set_message($module, sprintf(_MI_CHESS_RATINGS_TABLE_2, $ratings_table, (string) $mysql_errno, $mysql_error), true);
80 80
         return false;
81 81
     }
82 82
     if ($xoopsDB->getRowsNum($result) > 0) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     if (!$result) {
105 105
         $mysql_errno = $xoopsDB->errno();
106 106
         $mysql_error = $xoopsDB->error();
107
-        chess_set_message($module, sprintf(_MI_CHESS_GAMES_TABLE_2, $games_table, (string)$mysql_errno, $mysql_error), true);
107
+        chess_set_message($module, sprintf(_MI_CHESS_GAMES_TABLE_2, $games_table, (string) $mysql_errno, $mysql_error), true);
108 108
         return false;
109 109
     }
110 110
     [$count] = $xoopsDB->fetchRow($result);
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 function chess_load_lang_file($filename, $module = '', $default = 'english')
261 261
 {
262 262
     $lang = $GLOBALS['xoopsConfig']['language'];
263
-    $path = XOOPS_ROOT_PATH . (empty($module) ? '/' : "/modules/$module/") . 'language';
263
+    $path = XOOPS_ROOT_PATH.(empty($module) ? '/' : "/modules/$module/").'language';
264 264
     if (!($ret = @include_once("$path/$lang/$filename.php"))) {
265 265
         $ret = include_once("$path/$default/$filename.php");
266 266
     }
Please login to merge, or discard this patch.