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