Passed
Push — master ( 6221be...b6c62e )
by Michael
02:40
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/ratings.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 /**#@+
32 32
  */
33
-require_once XOOPS_ROOT_PATH . '/modules/chess/include/functions.php';
33
+require_once XOOPS_ROOT_PATH.'/modules/chess/include/functions.php';
34 34
 /**#@-*/
35 35
 
36 36
 /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         $xoopsDB->query("INSERT INTO $ratings_table (player_uid, rating) VALUES $values");
113 113
 
114
-        $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR);
114
+        $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR);
115 115
     }
116 116
 
117 117
     // calculate new ratings using configured rating system
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	"
131 131
     );
132 132
 
133
-    $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR);
133
+    $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR);
134 134
 
135 135
     $xoopsDB->query(
136 136
         "
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	"
141 141
     );
142 142
 
143
-    $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR);
143
+    $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR);
144 144
 
145 145
     return true;
146 146
 }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 
241 241
         $xoopsDB->query("INSERT INTO $ratings_table (player_uid, rating, games_won, games_lost, games_drawn) VALUES $values");
242 242
 
243
-        $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR);
243
+        $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR);
244 244
     }
245 245
 
246 246
     return true;
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
     // determine function for getting number of provisional games using configured rating system
263 263
 
264
-    $file = XOOPS_ROOT_PATH . "/modules/chess/include/ratings_{$rating_system}.php";
264
+    $file = XOOPS_ROOT_PATH."/modules/chess/include/ratings_{$rating_system}.php";
265 265
 
266 266
     file_exists($file) or trigger_error("missing file '$file' for rating system '$rating_system'", E_USER_ERROR);
267 267
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
  */
283 283
 function chess_ratings_get_func_adj($rating_system)
284 284
 {
285
-    $file = XOOPS_ROOT_PATH . "/modules/chess/include/ratings_{$rating_system}.php";
285
+    $file = XOOPS_ROOT_PATH."/modules/chess/include/ratings_{$rating_system}.php";
286 286
 
287 287
     file_exists($file) or trigger_error("missing file '$file' for rating system '$rating_system'", E_USER_ERROR);
288 288
 
Please login to merge, or discard this patch.
include/ratings.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 /**#@+
31 31
  */
32
-require_once XOOPS_ROOT_PATH . '/modules/chess/include/functions.php';
32
+require_once XOOPS_ROOT_PATH.'/modules/chess/include/functions.php';
33 33
 /**#@-*/
34 34
 
35 35
 /**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     if (!empty($value_list)) {
94 94
         $values = implode(',', $value_list);
95 95
         $xoopsDB->query("INSERT INTO $ratings_table (player_uid, rating) VALUES $values");
96
-        $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR);
96
+        $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR);
97 97
     }
98 98
 
99 99
     // calculate new ratings using configured rating system
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		WHERE  player_uid = '{$row['white_uid']}'
110 110
 	"
111 111
     );
112
-    $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR);
112
+    $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR);
113 113
 
114 114
     $xoopsDB->query(
115 115
         "
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		WHERE  player_uid = '{$row['black_uid']}'
119 119
 	"
120 120
     );
121
-    $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR);
121
+    $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR);
122 122
 
123 123
     return true;
124 124
 }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         $values = implode(',', $value_list);
203 203
 
204 204
         $xoopsDB->query("INSERT INTO $ratings_table (player_uid, rating, games_won, games_lost, games_drawn) VALUES $values");
205
-        $xoopsDB->errno() and trigger_error($xoopsDB->errno() . ':' . $xoopsDB->error(), E_USER_ERROR);
205
+        $xoopsDB->errno() and trigger_error($xoopsDB->errno().':'.$xoopsDB->error(), E_USER_ERROR);
206 206
     }
207 207
 
208 208
     return true;
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     }
223 223
 
224 224
     // determine function for getting number of provisional games using configured rating system
225
-    $file = XOOPS_ROOT_PATH . "/modules/chess/include/ratings_{$rating_system}.inc.php";
225
+    $file = XOOPS_ROOT_PATH."/modules/chess/include/ratings_{$rating_system}.inc.php";
226 226
     file_exists($file) or trigger_error("missing file '$file' for rating system '$rating_system'", E_USER_ERROR);
227 227
     require_once $file;
228 228
     $func = "chess_ratings_num_provisional_games_{$rating_system}";
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
  */
240 240
 function chess_ratings_get_func_adj($rating_system)
241 241
 {
242
-    $file = XOOPS_ROOT_PATH . "/modules/chess/include/ratings_{$rating_system}.inc.php";
242
+    $file = XOOPS_ROOT_PATH."/modules/chess/include/ratings_{$rating_system}.inc.php";
243 243
     file_exists($file) or trigger_error("missing file '$file' for rating system '$rating_system'", E_USER_ERROR);
244 244
     require_once $file;
245 245
     $func = "chess_ratings_adj_{$rating_system}";
Please login to merge, or discard this patch.