Completed
Pull Request — master (#624)
by Michael
24:05
created
xoops_lib/Xmf/Language.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@
 block discarded – undo
56 56
                 $language = 'english';
57 57
             }
58 58
         }
59
-        $path = \XoopsBaseConfig::get('root-path') . '/' . ((empty($domain) || 'global' === $domain) ? ''
60
-            : "modules/{$domain}/") . 'language';
59
+        $path = \XoopsBaseConfig::get('root-path').'/'.((empty($domain) || 'global' === $domain) ? ''
60
+            : "modules/{$domain}/").'language';
61 61
         if (!$ret = static::loadFile("{$path}/{$language}/{$name}.php")) {
62 62
             $ret = static::loadFile("{$path}/english/{$name}.php");
63 63
         }
Please login to merge, or discard this patch.
xoops_lib/Xmf/Module/Helper/Session.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function init()
41 41
     {
42
-        $this->prefix = $this->module->getVar('dirname') . '_';
42
+        $this->prefix = $this->module->getVar('dirname').'_';
43 43
     }
44 44
 
45 45
     /**
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     protected function prefix($name)
53 53
     {
54
-        $prefixedName = $this->prefix . $name;
54
+        $prefixedName = $this->prefix.$name;
55 55
 
56 56
         return $prefixedName;
57 57
     }
Please login to merge, or discard this patch.
xoops_lib/Xmf/Module/Helper/Permission.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      **/
67 67
     public function checkPermission($gperm_name, $gperm_itemid, $trueifadmin = true)
68 68
     {
69
-        $gperm_itemid = (int) $gperm_itemid;
69
+        $gperm_itemid = (int)$gperm_itemid;
70 70
         $gperm_groupid = \Xoops::getInstance()->getUserGroups();
71 71
 
72 72
         return $this->permissionHandler->checkRight(
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $gperm_itemid,
75 75
             $gperm_groupid,
76 76
             $this->mid,
77
-            (bool) $trueifadmin
77
+            (bool)$trueifadmin
78 78
         );
79 79
     }
80 80
 
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
         $message = '',
99 99
         $trueifadmin = true
100 100
     ) {
101
-        $gperm_itemid = (int) $gperm_itemid;
101
+        $gperm_itemid = (int)$gperm_itemid;
102 102
         $gperm_groupid = \Xoops::getInstance()->getUserGroups();
103 103
         $permission = $this->permissionHandler->checkRight(
104 104
             $gperm_name,
105 105
             $gperm_itemid,
106 106
             $gperm_groupid,
107 107
             $this->mid,
108
-            (bool) $trueifadmin
108
+            (bool)$trueifadmin
109 109
         );
110 110
         if (!$permission) {
111 111
             $helper = Helper::getHelper($this->dirname);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      **/
124 124
     public function getGroupsForItem($gperm_name, $gperm_itemid)
125 125
     {
126
-        $gperm_itemid = (int) $gperm_itemid;
126
+        $gperm_itemid = (int)$gperm_itemid;
127 127
         return $this->permissionHandler->getGroupIds($gperm_name, $gperm_itemid, $this->mid);
128 128
     }
129 129
 
@@ -138,9 +138,9 @@  discard block
 block discarded – undo
138 138
      **/
139 139
     public function savePermissionForItem($gperm_name, $gperm_itemid, $groups)
140 140
     {
141
-        $gperm_itemid = (int) $gperm_itemid;
141
+        $gperm_itemid = (int)$gperm_itemid;
142 142
         foreach ($groups as $index => $group) {
143
-            $groups[$index] = (int) $group;
143
+            $groups[$index] = (int)$group;
144 144
         }
145 145
 
146 146
         $result = true;
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
      */
174 174
     public function deletePermissionForItem($gperm_name, $gperm_itemid)
175 175
     {
176
-        $gperm_itemid = (int) $gperm_itemid;
176
+        $gperm_itemid = (int)$gperm_itemid;
177 177
         if (!is_array($gperm_name)) {
178
-            $gperm_name = (array) $gperm_name;
178
+            $gperm_name = (array)$gperm_name;
179 179
         }
180 180
         $return = true;
181 181
         foreach ($gperm_name as $pname) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         if (empty($name)) {
212 212
             $name = $this->defaultFieldName($gperm_name, $gperm_itemid);
213 213
         }
214
-        $gperm_itemid = (int) $gperm_itemid;
214
+        $gperm_itemid = (int)$gperm_itemid;
215 215
         $value = $this->getGroupsForItem($gperm_name, $gperm_itemid);
216 216
         $element = new SelectGroup(
217 217
             $caption,
@@ -236,9 +236,9 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function defaultFieldName($gperm_name, $gperm_itemid)
238 238
     {
239
-        $gperm_itemid = (int) $gperm_itemid;
240
-        $name = $this->module->getVar('dirname') . '_' .
241
-            $gperm_name . '_' . $gperm_itemid;
239
+        $gperm_itemid = (int)$gperm_itemid;
240
+        $name = $this->module->getVar('dirname').'_'.
241
+            $gperm_name.'_'.$gperm_itemid;
242 242
 
243 243
         return $name;
244 244
     }
Please login to merge, or discard this patch.
xoops_lib/Xmf/Request.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     public static function getString($name, $default = '', $hash = 'default', $mask = 0)
235 235
     {
236 236
         // Cast to string, in case static::MASK_ALLOW_RAW was specified for mask
237
-        return (string) static::getVar($name, $default, $hash, 'string', $mask);
237
+        return (string)static::getVar($name, $default, $hash, 'string', $mask);
238 238
     }
239 239
 
240 240
     /**
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      */
263 263
     public static function getText($name, $default = '', $hash = 'default')
264 264
     {
265
-        return (string) static::getVar($name, $default, $hash, 'string', static::MASK_ALLOW_RAW);
265
+        return (string)static::getVar($name, $default, $hash, 'string', static::MASK_ALLOW_RAW);
266 266
     }
267 267
 
268 268
     /**
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
      */
277 277
     public static function getUrl($name, $default = '', $hash = 'default')
278 278
     {
279
-        return (string) static::getVar($name, $default, $hash, 'weburl');
279
+        return (string)static::getVar($name, $default, $hash, 'weburl');
280 280
     }
281 281
 
282 282
     /**
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
      */
291 291
     public static function getPath($name, $default = '', $hash = 'default')
292 292
     {
293
-        return (string) static::getVar($name, $default, $hash, 'path');
293
+        return (string)static::getVar($name, $default, $hash, 'path');
294 294
     }
295 295
 
296 296
     /**
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
      */
305 305
     public static function getEmail($name, $default = '', $hash = 'default')
306 306
     {
307
-        $ret = (string) static::getVar($name, $default, $hash, 'email');
307
+        $ret = (string)static::getVar($name, $default, $hash, 'email');
308 308
         return empty($ret) ? $default : $ret;
309 309
     }
310 310
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
      */
320 320
     public static function getIP($name, $default = '', $hash = 'default')
321 321
     {
322
-        $ret = (string) static::getVar($name, $default, $hash, 'ip');
322
+        $ret = (string)static::getVar($name, $default, $hash, 'ip');
323 323
         return empty($ret) ? $default : $ret;
324 324
     }
325 325
 
Please login to merge, or discard this patch.
xoops_lib/Xmf/Yaml.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     {
135 135
         try {
136 136
             $yamlString = VendorYaml::dump($var, $inline, $indent);
137
-            $ret = empty($yamlString) ? false : "<?php\n/*\n---\n" . $yamlString . "\n...\n*/\n";
137
+            $ret = empty($yamlString) ? false : "<?php\n/*\n---\n".$yamlString."\n...\n*/\n";
138 138
         } catch (\Exception $e) {
139 139
             static::logError($e);
140 140
             $ret = false;
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/Xss.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         }
82 82
         $len = (((mb_strlen($text) - $config['truncate_length']) - 5) / 2);
83 83
         if ($len < 5) {
84
-            $ret = mb_substr($text, 0, $len) . ' ... ' . mb_substr($text, -$len);
84
+            $ret = mb_substr($text, 0, $len).' ... '.mb_substr($text, -$len);
85 85
         } else {
86 86
             $ret = mb_substr($text, 0, $config['truncate_length']);
87 87
         }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/Quote.php 1 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
         //look for both open and closing tags in the correct order
53 53
         $pattern = "/\[quote](.*)\[\/quote\]/sU";
54
-        $replacement = \XoopsLocale::C_QUOTE . '<div class="xoopsQuote"><blockquote>\\1</blockquote></div>';
54
+        $replacement = \XoopsLocale::C_QUOTE.'<div class="xoopsQuote"><blockquote>\\1</blockquote></div>';
55 55
 
56 56
         $text = preg_replace($pattern, $replacement, $text, -1, $count);
57 57
         //no more matches, return now
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/UnorderedList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,16 +42,16 @@
 block discarded – undo
42 42
 
43 43
         $shortcodes->addShortcode(
44 44
             'ul',
45
-            function ($attributes, $content, $tagName) use ($shortcodes) {
46
-                $newcontent = '<ul>' . $shortcodes->process($content) . '</ul>';
45
+            function($attributes, $content, $tagName) use ($shortcodes) {
46
+                $newcontent = '<ul>'.$shortcodes->process($content).'</ul>';
47 47
                 return $newcontent;
48 48
             }
49 49
         );
50 50
 
51 51
         $shortcodes->addShortcode(
52 52
             'li',
53
-            function ($attributes, $content, $tagName) use ($shortcodes) {
54
-                $newcontent = '<li>' . $shortcodes->process($content) . '</li>';
53
+            function($attributes, $content, $tagName) use ($shortcodes) {
54
+                $newcontent = '<li>'.$shortcodes->process($content).'</li>';
55 55
                 return $newcontent;
56 56
             }
57 57
         );
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/Iframe.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
     {
44 44
         $this->shortcodes->addShortcode(
45 45
             'iframe',
46
-            function ($attributes, $content, $tagName) {
47
-                $height = (int) ltrim($attributes[0], '=');
48
-                $height = $height <10 ? 200 : $height;
46
+            function($attributes, $content, $tagName) {
47
+                $height = (int)ltrim($attributes[0], '=');
48
+                $height = $height < 10 ? 200 : $height;
49 49
                 $url = trim($content);
50 50
                 $template = $this->config['template'];
51 51
                 $newContent = sprintf($template, $url, $height);
Please login to merge, or discard this patch.