Passed
Push — master ( c49c81...0c069c )
by Ferry
03:05
created
src/types/text_area/Hook.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function indexRender($row, $column)
23 23
     {
24 24
         $value = trim(strip_tags($row->{ $column->getField() }));
25
-        if($column->getLimit()) {
25
+        if ($column->getLimit()) {
26 26
             $value = Str::limit($value, $column->getLimit());
27 27
         }
28 28
         return $value;
Please login to merge, or discard this patch.
src/types/text/Hook.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function indexRender($row, $column)
23 23
     {
24 24
         $value = trim(strip_tags($row->{ $column->getField() }));
25
-        if($column->getLimit()) {
25
+        if ($column->getLimit()) {
26 26
             $value = Str::limit($value, $column->getLimit());
27 27
         }
28 28
         return $value;
Please login to merge, or discard this patch.
src/types/select/SelectController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
         $foreignValue = request('foreign_value');
19 19
         $table = decrypt(request('table'));
20 20
         $sqlCondition = decrypt(request('sql_condition'));
21
-        if($foreignKey && $foreignValue && $table) {
21
+        if ($foreignKey && $foreignValue && $table) {
22 22
 
23 23
             $data = DB::table($table)
24 24
                 ->where($foreignKey, $foreignValue);
25
-            if($sqlCondition) {
25
+            if ($sqlCondition) {
26 26
                 $data->whereRaw($sqlCondition);
27 27
             }
28 28
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
             return response()->json(['status'=>true, 'data'=>$data]);
32 32
 
33
-        }else{
33
+        } else {
34 34
             return response()->json(['status'=>false]);
35 35
         }
36 36
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
             return response()->json(['status'=>true, 'data'=>$data]);
32 32
 
33
-        }else{
33
+        } else{
34 34
             return response()->json(['status'=>false]);
35 35
         }
36 36
     }
Please login to merge, or discard this patch.
src/types/select/Route.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-cb()->routeGroupBackend(function () {
4
-    cb()->routePost("select-lookup",'\crocodicstudio\crudbooster\types\select\SelectController@postLookup');
3
+cb()->routeGroupBackend(function() {
4
+    cb()->routePost("select-lookup", '\crocodicstudio\crudbooster\types\select\SelectController@postLookup');
5 5
 });
6 6
\ No newline at end of file
Please login to merge, or discard this patch.
src/types/select/component.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
         <option value="">** Select a {{ $column->getLabel() }}</option>
9 9
         @if(!$column->getForeignKey())
10 10
             <?php
11
-                $columnValue = old($column->getName())?:($column->getDefaultValue())?:$column->getValue();
11
+                $columnValue = old($column->getName()) ?: ($column->getDefaultValue()) ?: $column->getValue();
12 12
             ?>
13 13
             @foreach($column->getOptions() as $key=>$value)
14 14
                 <option {{ $columnValue==$key?'selected':'' }} value="{{ $key }}">{{ $value }}</option>
Please login to merge, or discard this patch.
src/controllers/scaffolding/traits/ColumnsRegister.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
         $data = new TextModel();
56 56
         $data = $this->setDefaultModelValue($data);
57 57
         $data->setLabel($label);
58
-        $data->setName($this->name($label,$name));
59
-        $data->setField($field_to_save?:$this->name($label, $name));
58
+        $data->setName($this->name($label, $name));
59
+        $data->setField($field_to_save ?: $this->name($label, $name));
60 60
         $data->setType("text");
61 61
 
62 62
         columnSingleton()->setColumn($this->index, $data);
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
         $data = new CheckboxModel();
72 72
         $data = $this->setDefaultModelValue($data);
73 73
         $data->setLabel($label);
74
-        $data->setName($this->name($label,$name));
75
-        $data->setField($field_to_save?:$this->name($label, $name));
74
+        $data->setName($this->name($label, $name));
75
+        $data->setField($field_to_save ?: $this->name($label, $name));
76 76
         $data->setType("checkbox");
77 77
 
78 78
         columnSingleton()->setColumn($this->index, $data);
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
         $data = new PasswordModel();
88 88
         $data = $this->setDefaultModelValue($data);
89 89
         $data->setLabel($label);
90
-        $data->setName($this->name($label,$name));
91
-        $data->setField($field_to_save?:$this->name($label, $name));
90
+        $data->setName($this->name($label, $name));
91
+        $data->setField($field_to_save ?: $this->name($label, $name));
92 92
         $data->setType("password");
93 93
         $data->setShowDetail(false);
94 94
         $data->setShowIndex(false);
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
         $data = new ImageModel();
106 106
         $data = $this->setDefaultModelValue($data);
107 107
         $data->setLabel($label);
108
-        $data->setName($this->name($label,$name));
109
-        $data->setField($field_to_save?:$this->name($label, $name));
108
+        $data->setName($this->name($label, $name));
109
+        $data->setField($field_to_save ?: $this->name($label, $name));
110 110
         $data->setType("image");
111 111
 
112 112
         columnSingleton()->setColumn($this->index, $data);
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
         $data = new TextAreaModel();
122 122
         $data = $this->setDefaultModelValue($data);
123 123
         $data->setLabel($label);
124
-        $data->setName($this->name($label,$name));
125
-        $data->setField($field_to_save?:$this->name($label, $name));
124
+        $data->setName($this->name($label, $name));
125
+        $data->setField($field_to_save ?: $this->name($label, $name));
126 126
         $data->setType("text_area");
127 127
 
128 128
         columnSingleton()->setColumn($this->index, $data);
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
         $data = new SelectModel();
138 138
         $data = $this->setDefaultModelValue($data);
139 139
         $data->setLabel($label);
140
-        $data->setName($this->name($label,$name));
141
-        $data->setField($field_to_save?:$this->name($label, $name));
140
+        $data->setName($this->name($label, $name));
141
+        $data->setField($field_to_save ?: $this->name($label, $name));
142 142
         $data->setType("select");
143 143
 
144 144
         columnSingleton()->setColumn($this->index, $data);
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
         $data = new CustomModel();
155 155
         $data = $this->setDefaultModelValue($data);
156 156
         $data->setLabel($label);
157
-        $data->setName($this->name($label,$name));
158
-        $data->setField($field_to_save?:$this->name($label, $name));
157
+        $data->setName($this->name($label, $name));
158
+        $data->setField($field_to_save ?: $this->name($label, $name));
159 159
         $data->setType("custom");
160 160
 
161 161
         columnSingleton()->setColumn($this->index, $data);
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
         $data = new DateModel();
171 171
         $data = $this->setDefaultModelValue($data);
172 172
         $data->setLabel($label);
173
-        $data->setName($this->name($label,$name));
174
-        $data->setField($field_to_save?:$this->name($label, $name));
173
+        $data->setName($this->name($label, $name));
174
+        $data->setField($field_to_save ?: $this->name($label, $name));
175 175
         $data->setType("date");
176 176
 
177 177
         columnSingleton()->setColumn($this->index, $data);
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
         $data = new DatetimeModel();
187 187
         $data = $this->setDefaultModelValue($data);
188 188
         $data->setLabel($label);
189
-        $data->setName($this->name($label,$name));
190
-        $data->setField($field_to_save?:$this->name($label, $name));
189
+        $data->setName($this->name($label, $name));
190
+        $data->setField($field_to_save ?: $this->name($label, $name));
191 191
         $data->setType("datetime");
192 192
 
193 193
         columnSingleton()->setColumn($this->index, $data);
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
         $data = new EmailModel();
203 203
         $data = $this->setDefaultModelValue($data);
204 204
         $data->setLabel($label);
205
-        $data->setName($this->name($label,$name));
206
-        $data->setField($field_to_save?:$this->name($label, $name));
205
+        $data->setName($this->name($label, $name));
206
+        $data->setField($field_to_save ?: $this->name($label, $name));
207 207
         $data->setType("email");
208 208
 
209 209
         columnSingleton()->setColumn($this->index, $data);
@@ -218,8 +218,8 @@  discard block
 block discarded – undo
218 218
         $data = new FileModel();
219 219
         $data = $this->setDefaultModelValue($data);
220 220
         $data->setLabel($label);
221
-        $data->setName($this->name($label,$name));
222
-        $data->setField($field_to_save?:$this->name($label, $name));
221
+        $data->setName($this->name($label, $name));
222
+        $data->setField($field_to_save ?: $this->name($label, $name));
223 223
         $data->setType("file");
224 224
 
225 225
         columnSingleton()->setColumn($this->index, $data);
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
         $data = new HiddenModel();
236 236
         $data = $this->setDefaultModelValue($data);
237 237
         $data->setLabel($label);
238
-        $data->setName($this->name($label,$name));
239
-        $data->setField($field_to_save?:$this->name($label, $name));
238
+        $data->setName($this->name($label, $name));
239
+        $data->setField($field_to_save ?: $this->name($label, $name));
240 240
         $data->setType("hidden");
241 241
 
242 242
         columnSingleton()->setColumn($this->index, $data);
@@ -251,8 +251,8 @@  discard block
 block discarded – undo
251 251
         $data = new NumberModel();
252 252
         $data = $this->setDefaultModelValue($data);
253 253
         $data->setLabel($label);
254
-        $data->setName($this->name($label,$name));
255
-        $data->setField($field_to_save?:$this->name($label, $name));
254
+        $data->setName($this->name($label, $name));
255
+        $data->setField($field_to_save ?: $this->name($label, $name));
256 256
         $data->setType("number");
257 257
 
258 258
         columnSingleton()->setColumn($this->index, $data);
@@ -267,8 +267,8 @@  discard block
 block discarded – undo
267 267
         $data = new MoneyModel();
268 268
         $data = $this->setDefaultModelValue($data);
269 269
         $data->setLabel($label);
270
-        $data->setName($this->name($label,$name));
271
-        $data->setField($field_to_save?:$this->name($label, $name));
270
+        $data->setName($this->name($label, $name));
271
+        $data->setField($field_to_save ?: $this->name($label, $name));
272 272
         $data->setType("money");
273 273
 
274 274
         columnSingleton()->setColumn($this->index, $data);
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
         $data = new RadioModel();
284 284
         $data = $this->setDefaultModelValue($data);
285 285
         $data->setLabel($label);
286
-        $data->setName($this->name($label,$name));
287
-        $data->setField($field_to_save?:$this->name($label, $name));
286
+        $data->setName($this->name($label, $name));
287
+        $data->setField($field_to_save ?: $this->name($label, $name));
288 288
         $data->setType("radio");
289 289
 
290 290
         columnSingleton()->setColumn($this->index, $data);
@@ -299,8 +299,8 @@  discard block
 block discarded – undo
299 299
         $data = new WysiwygModel();
300 300
         $data = $this->setDefaultModelValue($data);
301 301
         $data->setLabel($label);
302
-        $data->setName($this->name($label,$name));
303
-        $data->setField($field_to_save?:$this->name($label, $name));
302
+        $data->setName($this->name($label, $name));
303
+        $data->setField($field_to_save ?: $this->name($label, $name));
304 304
         $data->setType("wysiwyg");
305 305
 
306 306
         columnSingleton()->setColumn($this->index, $data);
Please login to merge, or discard this patch.
src/types/money/Hook.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@
 block discarded – undo
21 21
      */
22 22
     public function assignment($value, $column)
23 23
     {
24
-        $value = str_replace($column->getThousands()?:",","", $value);
25
-        $value = str_replace($column->getDecimal()?:".",".",$value);
24
+        $value = str_replace($column->getThousands() ?: ",", "", $value);
25
+        $value = str_replace($column->getDecimal() ?: ".", ".", $value);
26 26
         return $value;
27 27
     }
28 28
 
29 29
     public function indexRender($row, $column)
30 30
     {
31 31
         $value = $row->{$column->getField()};
32
-        $prefix = ($column->getPrefix())?:"";
33
-        return $prefix.number_format($value, $column->getPrecision()?:0, $column->getDecimal()?:".", $column->getThousands()?:",");
32
+        $prefix = ($column->getPrefix()) ?: "";
33
+        return $prefix.number_format($value, $column->getPrecision() ?: 0, $column->getDecimal() ?: ".", $column->getThousands() ?: ",");
34 34
     }
35 35
 
36 36
     public function detailRender($row, $column)
Please login to merge, or discard this patch.