Passed
Push — master ( 7bc9b1...7f0797 )
by Stream
03:37
created
src/Lfm.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $path_parts = pathinfo($path);
62 62
         }
63 63
 
64
-        return substr($path_parts[$part_name], 1);
64
+        return substr($path_parts[ $part_name ], 1);
65 65
     }
66 66
 
67 67
     public function allowFolderType($type)
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $lfm_type = 'file';
91 91
 
92 92
         $request_type = lcfirst(Str::singular($this->input('type') ?: ''));
93
-        $available_types = array_keys($this->config->get('lfm.folder_categories') ?: []);
93
+        $available_types = array_keys($this->config->get('lfm.folder_categories') ?: [ ]);
94 94
 
95 95
         if (in_array($request_type, $available_types)) {
96 96
             $lfm_type = $request_type;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $view_type = 'grid';
108 108
         $target_display_type = $this->input('show_list') ?: $startup_view;
109 109
 
110
-        if (in_array($target_display_type, ['list', 'grid'])) {
110
+        if (in_array($target_display_type, [ 'list', 'grid' ])) {
111 111
             $view_type = $target_display_type;
112 112
         }
113 113
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function allowShareFolder()
193 193
     {
194
-        if (! $this->allowMultiUser()) {
194
+        if (!$this->allowMultiUser()) {
195 195
             return true;
196 196
         }
197 197
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      * @param  mixed  $variables   Variables the message needs.
246 246
      * @return string
247 247
      */
248
-    public function error($error_type, $variables = [])
248
+    public function error($error_type, $variables = [ ])
249 249
     {
250 250
         throw new \Exception(trans(self::PACKAGE_NAME . '::lfm.error-' . $error_type, $variables));
251 251
     }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         $as = 'unisharp.lfm.';
262 262
         $namespace = '\\UniSharp\\LaravelFilemanager\\Controllers\\';
263 263
 
264
-        Route::group(compact('middleware', 'as', 'namespace'), function () {
264
+        Route::group(compact('middleware', 'as', 'namespace'), function() {
265 265
 
266 266
             // display main layout
267 267
             Route::get('/', [
Please login to merge, or discard this patch.
src/Controllers/UploadController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     public function __construct()
15 15
     {
16 16
         parent::__construct();
17
-        $this->errors = [];
17
+        $this->errors = [ ];
18 18
     }
19 19
 
20 20
     /**
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
     public function upload()
27 27
     {
28 28
         $uploaded_files = request()->file('upload');
29
-        $error_bag = [];
29
+        $error_bag = [ ];
30 30
         $new_filename = null;
31 31
 
32
-        foreach (is_array($uploaded_files) ? $uploaded_files : [$uploaded_files] as $file) {
32
+        foreach (is_array($uploaded_files) ? $uploaded_files : [ $uploaded_files ] as $file) {
33 33
             try {
34 34
                 $new_filename = $this->lfm->upload($file);
35 35
             } catch (\Exception $e) {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         } else { // upload via ckeditor5 expects json responses
48 48
             if (is_null($new_filename)) {
49 49
                 $response = [
50
-                    'error' => [ 'message' =>  $error_bag[0] ]
50
+                    'error' => [ 'message' =>  $error_bag[ 0 ] ]
51 51
                 ];
52 52
             } else {
53 53
                 $url = $this->lfm->setName($new_filename)->url();
Please login to merge, or discard this patch.