Passed
Pull Request — master (#17)
by ARCANEDEV
03:22
created
src/MediaServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             Providers\RouteServiceProvider::class,
51 51
         ]);
52 52
 
53
-        $this->app->booting(function ($app) {
53
+        $this->app->booting(function($app) {
54 54
             /** @var  \Illuminate\Contracts\Config\Repository  $config */
55 55
             $config = $app['config'];
56 56
 
Please login to merge, or discard this patch.
src/Http/Controllers/MediaApiController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
         $type = $request->get('type');
151 151
         $path = $request->get('path');
152 152
 
153
-        if ($type === MediaItem::TYPE_FILE){
153
+        if ($type === MediaItem::TYPE_FILE) {
154 154
             $this->manager->deleteFile($path);
155 155
         }
156 156
         elseif ($type === MediaItem::TYPE_DIRECTORY) {
Please login to merge, or discard this patch.
src/Http/Requests/RenameMediaRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function rules()
28 28
     {
29
-        $manager  = static::getMediaManager();
29
+        $manager = static::getMediaManager();
30 30
 
31 31
         return [
32 32
             'old_path' => ['required', 'string', new MediaItemExistsRule($manager)],
Please login to merge, or discard this patch.
src/MediaManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $disk        = $this->disk();
94 94
         $directories = $disk->directories($directory, $recursive);
95 95
 
96
-        return MediaCollection::directories(array_map(function ($path) use ($disk) {
96
+        return MediaCollection::directories(array_map(function($path) use ($disk) {
97 97
             return [
98 98
                 'name' => basename($path),
99 99
             ];
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $disk  = $this->disk();
114 114
         $files = $disk->files($directory, $recursive);
115 115
 
116
-        return MediaCollection::files(array_map(function ($path) use ($disk) {
116
+        return MediaCollection::files(array_map(function($path) use ($disk) {
117 117
             return [
118 118
                 'name'         => basename($path),
119 119
                 'path'         => $path,
@@ -135,18 +135,18 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function file(string $path)
137 137
     {
138
-        return $this->files(dirname($path))->first(function (FileItem $file) use ($path) {
138
+        return $this->files(dirname($path))->first(function(FileItem $file) use ($path) {
139 139
             return $file->path === $path;
140
-        }, function () use ($path) {
140
+        }, function() use ($path) {
141 141
             throw new FileNotFoundException("File [$path] not found!");
142 142
         });
143 143
     }
144 144
 
145 145
     public function directory(string $path)
146 146
     {
147
-        return $this->directories(dirname($path))->first(function (DirectoryItem $directory) use ($path) {
147
+        return $this->directories(dirname($path))->first(function(DirectoryItem $directory) use ($path) {
148 148
             return $directory->path === $path;
149
-        }, function () use ($path) {
149
+        }, function() use ($path) {
150 150
             throw new DirectoryNotFoundException("Directory [$path] not found!");
151 151
         });
152 152
     }
Please login to merge, or discard this patch.
src/Http/Routes/MediaRoutes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function map(): void
26 26
     {
27
-        $this->adminGroup(function () {
28
-            $this->prefix('media')->name('media.')->group(function () {
27
+        $this->adminGroup(function() {
28
+            $this->prefix('media')->name('media.')->group(function() {
29 29
                 // admin::media.index
30 30
                 $this->get('/', [MediaController::class, 'index'])
31 31
                      ->name('index');
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     private function mapApiRoutes(): void
42 42
     {
43
-        $this->prefix('api')->name('api.')->middleware(['ajax'])->group(function () {
43
+        $this->prefix('api')->name('api.')->middleware(['ajax'])->group(function() {
44 44
             // admin::media.api.items.index
45 45
             $this->get('items', [MediaApiController::class, 'all'])
46 46
                  ->name('items.index');
Please login to merge, or discard this patch.