Passed
Push — master ( cf97ac...a3358f )
by Iman
03:32
created
src/routes.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 $namespace = '\crocodicstudio\crudbooster\controllers';
6 6
 /* ROUTER FOR UPLOADS */
7
-Route::group(['middleware' => ['web'], 'namespace' => $namespace], function () {
7
+Route::group(['middleware' => ['web'], 'namespace' => $namespace], function() {
8 8
     Route::get('uploads/{one?}/{two?}/{three?}/{four?}/{five?}', ['uses' => 'FileController@getPreview', 'as' => 'fileControllerPreview']);
9 9
 });
10 10
 
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     'middleware' => ['web', CBBackend::class],
14 14
     'prefix' => cbAdminPath(),
15 15
     'namespace' => ctrlNamespace(),
16
-], function () {
16
+], function() {
17 17
     CRUDBooster::routeController('users', 'AdminUsersController');
18 18
     try {
19 19
         $modules = DB::table('cms_moduls')->where('path', '!=', '')->where('controller', '!=', '')->where('is_protected', 0)->get();
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
     'middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBSuperadmin::class],
30 30
     'prefix' => cbAdminPath(),
31 31
     'namespace' => $namespace,
32
-], function () {
33
-    Route::post('{module}/do-upload-import-data', ['uses' => 'FileController@uploadImportData', 'as' => 'UploadImportData',]);
34
-    Route::post('{module}/upload-summernote', ['uses' => 'FileController@uploadSummernote', 'as' => 'UploadImportData',]);
35
-    Route::post('{module}/upload-file', ['uses' => 'FileController@uploadFile', 'as' => 'UploadImportData',]);
36
-    Route::post('{module}/done-import', ['uses' => 'FileController@doneImport', 'as' => 'doneImportData',]);
32
+], function() {
33
+    Route::post('{module}/do-upload-import-data', ['uses' => 'FileController@uploadImportData', 'as' => 'UploadImportData', ]);
34
+    Route::post('{module}/upload-summernote', ['uses' => 'FileController@uploadSummernote', 'as' => 'UploadImportData', ]);
35
+    Route::post('{module}/upload-file', ['uses' => 'FileController@uploadFile', 'as' => 'UploadImportData', ]);
36
+    Route::post('{module}/done-import', ['uses' => 'FileController@doneImport', 'as' => 'doneImportData', ]);
37 37
 });
38 38
 
Please login to merge, or discard this patch.
src/Modules/AuthModule/AuthController.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
     public function getLockscreen()
32 32
     {
33
-        if (! CRUDBooster::myId()) {
33
+        if (!CRUDBooster::myId()) {
34 34
             Session::flush();
35 35
             return redirect()->route('getLogin')->with('message', cbTrans('alert_session_expired'));
36 36
         }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
     private function validateForgotPass()
98 98
     {
99
-        $validator = Validator::make(request()->all(), ['email' => 'required|email|exists:cms_users',]);
99
+        $validator = Validator::make(request()->all(), ['email' => 'required|email|exists:cms_users', ]);
100 100
 
101 101
         if ($validator->fails()) {
102 102
             $message = $validator->errors()->all();
Please login to merge, or discard this patch.
src/Modules/AuthModule/LoginController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     private function validatePassword($password, $users)
71 71
     {
72
-        if (! \Hash::check($password, $users->password)) {
72
+        if (!\Hash::check($password, $users->password)) {
73 73
             $resp = redirect()->route('getLogin')->with('message', cbTrans('alert_password_wrong'));
74 74
             sendAndTerminate($resp);
75 75
         }
Please login to merge, or discard this patch.
src/controllers/CBController/CbFormLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
 
84 84
     private function checkHideForm()
85 85
     {
86
-        if (! count($this->hide_form)) {
86
+        if (!count($this->hide_form)) {
87 87
             return null;
88 88
         }
89 89
         foreach ($this->form as $i => $f) {
Please login to merge, or discard this patch.
src/CBCoreModule/Index/Order.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     function handle($result, $table)
25 25
     {
26 26
         $orderby = $this->ctrl->orderby;
27
-        if (! $orderby) {
27
+        if (!$orderby) {
28 28
             $result->orderby($table.'.'.$this->ctrl->primaryKey, 'desc');
29 29
             return;
30 30
         }
Please login to merge, or discard this patch.
src/controllers/CBController/Deleter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
         $this->cbLoader();
24 24
         $selectedIds = request('checkbox');
25 25
         $btnName = request('button_name');
26
-        if (! $selectedIds) {
26
+        if (!$selectedIds) {
27 27
             CRUDBooster::redirect($_SERVER['HTTP_REFERER'], 'Please select at least one row!', 'warning');
28 28
         }
29 29
         if ($btnName == 'delete') {
30 30
             (new DataRemover($this))->doDeleteWithHook($selectedIds);
31
-            $this->insertLog('log_delete', implode(',', $selectedIds) . ' - '. $this->table);
31
+            $this->insertLog('log_delete', implode(',', $selectedIds).' - '.$this->table);
32 32
             backWithMsg(cbTrans('alert_delete_selected_success'));
33 33
         }
34 34
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
         $message = cbTrans('alert_action', ['action' => $action]);
48 48
 
49 49
         if ($this->actionButtonSelected($id_selected, $button_name) === false) {
50
-            $message = ! empty($this->alert['message']) ? $this->alert['message'] : 'Error';
51
-            $type = ! empty($this->alert['type']) ? $this->alert['type'] : 'danger';
50
+            $message = !empty($this->alert['message']) ? $this->alert['message'] : 'Error';
51
+            $type = !empty($this->alert['type']) ? $this->alert['type'] : 'danger';
52 52
         }
53 53
 
54 54
         backWithMsg($message, $type);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
         $this->findRow($id)->update([$column => null]);
69 69
 
70
-        $this->insertLog('log_delete_image', $id . ' - '. $this->table);
70
+        $this->insertLog('log_delete_image', $id.' - '.$this->table);
71 71
 
72 72
         CRUDBooster::redirect(Request::server('HTTP_REFERER'), cbTrans('alert_delete_data_success'), 'success');
73 73
     }
Please login to merge, or discard this patch.
src/controllers/CBController/ImportData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
19 19
         $data['page_menu'] = Route::getCurrentRoute()->getActionName();
20 20
         $data['page_title'] = 'Import Data '.CRUDBooster::getCurrentModule()->name;
21 21
 
22
-        if (! request('file') || request('import')) {
22
+        if (!request('file') || request('import')) {
23 23
             return $this->cbView('crudbooster::import', $data);
24 24
         }
25 25
 
26 26
         $file = 'storage'.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.base64_decode(request('file'));
27
-        $rows = Excel::load($file, function ($reader) {
27
+        $rows = Excel::load($file, function($reader) {
28 28
         })->get();
29 29
 
30 30
         session()->put('total_data_import', count($rows));
Please login to merge, or discard this patch.
src/controllers/FormValidator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
         $validator = Validator::make(request()->all(), $rules);
21 21
 
22
-        if (! $validator->fails()) {
22
+        if (!$validator->fails()) {
23 23
             return null;
24 24
         }
25 25
 
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
         $rules = [];
38 38
         foreach ($form as $formInput) {
39 39
             $name = $formInput['name'];
40
-            if (! $name) {
40
+            if (!$name) {
41 41
                 continue;
42 42
             }
43 43
 
44 44
             $ai = [];
45
-            if ($formInput['required'] && ! Request::hasFile($name)) {
45
+            if ($formInput['required'] && !Request::hasFile($name)) {
46 46
                 $ai[] = 'required';
47 47
             }
48 48
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     {
72 72
         $exp = explode('|', $formInput['validation']);
73 73
 
74
-        $uniqueRules = array_filter($exp, function($item){
74
+        $uniqueRules = array_filter($exp, function($item) {
75 75
             return starts_with($item, 'unique');
76 76
         });
77 77
 
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/ScaffoldingParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
                 continue;
120 120
             }
121 121
 
122
-            $s = str_replace("'", '',$s);
122
+            $s = str_replace("'", '', $s);
123 123
             list($key, $val) = explode('=>', $s);
124 124
             $colInnerItem[$key] = $val;
125 125
 
Please login to merge, or discard this patch.