Completed
Push — master ( 716a76...3f8338 )
by Richard
21s queued 12s
created
htdocs/modules/smilies/class/SmiliesProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function renderEmojiSelector(Response $response, $identifier)
97 97
     {
98
-        $selector =  '<button type="button" class="btn btn-default btn-sm" alt="'
99
-            . \XoopsLocale::SMILIES . '" title="' . \XoopsLocale::SMILIES . '" onclick=\'openWithSelfMain("'
100
-            . \XoopsBaseConfig::get('url') . '/modules/smilies/include/popup.php?target=' . $identifier
98
+        $selector = '<button type="button" class="btn btn-default btn-sm" alt="'
99
+            . \XoopsLocale::SMILIES.'" title="'.\XoopsLocale::SMILIES.'" onclick=\'openWithSelfMain("'
100
+            . \XoopsBaseConfig::get('url').'/modules/smilies/include/popup.php?target='.$identifier
101 101
             . '","smilies",300,650);\' onmouseover=\'style.cursor="hand"\'>'
102 102
             . '<span class="fa fa-fw fa-smile-o" aria-hidden="true"></span></button>';
103 103
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 $emoji['name'] = $smile['smiley_code'];
121 121
                 $emoji['description'] = $smile['smiley_emotion'];
122 122
                 $emoji['rendered'] =
123
-                    '<img src="' . $smile['smiley_url'] . '" alt="' . $smile['smiley_emotion'] . '" />';
123
+                    '<img src="'.$smile['smiley_url'].'" alt="'.$smile['smiley_emotion'].'" />';
124 124
                 $emojiList[] = $emoji;
125 125
             }
126 126
         }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Html/Attributes.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
     public function add($name, $value)
51 51
     {
52 52
         if (is_scalar($value)) {
53
-            $value = explode(' ', (string) $value);
53
+            $value = explode(' ', (string)$value);
54 54
         }
55 55
         $values = $this->get($name, []);
56 56
         if (is_scalar($values)) {
57
-            $values = (array) $values;
57
+            $values = (array)$values;
58 58
         }
59 59
         foreach ($value as $v) {
60 60
             if (!in_array($v, $values)) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function suppressRender($names)
80 80
     {
81
-        $names = (array) $names;
81
+        $names = (array)$names;
82 82
         $this->suppressRenderAttributes = array_unique(
83 83
             array_merge($this->suppressRenderAttributes, $names)
84 84
         );
@@ -126,16 +126,16 @@  discard block
 block discarded – undo
126 126
             }
127 127
             if (is_array($value)) {
128 128
                 // arrays can be used for class attributes, space separated
129
-                $set = '="' . htmlspecialchars(implode(' ', $value), ENT_QUOTES) .'"';
130
-            } elseif ($value===null) {
129
+                $set = '="'.htmlspecialchars(implode(' ', $value), ENT_QUOTES).'"';
130
+            } elseif ($value === null) {
131 131
                 // null indicates attribute minimization (name only,) like autofocus or readonly
132 132
                 $set = '';
133 133
             } elseif (0 === strncmp($name, 'on', 2)) {
134
-                $set = '="' . str_replace('&amp;', '&', htmlspecialchars($value, ENT_COMPAT)) . '"';
134
+                $set = '="'.str_replace('&amp;', '&', htmlspecialchars($value, ENT_COMPAT)).'"';
135 135
             } else {
136
-                $set = '="' . htmlspecialchars($value, ENT_QUOTES) . '"';
136
+                $set = '="'.htmlspecialchars($value, ENT_QUOTES).'"';
137 137
             }
138
-            $rendered .= htmlspecialchars($name, ENT_QUOTES) . $set . ' ';
138
+            $rendered .= htmlspecialchars($name, ENT_QUOTES).$set.' ';
139 139
         }
140 140
         return $rendered;
141 141
     }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      */
236 236
     public function getNames()
237 237
     {
238
-        return array_keys((array) $this);
238
+        return array_keys((array)$this);
239 239
     }
240 240
 
241 241
     /**
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
 
312 312
         $likeSet = array();
313 313
         foreach ($this as $k => $v) {
314
-            if (substr($k, 0, strlen($nameLike))==$nameLike) {
315
-                $likeSet[$k]=$v;
314
+            if (substr($k, 0, strlen($nameLike)) == $nameLike) {
315
+                $likeSet[$k] = $v;
316 316
             }
317 317
         }
318 318
         return $likeSet;
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/YouTube.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected static $defaultConfiguration = [
32 32
         'enabled' => true,
33
-        'enable_youtube_entry' => true,  // false to disable entry button in editor, existing content will still play
33
+        'enable_youtube_entry' => true, // false to disable entry button in editor, existing content will still play
34 34
         'template' => '<div class="embed-responsive %4$s">
35 35
             <iframe class="embed-responsive-item" width="%2$d" height="%3$d" src="https://www.youtube.com/embed/%1$s" frameborder="0" allowfullscreen></iframe>
36 36
             </div>',
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $this->shortcodes->addShortcode(
101 101
             'youtube',
102
-            function ($attributes, $content, $tagName) {
102
+            function($attributes, $content, $tagName) {
103 103
                 if (array_key_exists(0, $attributes) && '=' === substr($attributes[0], 0, 1)) {
104 104
                     $args = ltrim($attributes[0], '=');
105 105
                     list($width, $height) = explode(',', $args);
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
                     ];
113 113
                     $cleanAttributes = $this->shortcodes->shortcodeAttributes($defaults, $attributes);
114 114
                     $url = $cleanAttributes['url'];
115
-                    $width = (int) $cleanAttributes['width'];
116
-                    $height = (int) $cleanAttributes['height'];
115
+                    $width = (int)$cleanAttributes['width'];
116
+                    $height = (int)$cleanAttributes['height'];
117 117
                 }
118 118
 
119 119
                 // from: http://stackoverflow.com/questions/2936467/parse-youtube-video-id-using-preg-match/6382259#6382259
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
                         break;
138 138
                 }
139 139
 
140
-                $aspectRatio = $width/$height; // 16x9 = 1.777777778, 4x3 = 1.333333333
140
+                $aspectRatio = $width / $height; // 16x9 = 1.777777778, 4x3 = 1.333333333
141 141
                 $responsiveAspect = ($aspectRatio < 1.4) ? 'embed-responsive-4by3' : 'embed-responsive-16by9';
142 142
                 if ($width < 17 && $height < 10) {
143
-                    $scale = (int) 640 / $width;
143
+                    $scale = (int)640 / $width;
144 144
                     $width = $width * $scale;
145 145
                     $height = $height * $scale;
146 146
                 }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/Mms.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected static $defaultConfiguration = [
32 32
         'enabled' => false,
33
-        'enable_mms_entry' => false,  // false to disable entry button in editor, existing content will still play
33
+        'enable_mms_entry' => false, // false to disable entry button in editor, existing content will still play
34 34
     ];
35 35
 
36 36
     /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $this->shortcodes->addShortcode(
90 90
             'mms',
91
-            function ($attributes, $content, $tagName) {
91
+            function($attributes, $content, $tagName) {
92 92
                 $args = ltrim($attributes[0], '=');
93 93
                 list($width, $height) = explode(',', $args);
94 94
                 $url = $content;
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/Flash.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
         'template' => '<object type="application/x-shockwave-flash" data="%1$s" width="%2$d" height="%3$d"></object>',
35 35
         'fallback_width'  => "320",
36 36
         'fallback_height' => "240",
37
-        'enable_flash_entry' => false,  // false to disable entry button in editor, existing content will still play
37
+        'enable_flash_entry' => false, // false to disable entry button in editor, existing content will still play
38 38
     ];
39 39
 
40 40
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function registerExtensionProcessing()
100 100
     {
101
-        $function = function ($attributes, $content, $tagName) {
101
+        $function = function($attributes, $content, $tagName) {
102 102
             if (array_key_exists(0, $attributes) && '=' === substr($attributes[0], 0, 1)) {
103 103
                 $args = ltrim($attributes[0], '=');
104 104
                 list($width, $height) = explode(',', $args);
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/Wmp.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
     protected static $defaultConfiguration = [
32 32
         'enabled' => false,
33
-        'enable_wmp_entry' => false,  // false to disable entry button in editor, existing content will still play
33
+        'enable_wmp_entry' => false, // false to disable entry button in editor, existing content will still play
34 34
         ];
35 35
 
36 36
     /**
@@ -86,18 +86,18 @@  discard block
 block discarded – undo
86 86
     {
87 87
         $this->shortcodes->addShortcode(
88 88
             'wmp',
89
-            function ($attributes, $content, $tagName) {
89
+            function($attributes, $content, $tagName) {
90 90
                 $args = ltrim($attributes[0], '=');
91 91
                 list($width, $height) = explode(',', $args);
92 92
                 $url = $content;
93 93
 
94 94
                 $template = '<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"'
95
-                    . ' id="WindowsMediaPlayer" width="%2$s" height="%3$s">' . "\n"
96
-                    . '<param name="URL" value="%1$s">'. "\n"
97
-                    . '<param name="AutoStart" value="0">' . "\n"
95
+                    . ' id="WindowsMediaPlayer" width="%2$s" height="%3$s">'."\n"
96
+                    . '<param name="URL" value="%1$s">'."\n"
97
+                    . '<param name="AutoStart" value="0">'."\n"
98 98
                     . '<embed autostart="0" src="%1$s" type="video/x-ms-wmv" width="%2$s" height="%3$s"'
99
-                    . ' controls="ImageWindow" console="cons"> </embed>' . "\n"
100
-                    . '</object>' . "\n";
99
+                    . ' controls="ImageWindow" console="cons"> </embed>'."\n"
100
+                    . '</object>'."\n";
101 101
                 $newContent = sprintf($template, $url, $width, $height);
102 102
                 return $newContent;
103 103
             }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/Extensions/Rtsp.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected static $defaultConfiguration = [
32 32
         'enabled' => false,
33
-        'enable_rtsp_entry' => false,  // false to disable entry button in editor, existing content will still play
33
+        'enable_rtsp_entry' => false, // false to disable entry button in editor, existing content will still play
34 34
     ];
35 35
 
36 36
     /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
         $this->shortcodes->addShortcode(
90 90
             'rtsp',
91
-            function ($attributes, $content, $tagName) {
91
+            function($attributes, $content, $tagName) {
92 92
                 $args = ltrim($attributes[0], '=');
93 93
                 list($width, $height) = explode(',', $args);
94 94
                 $url = $content;
Please login to merge, or discard this patch.
xoops_lib/Xoops/Core/Text/Sanitizer/ExtensionAbstract.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,12 +69,12 @@
 block discarded – undo
69 69
         $altText = $this->ts->escapeForJavascript($altText);
70 70
 
71 71
         $buttonCode = '<button type="button" class="btn btn-default btn-sm" '
72
-            . ' alt="' . $altText .'" title="' . $altText . '"'
73
-            . ' onclick="' . $onclick . '(\'' . $textAreaId . '\'';
72
+            . ' alt="'.$altText.'" title="'.$altText.'"'
73
+            . ' onclick="'.$onclick.'(\''.$textAreaId.'\'';
74 74
         foreach ($prompts as $prompt) {
75
-            $buttonCode .= ', \'' . $this->ts->escapeForJavascript($prompt) . '\'';
75
+            $buttonCode .= ', \''.$this->ts->escapeForJavascript($prompt).'\'';
76 76
         }
77
-        $buttonCode .= ');" /><span class="' . $iconClass . '" aria-hidden="true"></span></button>';
77
+        $buttonCode .= ');" /><span class="'.$iconClass.'" aria-hidden="true"></span></button>';
78 78
 
79 79
         return $buttonCode;
80 80
     }
Please login to merge, or discard this patch.
xoops_lib/Xoops/Form/Renderer/Bootstrap3Renderer.php 2 patches
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -44,32 +44,32 @@  discard block
 block discarded – undo
44 44
 		return '';
45 45
     }*/
46 46
 
47
-	/**
47
+    /**
48 48
      * Render support for XoopsFormButton
49 49
      *
50 50
      * @param XoopsFormButton $element form element
51 51
      *
52 52
      * @return string rendered form element
53 53
      */
54
-	protected function renderXoopsFormButton(\Xoops\Form\Button $element):string
54
+    protected function renderXoopsFormButton(\Xoops\Form\Button $element):string
55 55
     {
56
-		if (false == $element->hasClassLike('btn')) {
57
-			$element->add('class', 'btn btn-default');
58
-		}
59
-		$attributes = $element->renderAttributeString();
56
+        if (false == $element->hasClassLike('btn')) {
57
+            $element->add('class', 'btn btn-default');
58
+        }
59
+        $attributes = $element->renderAttributeString();
60 60
         return '<input ' . $attributes . $element->getExtra() .' >';
61
-	}
61
+    }
62 62
 
63
-	/**
63
+    /**
64 64
      * Render support for XoopsFormButtonTray
65 65
      *
66 66
      * @param XoopsFormButtonTray $element form element
67 67
      *
68 68
      * @return string rendered form element
69 69
      */
70
-	protected function renderXoopsFormButtonTray(\Xoops\Form\ButtonTray $element):string
70
+    protected function renderXoopsFormButtonTray(\Xoops\Form\ButtonTray $element):string
71 71
     {
72
-		$ret = '';
72
+        $ret = '';
73 73
         $element->add('class', 'btn');
74 74
         $class = 'class="' . $element->getClass() . '"';
75 75
 
@@ -84,16 +84,16 @@  discard block
 block discarded – undo
84 84
             . ' <input type="reset"' . $class . ' name="reset"  id="reset" value="' . \XoopsLocale::A_RESET . '" />'
85 85
             . ' <input ' . $attributes . $element->getExtra() . ' />';
86 86
         return $ret;
87
-	}
87
+    }
88 88
 
89
-	/**
89
+    /**
90 90
      * Render support for XoopsFormColorPicker
91 91
      *
92 92
      * @param XoopsFormColorPicker $element form element
93 93
      *
94 94
      * @return string rendered form element
95 95
      */
96
-	protected function renderXoopsFormColorPicker(\Xoops\Form\ColorPicker $element):string
96
+    protected function renderXoopsFormColorPicker(\Xoops\Form\ColorPicker $element):string
97 97
     {
98 98
         $xoops = \Xoops::getInstance();
99 99
         if ($xoops->theme()) {
@@ -118,16 +118,16 @@  discard block
 block discarded – undo
118 118
         $ret .= '</span></div>';
119 119
 
120 120
         return $ret;
121
-	}
121
+    }
122 122
 
123
-	/**
123
+    /**
124 124
      * Render support for XoopsFormDateSelect
125 125
      *
126 126
      * @param XoopsFormDateSelect $element form element
127 127
      *
128 128
      * @return string rendered form element
129 129
      */
130
-	protected function renderXoopsFormDateSelect(\Xoops\Form\DateSelect $element):string
130
+    protected function renderXoopsFormDateSelect(\Xoops\Form\DateSelect $element):string
131 131
     {
132 132
         $xoops = \Xoops::getInstance();
133 133
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             $element->add('list', 'list_' . $element->getName());
139 139
         }
140 140
 
141
-		$element->add('class', 'form-control');
141
+        $element->add('class', 'form-control');
142 142
         $element->suppressRender(['value']);
143 143
         $attributes = $element->renderAttributeString();
144 144
 
@@ -164,16 +164,16 @@  discard block
 block discarded – undo
164 164
         $ret .= '</span></div>';
165 165
 
166 166
         return $ret;
167
-	}
167
+    }
168 168
 
169
-	/**
169
+    /**
170 170
      * Render support for XoopsFormDhtmlTextArea
171 171
      *
172 172
      * @param XoopsFormDhtmlTextArea $element form element
173 173
      *
174 174
      * @return string rendered form element
175 175
      */
176
-	protected function renderXoopsFormDhtmlTextArea(\Xoops\Form\DhtmlTextArea $element):string
176
+    protected function renderXoopsFormDhtmlTextArea(\Xoops\Form\DhtmlTextArea $element):string
177 177
     {
178 178
         if ($element->htmlEditor && is_object($element->htmlEditor)) {
179 179
             if (!isset($element->htmlEditor->isEnabled) || $element->htmlEditor->isEnabled) {
@@ -216,30 +216,30 @@  discard block
 block discarded – undo
216 216
             $js_loaded = true;
217 217
         }
218 218
         return $ret;
219
-	}
219
+    }
220 220
 
221
-	/**
221
+    /**
222 222
      * Render support for XoopsFormPassword
223 223
      *
224 224
      * @param XoopsFormPassword $element form element
225 225
      *
226 226
      * @return string rendered form element
227 227
      */
228
-	protected function renderXoopsFormPassword(\Xoops\Form\Password $element):string
228
+    protected function renderXoopsFormPassword(\Xoops\Form\Password $element):string
229 229
     {
230 230
         $element->add('class', 'form-control');
231
-		$attributes = $element->renderAttributeString();
231
+        $attributes = $element->renderAttributeString();
232 232
         return '<input ' . $attributes . $element->getExtra() .' >';
233
-	}
233
+    }
234 234
 
235
-	/**
235
+    /**
236 236
      * Render support for XoopsFormSelect
237 237
      *
238 238
      * @param XoopsFormSelect $element form element
239 239
      *
240 240
      * @return string rendered form element
241 241
      */
242
-	protected function renderXoopsFormSelect(\Xoops\Form\Select $element):string
242
+    protected function renderXoopsFormSelect(\Xoops\Form\Select $element):string
243 243
     {
244 244
         $selected = (array) $element->getValue();
245 245
 
@@ -265,16 +265,16 @@  discard block
 block discarded – undo
265 265
         $ret .= '</select>' . "\n";
266 266
 
267 267
         return $ret;
268
-	}
268
+    }
269 269
 
270
-	/**
270
+    /**
271 271
      * Render support for XoopsFormText
272 272
      *
273 273
      * @param XoopsFormText $element form element
274 274
      *
275 275
      * @return string rendered form element
276 276
      */
277
-	protected function renderXoopsFormText(\Xoops\Form\Text $element):string
277
+    protected function renderXoopsFormText(\Xoops\Form\Text $element):string
278 278
     {
279 279
         $element->add('class', 'form-control');
280 280
         $dataList = $element->isDatalist();
@@ -284,21 +284,21 @@  discard block
 block discarded – undo
284 284
 
285 285
         $attributes = $element->renderAttributeString();
286 286
         return '<input ' . $attributes . ' ' . $element->getExtra() .' >';
287
-	}
287
+    }
288 288
 
289
-	/**
289
+    /**
290 290
      * Render support for XoopsFormTextArea
291 291
      *
292 292
      * @param XoopsFormTextArea $element form element
293 293
      *
294 294
      * @return string rendered form element
295 295
      */
296
-	protected function renderXoopsFormTextArea(\Xoops\Form\TextArea $element):string
296
+    protected function renderXoopsFormTextArea(\Xoops\Form\TextArea $element):string
297 297
     {
298 298
         $element->suppressRender(['value']);
299
-		$element->add('class', 'form-control');
299
+        $element->add('class', 'form-control');
300 300
         $attributes = $element->renderAttributeString();
301 301
         return '<textarea ' . $attributes . ' ' . $element->getExtra() .' >'
302 302
             . $element->getValue() . '</textarea>';
303
-	}
303
+    }
304 304
 }
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 {
23 23
     public function render(\Xoops\Form\Element $element):string
24 24
     {
25
-        $methodName = 'render' . str_replace('\\' , '', get_class($element));
25
+        $methodName = 'render'.str_replace('\\', '', get_class($element));
26 26
         if (true === method_exists($this, $methodName)) {
27 27
             return $this->$methodName($element);
28 28
         }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 			$element->add('class', 'btn btn-default');
58 58
 		}
59 59
 		$attributes = $element->renderAttributeString();
60
-        return '<input ' . $attributes . $element->getExtra() .' >';
60
+        return '<input '.$attributes.$element->getExtra().' >';
61 61
 	}
62 62
 
63 63
 	/**
@@ -71,18 +71,18 @@  discard block
 block discarded – undo
71 71
     {
72 72
 		$ret = '';
73 73
         $element->add('class', 'btn');
74
-        $class = 'class="' . $element->getClass() . '"';
74
+        $class = 'class="'.$element->getClass().'"';
75 75
 
76 76
         $attributes = $element->renderAttributeString();
77 77
 
78
-        if ((bool) $element->get(':showdelete', false)) {
79
-            $ret .= '<input type="submit"' . $class . ' name="delete" id="delete" value="'
80
-                . \XoopsLocale::A_DELETE . '" onclick="this.form.elements.op.value=\'delete\'">';
78
+        if ((bool)$element->get(':showdelete', false)) {
79
+            $ret .= '<input type="submit"'.$class.' name="delete" id="delete" value="'
80
+                . \XoopsLocale::A_DELETE.'" onclick="this.form.elements.op.value=\'delete\'">';
81 81
         }
82
-        $ret .= ' <input type="button" ' . $class . ' value="' . \XoopsLocale::A_CANCEL
82
+        $ret .= ' <input type="button" '.$class.' value="'.\XoopsLocale::A_CANCEL
83 83
             . '" onclick="history.go(-1);return true;" />'
84
-            . ' <input type="reset"' . $class . ' name="reset"  id="reset" value="' . \XoopsLocale::A_RESET . '" />'
85
-            . ' <input ' . $attributes . $element->getExtra() . ' />';
84
+            . ' <input type="reset"'.$class.' name="reset"  id="reset" value="'.\XoopsLocale::A_RESET.'" />'
85
+            . ' <input '.$attributes.$element->getExtra().' />';
86 86
         return $ret;
87 87
 	}
88 88
 
@@ -99,21 +99,21 @@  discard block
 block discarded – undo
99 99
         if ($xoops->theme()) {
100 100
             $xoops->theme()->addScript('include/color-picker.js');
101 101
         } else {
102
-            echo '<script type="text/javascript" src="' . $xoops->url('/include/color-picker.js') . '"></script>';
102
+            echo '<script type="text/javascript" src="'.$xoops->url('/include/color-picker.js').'"></script>';
103 103
         }
104 104
         $temp = $element->get('value', '');
105 105
         if (!empty($temp)) {
106
-            $element->set('style', 'background-color:' . $temp . ';');
106
+            $element->set('style', 'background-color:'.$temp.';');
107 107
         }
108 108
         $element->set('class', 'form-control');
109 109
         $ret = '<div class="input-group">';
110 110
         $attributes = $element->renderAttributeString();
111
-        $ret .= '<input ' . $attributes . ' ' . $element->getExtra() .' >';
111
+        $ret .= '<input '.$attributes.' '.$element->getExtra().' >';
112 112
         $ret .= '<span class="input-group-btn">';
113 113
         $ret .= '<button class="btn btn-default" type="button" ';
114
-        $ret .= 'data-toggle="tooltip" data-placement="left" title="' . \XoopsLocale::A_SELECT . '" ';
114
+        $ret .= 'data-toggle="tooltip" data-placement="left" title="'.\XoopsLocale::A_SELECT.'" ';
115 115
         $ret .= 'onclick="return TCP.popup(\'';
116
-        $ret .= $xoops->url('/include/') . '\',document.getElementById(\'' . $element->getName() . '\'));">';
116
+        $ret .= $xoops->url('/include/').'\',document.getElementById(\''.$element->getName().'\'));">';
117 117
         $ret .= '<span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></button>';
118 118
         $ret .= '</span></div>';
119 119
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         $dataList = $element->isDatalist();
137 137
         if (!empty($dataList)) {
138
-            $element->add('list', 'list_' . $element->getName());
138
+            $element->add('list', 'list_'.$element->getName());
139 139
         }
140 140
 
141 141
 		$element->add('class', 'form-control');
@@ -149,17 +149,17 @@  discard block
 block discarded – undo
149 149
         $xoops->theme()->addScript(
150 150
             '',
151 151
             '',
152
-            ' $(function() { $( "#' . $element->get('id') . '" ).datepicker({' .
153
-            'showOn: "focus", changeYear: true, constrainInput: false ' .
152
+            ' $(function() { $( "#'.$element->get('id').'" ).datepicker({'.
153
+            'showOn: "focus", changeYear: true, constrainInput: false '.
154 154
             ' }); }); '
155 155
         );
156 156
 
157 157
         $ret = '<div class="input-group">';
158
-        $ret .= '<input ' . $attributes . ' value="' . $display_value . '" ' . $element->getExtra() .' >';
158
+        $ret .= '<input '.$attributes.' value="'.$display_value.'" '.$element->getExtra().' >';
159 159
         $ret .= '<span class="input-group-btn">';
160 160
         $ret .= '<button class="btn btn-default" type="button" ';
161
-        $ret .= 'data-toggle="tooltip" data-placement="left" title="' . \XoopsLocale::A_SELECT . '" ';
162
-        $ret .= 'onclick="$( \'#' . $element->get('id') . '\' ).datepicker( \'show\' );"> ';
161
+        $ret .= 'data-toggle="tooltip" data-placement="left" title="'.\XoopsLocale::A_SELECT.'" ';
162
+        $ret .= 'onclick="$( \'#'.$element->get('id').'\' ).datepicker( \'show\' );"> ';
163 163
         $ret .= '<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span></button>';
164 164
         $ret .= '</span></div>';
165 165
 
@@ -184,10 +184,10 @@  discard block
 block discarded – undo
184 184
 
185 185
         $xoops = \Xoops::getInstance();
186 186
 
187
-        $extra = ($element->getExtra() != '' ? " " . $element->getExtra() : '');
187
+        $extra = ($element->getExtra() != '' ? " ".$element->getExtra() : '');
188 188
         $ret = "";
189 189
         // actions
190
-        $ret .= $element->xoopsCodeControls() . "<br />\n";
190
+        $ret .= $element->xoopsCodeControls()."<br />\n";
191 191
         // fonts
192 192
         $ret .= $element->typographyControls();
193 193
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         $element->suppressRender(['value']);
197 197
         $attributes = $element->renderAttributeString();
198 198
 
199
-        $ret .= '<textarea ' . $attributes . $extra . '>' . $element->getValue() . "</textarea>\n";
199
+        $ret .= '<textarea '.$attributes.$extra.'>'.$element->getValue()."</textarea>\n";
200 200
 
201 201
         if (empty($element->skipPreview)) {
202 202
             if (!$xoops->theme()) {
@@ -204,15 +204,15 @@  discard block
 block discarded – undo
204 204
             } else {
205 205
                 $xoops->theme()->addScript('media/xoops/image.js', array('type' => 'text/javascript'));
206 206
             }
207
-            $button = "<input id='" . $element->getName() . "_preview_button' " . "type='button' " . "class='btn btn-sm btn-default' value='" . \XoopsLocale::A_PREVIEW . "' " . "onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $element->getName() . "','" . XOOPS_URL . "/images', " . (int)($element->doHtml) . ", '" . $xoops->security()->createToken() . "')\"" . " />";
208
-            $ret .= "<br />" . "<div id='" . $element->getName() . "_hidden' style='display: block;'> " . "<fieldset>" . "<legend>" . $button . "</legend>" . "<div id='" . $element->getName() . "_hidden_data'>" . \XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT . "</div>" . "</fieldset>" . "</div>";
207
+            $button = "<input id='".$element->getName()."_preview_button' "."type='button' "."class='btn btn-sm btn-default' value='".\XoopsLocale::A_PREVIEW."' "."onclick=\"form_instantPreview('".XOOPS_URL."', '".$element->getName()."','".XOOPS_URL."/images', ".(int)($element->doHtml).", '".$xoops->security()->createToken()."')\""." />";
208
+            $ret .= "<br />"."<div id='".$element->getName()."_hidden' style='display: block;'> "."<fieldset>"."<legend>".$button."</legend>"."<div id='".$element->getName()."_hidden_data'>".\XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT."</div>"."</fieldset>"."</div>";
209 209
         }
210 210
         // Load javascript
211 211
         if (empty($js_loaded)) {
212 212
             $javascript = (($element->js)
213
-                    ? '<script type="text/javascript">' . $element->js . '</script>'
214
-                    : '') . '<script type="text/javascript" src="' . \XoopsBaseConfig::get('url') . '/include/formdhtmltextarea.js"></script>';
215
-            $ret = $javascript . $ret;
213
+                    ? '<script type="text/javascript">'.$element->js.'</script>'
214
+                    : '').'<script type="text/javascript" src="'.\XoopsBaseConfig::get('url').'/include/formdhtmltextarea.js"></script>';
215
+            $ret = $javascript.$ret;
216 216
             $js_loaded = true;
217 217
         }
218 218
         return $ret;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     {
230 230
         $element->add('class', 'form-control');
231 231
 		$attributes = $element->renderAttributeString();
232
-        return '<input ' . $attributes . $element->getExtra() .' >';
232
+        return '<input '.$attributes.$element->getExtra().' >';
233 233
 	}
234 234
 
235 235
 	/**
@@ -241,19 +241,19 @@  discard block
 block discarded – undo
241 241
      */
242 242
 	protected function renderXoopsFormSelect(\Xoops\Form\Select $element):string
243 243
     {
244
-        $selected = (array) $element->getValue();
244
+        $selected = (array)$element->getValue();
245 245
 
246 246
         $ele_options = $element->getOptions();
247 247
 
248
-        $extra = ($element->getExtra() != '' ? " " . $element->getExtra() : '');
248
+        $extra = ($element->getExtra() != '' ? " ".$element->getExtra() : '');
249 249
         $element->add('class', 'form-control');
250 250
         $attributes = $element->renderAttributeString();
251
-        $ret = '<select ' . $attributes . $extra .' >' . "\n";
251
+        $ret = '<select '.$attributes.$extra.' >'."\n";
252 252
 
253 253
         if (empty($ele_optgroup)) {
254 254
             foreach ($ele_options as $value => $display) {
255 255
                 if (is_array($display)) {
256
-                    $ret .= '<optgroup label="' . $value . '">' . "\n";
256
+                    $ret .= '<optgroup label="'.$value.'">'."\n";
257 257
                     foreach ($display as $optvalue => $optdisplay) {
258 258
                         $ret .= $element->renderOption($optvalue, $optdisplay, $selected);
259 259
                     }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                 }
263 263
             }
264 264
         }
265
-        $ret .= '</select>' . "\n";
265
+        $ret .= '</select>'."\n";
266 266
 
267 267
         return $ret;
268 268
 	}
@@ -279,11 +279,11 @@  discard block
 block discarded – undo
279 279
         $element->add('class', 'form-control');
280 280
         $dataList = $element->isDatalist();
281 281
         if (!empty($dataList)) {
282
-            $element->add('list', 'list_' . $element->getName());
282
+            $element->add('list', 'list_'.$element->getName());
283 283
         }
284 284
 
285 285
         $attributes = $element->renderAttributeString();
286
-        return '<input ' . $attributes . ' ' . $element->getExtra() .' >';
286
+        return '<input '.$attributes.' '.$element->getExtra().' >';
287 287
 	}
288 288
 
289 289
 	/**
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
         $element->suppressRender(['value']);
299 299
 		$element->add('class', 'form-control');
300 300
         $attributes = $element->renderAttributeString();
301
-        return '<textarea ' . $attributes . ' ' . $element->getExtra() .' >'
302
-            . $element->getValue() . '</textarea>';
301
+        return '<textarea '.$attributes.' '.$element->getExtra().' >'
302
+            . $element->getValue().'</textarea>';
303 303
 	}
304 304
 }
Please login to merge, or discard this patch.