Passed
Pull Request — master (#995)
by
unknown
05:03
created
src/Controllers/ItemsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@  discard block
 block discarded – undo
24 24
         $perPage = $this->helper->getPaginationPerPage();
25 25
         $items = array_merge($this->lfm->folders(), $this->lfm->files());
26 26
 
27
-        $items = array_map(function ($item) {
27
+        $items = array_map(function($item) {
28 28
             return $item->fill()->attributes;
29 29
         }, array_slice($items, ($currentPage - 1) * $perPage, $perPage));
30 30
 
31 31
         $c = count($items);
32 32
 
33 33
         if (!empty($keyword)) {
34
-            $items = array_values(array_filter($items, function ($item) use ($keyword) {
35
-                if ($this->like_match("%".$keyword."%", $item['name'])) {
34
+            $items = array_values(array_filter($items, function($item) use ($keyword) {
35
+                if ($this->like_match("%" . $keyword . "%", $item[ 'name' ])) {
36 36
                     return true;
37 37
                 } else {
38 38
                     return false;
@@ -62,19 +62,19 @@  discard block
 block discarded – undo
62 62
     public function move()
63 63
     {
64 64
         $items = request('items');
65
-        $folder_types = array_filter(['user', 'share'], function ($type) {
65
+        $folder_types = array_filter([ 'user', 'share' ], function($type) {
66 66
             return $this->helper->allowFolderType($type);
67 67
         });
68 68
         return view('laravel-filemanager::move')
69 69
             ->with([
70
-                'root_folders' => array_map(function ($type) use ($folder_types) {
70
+                'root_folders' => array_map(function($type) use ($folder_types) {
71 71
                     $path = $this->lfm->dir($this->helper->getRootFolder($type));
72 72
 
73 73
                     return (object) [
74 74
                         'name' => trans('laravel-filemanager::lfm.title-' . $type),
75 75
                         'url' => $path->path('working_dir'),
76 76
                         'children' => $path->folders(),
77
-                        'has_next' => ! ($type == end($folder_types)),
77
+                        'has_next' => !($type == end($folder_types)),
78 78
                     ];
79 79
                 }, $folder_types),
80 80
             ])
Please login to merge, or discard this patch.