Passed
Pull Request — master (#995)
by
unknown
05:01
created
src/Controllers/ItemsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
         $keyword = $request->keyword;
64 64
 
65 65
         if (!empty($keyword)) {
66
-            $items = array_values(array_filter($items, function ($item) use ($keyword) {
67
-                if ($this->like_match("%".$keyword."%", $item['name'])) {
66
+            $items = array_values(array_filter($items, function($item) use ($keyword) {
67
+                if ($this->like_match("%" . $keyword . "%", $item[ 'name' ])) {
68 68
                     return true;
69 69
                 } else {
70 70
                     return false;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         }
74 74
 
75 75
         return [
76
-            'items' => array_map(function ($item) {
76
+            'items' => array_map(function($item) {
77 77
                 return $item->fill()->attributes;
78 78
             }, array_slice($items, ($currentPage - 1) * $perPage, $perPage)),
79 79
             'paginator' => [
@@ -96,19 +96,19 @@  discard block
 block discarded – undo
96 96
     public function move()
97 97
     {
98 98
         $items = request('items');
99
-        $folder_types = array_filter(['user', 'share'], function ($type) {
99
+        $folder_types = array_filter([ 'user', 'share' ], function($type) {
100 100
             return $this->helper->allowFolderType($type);
101 101
         });
102 102
         return view('laravel-filemanager::move')
103 103
             ->with([
104
-                'root_folders' => array_map(function ($type) use ($folder_types) {
104
+                'root_folders' => array_map(function($type) use ($folder_types) {
105 105
                     $path = $this->lfm->dir($this->helper->getRootFolder($type));
106 106
 
107 107
                     return (object) [
108 108
                         'name' => trans('laravel-filemanager::lfm.title-' . $type),
109 109
                         'url' => $path->path('working_dir'),
110 110
                         'children' => $path->folders(),
111
-                        'has_next' => ! ($type == end($folder_types)),
111
+                        'has_next' => !($type == end($folder_types)),
112 112
                     ];
113 113
                 }, $folder_types),
114 114
             ])
Please login to merge, or discard this patch.