Completed
Pull Request — master (#624)
by Michael
24:05
created
htdocs/class/captcha/text.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
     public function render()
34 34
     {
35 35
         $form = $this->loadText() . '&nbsp;&nbsp; <input type="text" name="' . $this->config['name']
36
-			. '" id="' . $this->config['name'] . '" size="' . $this->config['num_chars']
37
-			. '" maxlength="' . $this->config['num_chars'] . '" value="" />';
36
+            . '" id="' . $this->config['name'] . '" size="' . $this->config['num_chars']
37
+            . '" maxlength="' . $this->config['num_chars'] . '" value="" />';
38 38
         $form .= '<br />' . XoopsLocale::INPUT_RESULT_FROM_EXPRESSION;
39 39
         if (!empty($this->config['maxattempts'])) {
40 40
             $form .= '<br />' . sprintf(XoopsLocale::F_MAXIMUM_ATTEMPTS, $this->config['maxattempts']);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function render()
34 34
     {
35
-        $form = $this->loadText() . '&nbsp;&nbsp; <input type="text" name="' . $this->config['name']
36
-			. '" id="' . $this->config['name'] . '" size="' . $this->config['num_chars']
37
-			. '" maxlength="' . $this->config['num_chars'] . '" value="" />';
38
-        $form .= '<br />' . XoopsLocale::INPUT_RESULT_FROM_EXPRESSION;
35
+        $form = $this->loadText().'&nbsp;&nbsp; <input type="text" name="'.$this->config['name']
36
+			. '" id="'.$this->config['name'].'" size="'.$this->config['num_chars']
37
+			. '" maxlength="'.$this->config['num_chars'].'" value="" />';
38
+        $form .= '<br />'.XoopsLocale::INPUT_RESULT_FROM_EXPRESSION;
39 39
         if (!empty($this->config['maxattempts'])) {
40
-            $form .= '<br />' . sprintf(XoopsLocale::F_MAXIMUM_ATTEMPTS, $this->config['maxattempts']);
40
+            $form .= '<br />'.sprintf(XoopsLocale::F_MAXIMUM_ATTEMPTS, $this->config['maxattempts']);
41 41
         }
42 42
         return $form;
43 43
     }
@@ -58,6 +58,6 @@  discard block
 block discarded – undo
58 58
             $expression = "{$val_a} + {$val_b} = ?";
59 59
             $this->code = $val_a + $val_b;
60 60
         }
61
-        return '<span style="font-style: normal; font-weight: bold; font-size: 100%; font-color: #333; border: 1px solid #333; padding: 1px 5px;">' . $expression . '</span>';
61
+        return '<span style="font-style: normal; font-weight: bold; font-size: 100%; font-color: #333; border: 1px solid #333; padding: 1px 5px;">'.$expression.'</span>';
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
htdocs/class/captcha/image/scripts/imageclass.php 2 patches
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -297,15 +297,15 @@
 block discarded – undo
297 297
         if ($RandImage = $this->loadBackground()) {
298 298
             $ImageType = @getimagesize($RandImage);
299 299
             switch (@$ImageType[2]) {
300
-            case 1:
301
-                $BackgroundImage = imagecreatefromgif($RandImage);
302
-                break;
303
-            case 2:
304
-                $BackgroundImage = imagecreatefromjpeg($RandImage);
305
-                break;
306
-            case 3:
307
-                $BackgroundImage = imagecreatefrompng($RandImage);
308
-                break;
300
+                case 1:
301
+                    $BackgroundImage = imagecreatefromgif($RandImage);
302
+                    break;
303
+                case 2:
304
+                    $BackgroundImage = imagecreatefromjpeg($RandImage);
305
+                    break;
306
+                case 3:
307
+                    $BackgroundImage = imagecreatefrompng($RandImage);
308
+                    break;
309 309
             }
310 310
         }
311 311
         if (isset($BackgroundImage) && !empty($BackgroundImage)) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     {
142 142
         if ($this->invalid) {
143 143
             header('Content-type: image/gif');
144
-            readfile($this->xoops_root_path . '/images/subject/icon2.gif');
144
+            readfile($this->xoops_root_path.'/images/subject/icon2.gif');
145 145
 
146 146
             return false;
147 147
         }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             return $items;
168 168
         }
169 169
 
170
-        $file_path = $this->xoops_root_path . "/class/captcha/image/{$name}";
170
+        $file_path = $this->xoops_root_path."/class/captcha/image/{$name}";
171 171
         $files = \Xoops\Core\Lists\File::getList($file_path);
172 172
         foreach ($files as $item) {
173 173
             if (empty($extension) || preg_match("/(\.{$extension})$/i", $item)) {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     public function loadFont()
240 240
     {
241 241
         $fonts = $this->getList('fonts', 'ttf');
242
-        $this->font = $this->xoops_root_path . '/class/captcha/image/fonts/' . $fonts[array_rand($fonts)];
242
+        $this->font = $this->xoops_root_path.'/class/captcha/image/fonts/'.$fonts[array_rand($fonts)];
243 243
     }
244 244
 
245 245
     /**
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
     {
286 286
         $RandBackground = null;
287 287
         if ($backgrounds = $this->getList('backgrounds', '(gif|jpg|png)')) {
288
-            $RandBackground = $this->xoops_root_path . '/class/captcha/image/backgrounds/' . $backgrounds[array_rand($backgrounds)];
288
+            $RandBackground = $this->xoops_root_path.'/class/captcha/image/backgrounds/'.$backgrounds[array_rand($backgrounds)];
289 289
         }
290 290
 
291 291
         return $RandBackground;
Please login to merge, or discard this patch.
htdocs/class/captcha/image/scripts/image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
  * @since     2.6.0
25 25
  */
26 26
 
27
-require dirname(dirname(dirname(dirname(__DIR__)))) . '/mainfile.php';
27
+require dirname(dirname(dirname(dirname(__DIR__)))).'/mainfile.php';
28 28
 
29 29
 require_once 'imageclass.php';
30 30
 
Please login to merge, or discard this patch.
console/Commands/Utf8mb4ModuleCommand.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 The <info>utf8mb4-module</info> command updates the tables that are owned by an installed module
24 24
 to use MySQL's <info>utf8mb4</info> character set, and <info>utf8mb4_unicode_ci</info> collation.
25 25
 EOT
26
-             );
26
+                );
27 27
     }
28 28
 
29 29
     protected function execute(InputInterface $input, OutputInterface $output)
Please login to merge, or discard this patch.
console/Commands/UpdateModuleCommand.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 This can be especially useful if the module configuration has changed, and
24 24
 it is interfering with normal online operation.
25 25
 EOT
26
-             );
26
+                );
27 27
     }
28 28
 
29 29
     protected function execute(InputInterface $input, OutputInterface $output)
Please login to merge, or discard this patch.
console/Commands/RenameSystemTablesCommand.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 The <info>rename-system-tables</info> command updates the XOOPS kernel
20 20
 database tables that are managed by the system module.
21 21
 EOT
22
-             );
22
+                );
23 23
     }
24 24
 
25 25
     protected function execute(InputInterface $input, OutputInterface $output)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 
52 52
         $migrate = new \Xmf\Database\Tables();
53 53
 
54
-        $renameTable = function ($existingName, $newName) use ($migrate) {
54
+        $renameTable = function($existingName, $newName) use ($migrate) {
55 55
             $status = $migrate->useTable($newName);
56 56
             if (!$status) {
57 57
                 $status = $migrate->useTable($existingName);
Please login to merge, or discard this patch.
console/Commands/CiBootstrapCommand.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 The <info>ci-bootstrap</info> command writes a basic mainfile for use in automation
25 25
 of the travis-ci continuous integration environment.
26 26
 EOT
27
-             );
27
+                );
28 28
     }
29 29
 
30 30
     /**
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -63,29 +63,29 @@  discard block
 block discarded – undo
63 63
     protected function createConfigFile($configFile, $baseDir)
64 64
     {
65 65
         $url = 'http://localhost';
66
-        $webRoot = $baseDir . '/htdocs';
66
+        $webRoot = $baseDir.'/htdocs';
67 67
         $configs = [
68 68
             'root-path' => $webRoot,
69
-            'lib-path' => $baseDir . '/xoops_lib',
70
-            'var-path' => $baseDir . '/xoops_data',
71
-            'trust-path' => $baseDir . '/xoops_lib',
69
+            'lib-path' => $baseDir.'/xoops_lib',
70
+            'var-path' => $baseDir.'/xoops_data',
71
+            'trust-path' => $baseDir.'/xoops_lib',
72 72
             'url' => $url,
73 73
             'prot' => 'http://',
74
-            'asset-path' => $webRoot . '/assets',
75
-            'asset-url' => $url . '/assets',
76
-            'themes-path' => $webRoot . '/themes',
77
-            'themes-url' => $url . '/themes',
78
-            'adminthemes-path' => $webRoot . '/modules/system/themes',
79
-            'adminthemes-url' => $url . '/modules/system/themes',
80
-            'media-path' => $webRoot . '/media',
81
-            'media-url' => $url . '/media',
82
-            'uploads-path' => $webRoot . '/uploads',
83
-            'uploads-url' => $url . '/uploads',
74
+            'asset-path' => $webRoot.'/assets',
75
+            'asset-url' => $url.'/assets',
76
+            'themes-path' => $webRoot.'/themes',
77
+            'themes-url' => $url.'/themes',
78
+            'adminthemes-path' => $webRoot.'/modules/system/themes',
79
+            'adminthemes-url' => $url.'/modules/system/themes',
80
+            'media-path' => $webRoot.'/media',
81
+            'media-url' => $url.'/media',
82
+            'uploads-path' => $webRoot.'/uploads',
83
+            'uploads-url' => $url.'/uploads',
84 84
             'cookie-domain' => '',
85 85
             'cookie-path' => '/',
86
-            'smarty-cache' => $baseDir . '/xoops_data/caches/smarty_cache',
87
-            'smarty-compile' => $baseDir . '/xoops_data/caches/smarty_compile',
88
-            'smarty-xoops-plugins' => $baseDir . '/xoops_lib/smarty/xoops_plugins',
86
+            'smarty-cache' => $baseDir.'/xoops_data/caches/smarty_cache',
87
+            'smarty-compile' => $baseDir.'/xoops_data/caches/smarty_compile',
88
+            'smarty-xoops-plugins' => $baseDir.'/xoops_lib/smarty/xoops_plugins',
89 89
             'db-type' => 'pdo_mysql',
90 90
             'db-charset' => 'utf8mb4',
91 91
             'db-prefix' => 'x300',
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         }
146 146
 
147 147
         if (!class_exists('\XoopsBaseConfig', false)) {
148
-            include $baseDir . '/htdocs/class/XoopsBaseConfig.php';
148
+            include $baseDir.'/htdocs/class/XoopsBaseConfig.php';
149 149
             \XoopsBaseConfig::getInstance($configFile);
150 150
         }
151 151
         \Xoops\Core\Cache\CacheManager::createDefaultConfig();
Please login to merge, or discard this patch.
console/Commands/CiInstallCommand.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 appropriate mainfile.php to have been previously created, possibly using the
27 27
 <info>ci-bootstrap</info> command (only available if mainfile.php does not exist.)
28 28
 EOT
29
-             );
29
+                );
30 30
     }
31 31
 
32 32
     /**
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,14 +76,14 @@
 block discarded – undo
76 76
             'system_user',
77 77
             [
78 78
             //  'uid'             => 1,             // mediumint(8) unsigned NOT NULL auto_increment,
79
-                'uname' => $adminname,    // varchar(25) NOT NULL default '',
80
-                'email' => 'nobody@localhost',    // varchar(60) NOT NULL default '',
81
-                'user_regdate' => $regdate,      // int(10) unsigned NOT NULL default '0',
82
-                'user_viewemail' => 1,             // tinyint(1) unsigned NOT NULL default '0',
83
-                'pass' => $adminpass,    // varchar(255) NOT NULL default '',
84
-                'rank' => 7,             // smallint(5) unsigned NOT NULL default '0',
85
-                'level' => 5,             // tinyint(3) unsigned NOT NULL default '1',
86
-                'last_login' => $regdate,      // int(10) unsigned NOT NULL default '0',
79
+                'uname' => $adminname, // varchar(25) NOT NULL default '',
80
+                'email' => 'nobody@localhost', // varchar(60) NOT NULL default '',
81
+                'user_regdate' => $regdate, // int(10) unsigned NOT NULL default '0',
82
+                'user_viewemail' => 1, // tinyint(1) unsigned NOT NULL default '0',
83
+                'pass' => $adminpass, // varchar(255) NOT NULL default '',
84
+                'rank' => 7, // smallint(5) unsigned NOT NULL default '0',
85
+                'level' => 5, // tinyint(3) unsigned NOT NULL default '1',
86
+                'last_login' => $regdate, // int(10) unsigned NOT NULL default '0',
87 87
             ]
88 88
         );
89 89
         $output->writeln(sprintf('<info>Inserted %d user.</info>', $result));
Please login to merge, or discard this patch.
xoops_lib/Xmf/Key/Basic.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function getSigning()
36 36
     {
37
-        return (string) $this->storage->fetch($this->name);
37
+        return (string)$this->storage->fetch($this->name);
38 38
     }
39 39
 
40 40
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function getVerifying()
46 46
     {
47
-        return (string) $this->storage->fetch($this->name);
47
+        return (string)$this->storage->fetch($this->name);
48 48
     }
49 49
 
50 50
     /**
Please login to merge, or discard this patch.