Passed
Push — master ( 1baca8...6cf413 )
by Iman
04:24
created
src/Modules/FileManagerModule/AdminFileManagerController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $path = request('path') ? base64_decode(request('path')) : 'uploads';
46 46
         $file = Request::file('userfile');
47
-        if (! $file) {
47
+        if (!$file) {
48 48
             return null;
49 49
         }
50 50
 
51 51
         $fileName = $file->getClientOriginalName();
52 52
 
53
-        if (! FieldDetector::isUploadField($file->getClientOriginalExtension())) {
53
+        if (!FieldDetector::isUploadField($file->getClientOriginalExtension())) {
54 54
             backWithMsg('The file '.$fileName.' type is not allowed!', 'warning');
55 55
         }
56 56
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public function getDeleteFile($file)
71 71
     {
72 72
         $file = base64_decode($file);
73
-        if(Storage::delete($file))
73
+        if (Storage::delete($file))
74 74
             backWithMsg('The file has been deleted!');
75 75
 
76 76
         backWithMsg('The file did not deleted!', 'warning');
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,9 @@
 block discarded – undo
70 70
     public function getDeleteFile($file)
71 71
     {
72 72
         $file = base64_decode($file);
73
-        if(Storage::delete($file))
74
-            backWithMsg('The file has been deleted!');
73
+        if(Storage::delete($file)) {
74
+                    backWithMsg('The file has been deleted!');
75
+        }
75 76
 
76 77
         backWithMsg('The file did not deleted!', 'warning');
77 78
     }
Please login to merge, or discard this patch.
src/routes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 
6 6
 $namespace = cbControllersNS();
7 7
 /* ROUTER FOR UPLOADS */
8
-Route::group(['middleware' => ['web'], 'namespace' => $namespace], function () {
8
+Route::group(['middleware' => ['web'], 'namespace' => $namespace], function() {
9 9
     Route::get('uploads/{one?}/{two?}/{three?}/{four?}/{five?}', ['uses' => 'FileController@getPreview', 'as' => 'fileControllerPreview']);
10 10
 });
11 11
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     'middleware' => ['web', CBBackend::class],
15 15
     'prefix' => cbAdminPath(),
16 16
     'namespace' => ctrlNamespace(),
17
-], function () {
17
+], function() {
18 18
     //CbRouter::routeController('users', 'AdminUsersController');
19 19
     try {
20 20
         $modules = DB::table('cms_moduls')->where('path', '!=', '')->where('controller', '!=', '')->where('is_protected', 0)->get();
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     'middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBSuperadmin::class],
32 32
     'prefix' => cbAdminPath(),
33 33
     'namespace' => $namespace,
34
-], function () {
34
+], function() {
35 35
     Route::post('{module}/do-upload-import-data', 'FileController@uploadImportData')->name('UploadImportData');
36 36
     Route::post('{module}/upload-summernote', 'FileController@uploadSummernote')->name('UploadImportData');
37 37
     Route::post('{module}/upload-file', 'FileController@uploadFile')->name('UploadImportData');
Please login to merge, or discard this patch.
src/CBCoreModule/Installer/CbInstaller.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
     public function createVendorAtPublic()
29 29
     {
30 30
         $this->console->info('Checking public/vendor directory...');
31
-        if (! file_exists(public_path('vendor'))) {
31
+        if (!file_exists(public_path('vendor'))) {
32 32
             mkdir(public_path('vendor'), 0777);
33 33
         }
34 34
 
35
-        if (! is_writable(public_path('vendor'))) {
35
+        if (!is_writable(public_path('vendor'))) {
36 36
             $this->console->info('Setup aborted !');
37 37
             $this->console->info('Please set public/vendor directory to writable 0777');
38 38
             exit;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function symlinkForUpload()
43 43
     {
44 44
         $this->console->info('Checking public/uploads symlink...');
45
-        if (! file_exists(public_path('uploads'))) {
45
+        if (!file_exists(public_path('uploads'))) {
46 46
             $this->console->info('Creating public/uploads symlink...');
47 47
             app('files')->link(storage_path('app'), public_path('uploads'));
48 48
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     private function rrmdir($dir)
61 61
     {
62
-        if (! is_dir($dir)) {
62
+        if (!is_dir($dir)) {
63 63
             return;
64 64
         }
65 65
         foreach (scandir($dir) as $object) {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $vendorPath = public_path('vendor'.DIRECTORY_SEPARATOR.'crudbooster');
86 86
         $ds = DIRECTORY_SEPARATOR;
87
-        if (! file_exists($vendorPath)) {
87
+        if (!file_exists($vendorPath)) {
88 88
             $this->console->info('Creating public/vendor/crudbooster symlink...');
89 89
             app('files')->link(base_path('vendor'.$ds.'crocodicstudio'.$ds.'crudbooster'.$ds.'src'.$ds.'assets'), public_path('vendor/crudbooster'));
90 90
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $this->console->info('Migrating database...');
117 117
         $this->console->call('migrate', ['--path' => '\database\migrations\crudbooster']);
118 118
 
119
-        if (! class_exists('CBSeeder')) {
119
+        if (!class_exists('CBSeeder')) {
120 120
             $ds = DIRECTORY_SEPARATOR;
121 121
             base_path('vendor'.$ds.'crocodicstudio'.$ds.'crudbooster'.$ds.'src'.$ds.'database'.$ds.'seeds'.$ds.'CBSeeder.php');
122 122
         }
Please login to merge, or discard this patch.