Passed
Push — master ( 66dd56...e66595 )
by Ferry
03:49
created
src/types/wysiwyg/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/checkbox/Hook.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function assignment($value, $column)
22 22
     {
23
-        return @implode(";", request( $column->getName() ));
23
+        return @implode(";", request($column->getName()));
24 24
     }
25 25
 
26 26
 }
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
src/types/image/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("upload-image",'\crocodicstudio\crudbooster\types\image\ImageController@postUploadImage');
3
+cb()->routeGroupBackend(function() {
4
+    cb()->routePost("upload-image", '\crocodicstudio\crudbooster\types\image\ImageController@postUploadImage');
5 5
 });
6 6
\ No newline at end of file
Please login to merge, or discard this patch.
src/types/image/ImageController.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,9 @@
 block discarded – undo
14 14
 {
15 15
     public function postUploadImage()
16 16
     {
17
-        if(auth()->guest()) return redirect(cb()->getLoginUrl());
17
+        if(auth()->guest()) {
18
+            return redirect(cb()->getLoginUrl());
19
+        }
18 20
 
19 21
         $file = null;
20 22
         try {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,21 +14,21 @@
 block discarded – undo
14 14
 {
15 15
     public function postUploadImage()
16 16
     {
17
-        if(auth()->guest()) return redirect(cb()->getLoginUrl());
17
+        if (auth()->guest()) return redirect(cb()->getLoginUrl());
18 18
 
19 19
         $file = null;
20 20
         try {
21 21
 
22 22
             cb()->validation([
23
-                'userfile' => 'required|mimes:' . implode(",",config('crudbooster.UPLOAD_IMAGE_EXTENSION_ALLOWED'))
23
+                'userfile' => 'required|mimes:'.implode(",", config('crudbooster.UPLOAD_IMAGE_EXTENSION_ALLOWED'))
24 24
             ]);
25 25
 
26
-            $file = cb()->uploadFile('userfile', request("encrypt")?true:false, request("resize_width"), request("resize_height"));
26
+            $file = cb()->uploadFile('userfile', request("encrypt") ?true:false, request("resize_width"), request("resize_height"));
27 27
 
28 28
         } catch (CBValidationException $e) {
29
-            return response()->json(['status'=>false,'message'=>$e->getMessage()]);
29
+            return response()->json(['status'=>false, 'message'=>$e->getMessage()]);
30 30
         } catch (\Exception $e) {
31
-            return response()->json(['status'=>false,'message'=>$e->getMessage()]);
31
+            return response()->json(['status'=>false, 'message'=>$e->getMessage()]);
32 32
         }
33 33
 
34 34
         return response()->json([
Please login to merge, or discard this patch.
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.