Passed
Pull Request — master (#585)
by
unknown
17:41
created
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
@@ -64,29 +64,29 @@  discard block
 block discarded – undo
64 64
     protected function createConfigFile($configFile, $baseDir)
65 65
     {
66 66
         $url = 'http://localhost';
67
-        $webRoot = $baseDir . '/htdocs';
67
+        $webRoot = $baseDir.'/htdocs';
68 68
         $configs = array(
69 69
             'root-path' => $webRoot,
70
-            'lib-path' => $baseDir . '/xoops_lib',
71
-            'var-path' => $baseDir . '/xoops_data',
72
-            'trust-path' => $baseDir . '/xoops_lib',
70
+            'lib-path' => $baseDir.'/xoops_lib',
71
+            'var-path' => $baseDir.'/xoops_data',
72
+            'trust-path' => $baseDir.'/xoops_lib',
73 73
             'url' => $url,
74 74
             'prot' => 'http://',
75
-            'asset-path' => $webRoot . '/assets',
76
-            'asset-url' => $url . '/assets',
77
-            'themes-path' => $webRoot .'/themes',
78
-            'themes-url' => $url . '/themes',
79
-            'adminthemes-path' => $webRoot . '/modules/system/themes',
80
-            'adminthemes-url' => $url . '/modules/system/themes',
81
-            'media-path' => $webRoot . '/media',
82
-            'media-url' => $url . '/media',
83
-            'uploads-path' => $webRoot . '/uploads',
84
-            'uploads-url' => $url . '/uploads',
75
+            'asset-path' => $webRoot.'/assets',
76
+            'asset-url' => $url.'/assets',
77
+            'themes-path' => $webRoot.'/themes',
78
+            'themes-url' => $url.'/themes',
79
+            'adminthemes-path' => $webRoot.'/modules/system/themes',
80
+            'adminthemes-url' => $url.'/modules/system/themes',
81
+            'media-path' => $webRoot.'/media',
82
+            'media-url' => $url.'/media',
83
+            'uploads-path' => $webRoot.'/uploads',
84
+            'uploads-url' => $url.'/uploads',
85 85
             'cookie-domain' => '',
86 86
             'cookie-path' => '/',
87
-            'smarty-cache' => $baseDir . '/xoops_data/caches/smarty_cache',
88
-            'smarty-compile' => $baseDir . '/xoops_data/caches/smarty_compile',
89
-            'smarty-xoops-plugins' => $baseDir . '/xoops_lib/smarty/xoops_plugins',
87
+            'smarty-cache' => $baseDir.'/xoops_data/caches/smarty_cache',
88
+            'smarty-compile' => $baseDir.'/xoops_data/caches/smarty_compile',
89
+            'smarty-xoops-plugins' => $baseDir.'/xoops_lib/smarty/xoops_plugins',
90 90
             'db-type' => 'pdo_mysql',
91 91
             'db-charset' => 'utf8mb4',
92 92
             'db-prefix' => 'x300',
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         }
145 145
 
146 146
         if (!class_exists('\XoopsBaseConfig', false)) {
147
-            include $baseDir . '/htdocs/class/XoopsBaseConfig.php';
147
+            include $baseDir.'/htdocs/class/XoopsBaseConfig.php';
148 148
             \XoopsBaseConfig::getInstance($configFile);
149 149
         }
150 150
         \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   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                 $output->writeln(strip_tags($message));
62 62
             }
63 63
         }
64
-        if ($result===false) {
64
+        if ($result === false) {
65 65
             $output->writeln(sprintf('<error>Install of %s module failed!</error>', $module));
66 66
         } else {
67 67
             $output->writeln(sprintf('<info>Install of %s module completed.</info>', $module));
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
             'system_user',
77 77
             array(
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/Metagen.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         $tableau = array_filter($tableau, array(static::stopWordsObject(), 'check'));
277 277
         $title = implode("-", $tableau);
278 278
 
279
-        $title = (empty($title)) ? '' : $title . $extension;
279
+        $title = (empty($title)) ? '' : $title.$extension;
280 280
         return $title;
281 281
     }
282 282
 
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
         $start = empty($pos) ? 0 : min($pos);
304 304
 
305
-        $start = max($start - (int) ($length / 2), 0);
305
+        $start = max($start - (int)($length / 2), 0);
306 306
 
307 307
         $pre = ($start > 0); // need an ellipsis in front?
308 308
         if (function_exists('mb_strlen')) {
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
                 }
339 339
             }
340 340
         }
341
-        $haystack = ($pre ? static::ELLIPSIS : '') . trim($haystack) . ($post ? static::ELLIPSIS : '');
341
+        $haystack = ($pre ? static::ELLIPSIS : '').trim($haystack).($post ? static::ELLIPSIS : '');
342 342
         return $haystack;
343 343
     }
344 344
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
     protected static function getNeedlePositions($haystack, $needles)
376 376
     {
377 377
         $pos = array();
378
-        $needles = empty($needles) ? array() : (array) $needles;
378
+        $needles = empty($needles) ? array() : (array)$needles;
379 379
         foreach ($needles as $needle) {
380 380
             if (function_exists('mb_stripos')) {
381 381
                 $i = mb_stripos($haystack, $needle, 0, static::ENCODING);
@@ -442,10 +442,10 @@  discard block
 block discarded – undo
442 442
     {
443 443
         $search = array(
444 444
             "'<script[^>]*?>.*?</script>'si", // Strip out javascript
445
-            "'<img.*?/>'si",                  // Strip out img tags
446
-            "'<[\/\!]*?[^<>]*?>'si",          // Strip out HTML tags
447
-            "'([\r\n])[\s]+'",                // Strip out white space
448
-            "'&(quot|#34);'i",                // Replace HTML entities
445
+            "'<img.*?/>'si", // Strip out img tags
446
+            "'<[\/\!]*?[^<>]*?>'si", // Strip out HTML tags
447
+            "'([\r\n])[\s]+'", // Strip out white space
448
+            "'&(quot|#34);'i", // Replace HTML entities
449 449
             "'&(amp|#38);'i",
450 450
             "'&(lt|#60);'i",
451 451
             "'&(gt|#62);'i",
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 
477 477
         preg_replace_callback(
478 478
             '/&#(\d+);/',
479
-            function ($matches) {
479
+            function($matches) {
480 480
                 return chr($matches[1]);
481 481
             },
482 482
             $document
Please login to merge, or discard this patch.
xoops_lib/Xmf/IPAddress.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function __construct($ip)
35 35
     {
36
-        if (!filter_var((string) $ip, FILTER_VALIDATE_IP)) {
36
+        if (!filter_var((string)$ip, FILTER_VALIDATE_IP)) {
37 37
             $this->ip = false;
38 38
         } else {
39 39
             $this->ip = $this->normalize($ip);
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         $bits = '';
155 155
         for ($i = 0; $i < $length; $i++) {
156 156
             $byte = decbin(ord($binaryIp[$i]));
157
-            $bits .= substr("00000000" . $byte, -8);
157
+            $bits .= substr("00000000".$byte, -8);
158 158
         }
159 159
         return $bits;
160 160
     }
Please login to merge, or discard this patch.
xoops_lib/Xmf/Highlighter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
         $encoding = static::ENCODING;
70 70
         return preg_replace_callback(
71 71
             '#((?:(?!<[/a-z]).)*)([^>]*>|$)#si',
72
-            function ($capture) use ($needle, $pre, $post, $encoding) {
72
+            function($capture) use ($needle, $pre, $post, $encoding) {
73 73
                 $haystack = $capture[1];
74 74
                 if (function_exists('mb_substr')) {
75 75
                     $p1 = mb_stripos($haystack, $needle, 0, $encoding);
76 76
                     $l1 = mb_strlen($needle, $encoding);
77 77
                     $ret = '';
78 78
                     while ($p1 !== false) {
79
-                        $ret .= mb_substr($haystack, 0, $p1, $encoding) . $pre
80
-                            . mb_substr($haystack, $p1, $l1, $encoding) . $post;
79
+                        $ret .= mb_substr($haystack, 0, $p1, $encoding).$pre
80
+                            . mb_substr($haystack, $p1, $l1, $encoding).$post;
81 81
                         $haystack = mb_substr($haystack, $p1 + $l1, mb_strlen($haystack), $encoding);
82 82
                         $p1 = mb_stripos($haystack, $needle, 0, $encoding);
83 83
                     }
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
                     $l1 = strlen($needle);
87 87
                     $ret = '';
88 88
                     while ($p1 !== false) {
89
-                        $ret .= substr($haystack, 0, $p1) . $pre . substr($haystack, $p1, $l1) . $post;
89
+                        $ret .= substr($haystack, 0, $p1).$pre.substr($haystack, $p1, $l1).$post;
90 90
                         $haystack = substr($haystack, $p1 + $l1);
91 91
                         $p1 = stripos($haystack, $needle);
92 92
                     }
93 93
                 }
94
-                $ret .= $haystack . $capture[2];
94
+                $ret .= $haystack.$capture[2];
95 95
 
96 96
                 return $ret;
97 97
             },
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.
xoops_lib/Xmf/Key/FileStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      */
58 58
     protected function fileName($name)
59 59
     {
60
-        return $this->storagePath . "/{$this->systemSecret}-key-{$name}.php";
60
+        return $this->storagePath."/{$this->systemSecret}-key-{$name}.php";
61 61
     }
62 62
 
63 63
     /**
Please login to merge, or discard this patch.
xoops_lib/Xmf/Database/Migrate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
         if (!isset($this->targetDefinitions)) {
122 122
             $this->targetDefinitions = Yaml::read($this->tableDefinitionFile);
123 123
             if (null === $this->targetDefinitions) {
124
-                throw new \RuntimeException("No schema definition " . $this->tableDefinitionFile);
124
+                throw new \RuntimeException("No schema definition ".$this->tableDefinitionFile);
125 125
             }
126 126
         }
127 127
         return $this->targetDefinitions;
Please login to merge, or discard this patch.