Passed
Push — master ( d46c99...289064 )
by Dmitrijs
01:55
created
src/helpers/Html.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @see https://materializecss.com/grid.html
32 32
      * @see endGridRow()
33 33
      */
34
-    public static function beginGridRow($options = [])
34
+    public static function beginGridRow($options = [ ])
35 35
     {
36 36
         static::addCssClass($options, 'row');
37 37
         return static::beginTag('div', $options);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @see https://materializecss.com/grid.html
62 62
      * @see endGridCol()
63 63
      */
64
-    public static function beginGridCol($options = [])
64
+    public static function beginGridCol($options = [ ])
65 65
     {
66 66
         static::addCssClass($options, 'col');
67 67
         return static::beginTag('div', $options);
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * @see beginGridCol()
93 93
      * @see endGridCol()
94 94
      */
95
-    public static function gridCol($content = '', $options = [])
95
+    public static function gridCol($content = '', $options = [ ])
96 96
     {
97 97
         static::addCssClass($options, 'col');
98 98
         return static::tag('div', $content, $options);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @see https://materializecss.com/typography.html
112 112
      * @see endBlockquote()
113 113
      */
114
-    public static function beginBlockquote($options = [])
114
+    public static function beginBlockquote($options = [ ])
115 115
     {
116 116
         return static::beginTag('blockquote', $options);
117 117
     }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      * @see beginBlockquote()
142 142
      * @see beginBlockquote()
143 143
      */
144
-    public static function blockquote($content = '', $options = [])
144
+    public static function blockquote($content = '', $options = [ ])
145 145
     {
146 146
         return static::tag('blockquote', $content, $options);
147 147
     }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      *
159 159
      * @return string the generated HTML tag
160 160
      */
161
-    public static function badge($content = '', $options = [])
161
+    public static function badge($content = '', $options = [ ])
162 162
     {
163 163
         static::addCssClass($options, 'badge');
164 164
         return static::tag('span', $content, $options);
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      *
177 177
      * @return string the generated HTML tag
178 178
      */
179
-    public static function newBadge($content = '', $options = [])
179
+    public static function newBadge($content = '', $options = [ ])
180 180
     {
181 181
         static::addCssClass($options, 'badge');
182 182
         static::addCssClass($options, 'new');
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      * @return string icon HTML.
196 196
      * @see https://materializecss.com/icons.html
197 197
      */
198
-    public static function icon($name, $options = [])
198
+    public static function icon($name, $options = [ ])
199 199
     {
200 200
         $tag = ArrayHelper::remove($options, 'tag', 'i');
201 201
         static::addCssClass($options, 'material-icons');
@@ -213,10 +213,10 @@  discard block
 block discarded – undo
213 213
      * @see addCssClass()
214 214
      * @see https://materializecss.com/waves.html
215 215
      */
216
-    public static function addWaves($effects, $options = [])
216
+    public static function addWaves($effects, $options = [ ])
217 217
     {
218
-        $effectTypes = is_array($effects) ? $effects : [$effects];
219
-        $effectTypes[] = Waves::INIT;
218
+        $effectTypes = is_array($effects) ? $effects : [ $effects ];
219
+        $effectTypes[ ] = Waves::INIT;
220 220
 
221 221
         foreach ($effectTypes as $effect) {
222 222
             Html::addCssClass($options, "waves-$effect");
Please login to merge, or discard this patch.
src/widgets/Button.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      *
61 61
      * @see \dmgpage\yii2materialize\helpers\Html::icon()
62 62
      */
63
-    public $icon = [];
63
+    public $icon = [ ];
64 64
 
65 65
     /**
66 66
      * @var string|array one or several wave effects
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         }
128 128
 
129 129
         $this->registerPlugin('button');
130
-        return Html::tag($this->tagName, $this->renderIcon() . $label, $this->options);
130
+        return Html::tag($this->tagName, $this->renderIcon().$label, $this->options);
131 131
     }
132 132
 
133 133
     /**
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
             return '';
146 146
         } else {
147 147
             $name = ArrayHelper::getValue($this->icon, 'name', null);
148
-            $position = ArrayHelper::getValue($this->icon, 'position', []);
149
-            $options = ArrayHelper::getValue($this->icon, 'options', []);
148
+            $position = ArrayHelper::getValue($this->icon, 'position', [ ]);
149
+            $options = ArrayHelper::getValue($this->icon, 'options', [ ]);
150 150
 
151 151
             if (!empty($position)) {
152 152
                 Html::addCssClass($options, $position);
Please login to merge, or discard this patch.
src/widgets/Widget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
      * @var array the HTML attributes for the widget container tag.
20 20
      * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
21 21
      */
22
-    public $options = [];
22
+    public $options = [ ];
23 23
 }
Please login to merge, or discard this patch.
src/widgets/MaterializeWidgetTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      *
38 38
      * @see http://materializecss.com/
39 39
      */
40
-    public $clientOptions = [];
40
+    public $clientOptions = [ ];
41 41
 
42 42
     /**
43 43
      * @var array the event handlers for the underlying Materialize JS plugin.
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @see http://materializecss.com/
49 49
      */
50
-    public $clientEvents = [];
50
+    public $clientEvents = [ ];
51 51
 
52 52
     /**
53 53
      * Initializes the widget.
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
     {
59 59
         parent::init();
60 60
         
61
-        if (!isset($this->options['id'])) {
62
-            $this->options['id'] = $this->getId();
61
+        if (!isset($this->options[ 'id' ])) {
62
+            $this->options[ 'id' ] = $this->getId();
63 63
         }
64 64
     }
65 65
 
Please login to merge, or discard this patch.