Passed
Push — master ( e7f23e...f5f59c )
by Ferry
04:24
created
src/types/image/Hook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     public function detailRender($row, $column)
29 29
     {
30 30
         $column->setValue($row->{ $column->getField() });
31
-        return view("types::image.detail",[
31
+        return view("types::image.detail", [
32 32
             'row'=>$row,
33 33
             'column'=>$column
34 34
         ]);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function indexRender($row, $column)
38 38
     {
39 39
         $column->setValue($row->{ $column->getField() });
40
-        return view("types::image.index",[
40
+        return view("types::image.index", [
41 41
             'row'=>$row,
42 42
             'column'=>$column
43 43
         ]);
Please login to merge, or discard this patch.
src/types/file/Hook.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function detailRender($row, $column)
28 28
     {
29 29
         $column->setValue($row->{ $column->getField() });
30
-        return view("types::file.detail",[
30
+        return view("types::file.detail", [
31 31
             'row'=>$row,
32 32
             'column'=>$column
33 33
         ]);
Please login to merge, or discard this patch.
src/types/file/FileController.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 postUploadFile()
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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,21 +14,21 @@
 block discarded – undo
14 14
 {
15 15
     public function postUploadFile()
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_FILE_EXTENSION_ALLOWED'))
23
+                'userfile' => 'required|mimes:'.implode(",", config('crudbooster.UPLOAD_FILE_EXTENSION_ALLOWED'))
24 24
             ]);
25 25
 
26 26
             $file = cb()->uploadFile('userfile', request("encrypt"));
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/file/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-file",'\crocodicstudio\crudbooster\types\file\FileController@postUploadFile');
3
+cb()->routeGroupBackend(function() {
4
+    cb()->routePost("upload-file", '\crocodicstudio\crudbooster\types\file\FileController@postUploadFile');
5 5
 });
6 6
\ No newline at end of file
Please login to merge, or discard this patch.
src/types/radio/component.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
         <?php /** @var \crocodicstudio\crudbooster\types\radio\RadioModel $column */ ?>
3 3
         @foreach($column->getOptions() as $key=>$value)
4 4
             <?php
5
-                $columnValue = old($column->getName())?:($column->getDefaultValue())?:$column->getValue();
5
+                $columnValue = old($column->getName()) ?: ($column->getDefaultValue()) ?: $column->getValue();
6 6
             ?>
7 7
             <div class="{{ $column->getDisabled()?"disabled":"" }}">
8 8
                 <label class='radio-inline'>
Please login to merge, or discard this patch.
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.