Test Failed
Push — dependabot/composer/mockery/mo... ( 0704a5...3ff5ae )
by
unknown
38:34 queued 17:51
created
src/Mediagallery/Application/ZipAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     public function handle(string $filename, Request $request)
19 19
     {
20
-        $assets = Asset::whereIn('id', (array) $request->input('asset_ids', []))->get();
20
+        $assets = Asset::whereIn('id', (array)$request->input('asset_ids', []))->get();
21 21
 
22 22
         // enable output of HTTP headers TODO: this should be moved to the controller instead...
23 23
         $options = new Archive();
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $zip = new ZipStream($filename, $options);
27 27
 
28 28
         $assets->each(function(Asset $asset) use($zip){
29
-            if(file_exists($asset->getFirstMediaPath())) {
29
+            if (file_exists($asset->getFirstMediaPath())) {
30 30
                 $zip->addFileFromPath($asset->filename(), $asset->getFirstMediaPath());
31 31
             }
32 32
         });
Please login to merge, or discard this patch.
src/Mediagallery/Http/MediagalleryController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
         $assets = Asset::with('media')->orderBy('created_at', 'DESC')->select('assets.*');
22 22
 
23 23
         if ($search) {
24
-            $assets->whereHas('media', function (Builder $query) use ($search) {
25
-                $query->where('file_name', 'LIKE', '%' . $search . '%');
24
+            $assets->whereHas('media', function(Builder $query) use ($search) {
25
+                $query->where('file_name', 'LIKE', '%'.$search.'%');
26 26
             });
27 27
         }
28 28
 
29 29
         if ($unused) {
30
-            $assets->whereNotExists(function ($query) {
30
+            $assets->whereNotExists(function($query) {
31 31
                 $query->select(DB::raw(1))
32 32
                     ->from('asset_pivots')
33 33
                     ->whereRaw('asset_pivots.asset_id = assets.id')
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             });
36 36
         }
37 37
 
38
-        if($owner){
38
+        if ($owner) {
39 39
             $owner = FlatReferenceFactory::fromString($owner)->instance();
40 40
             $modelAssets = collect();
41 41
             $modelAssets = $modelAssets->merge($owner->assets());
Please login to merge, or discard this patch.
src/Mediagallery/Http/BulkActionsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function bulk(Request $request)
26 26
     {
27
-        if($request->input('type') == 'download') {
27
+        if ($request->input('type') == 'download') {
28 28
             return $this->download($request);
29 29
         }
30 30
 
31
-        if($request->input('type') == 'remove') {
31
+        if ($request->input('type') == 'remove') {
32 32
             return $this->remove($request);
33 33
         }
34 34
     }
35 35
 
36 36
     private function download(Request $request)
37 37
     {
38
-        $filename = Str::slug(config('app.name')) . '_assets_' . date('YmdHis') . '.zip';
38
+        $filename = Str::slug(config('app.name')).'_assets_'.date('YmdHis').'.zip';
39 39
 
40 40
         // TODO: do the response here instead of the zip action itself
41 41
         return $this->zipAction->handle($filename, $request);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $result = $this->removalAction->handle($request);
47 47
 
48
-        if($result) {
48
+        if ($result) {
49 49
             return redirect()->back()->with('messages.success', 'De mediabestanden zijn verwijderd');
50 50
         }
51 51
 
Please login to merge, or discard this patch.
src/Urls/ChiefResponse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                     $targetModel = Morphables::instance($targetUrlRecord->model_type)->find($targetUrlRecord->model_id);
40 40
 
41 41
                     if (!$targetModel) {
42
-                        throw new ArchivedUrlException('Corrupt target model for this url request. Model by reference [' . $targetUrlRecord->model_type . '@' . $targetUrlRecord->model_id . '] has probably been archived or deleted.');
42
+                        throw new ArchivedUrlException('Corrupt target model for this url request. Model by reference ['.$targetUrlRecord->model_type.'@'.$targetUrlRecord->model_id.'] has probably been archived or deleted.');
43 43
                     }
44 44
 
45 45
                     return static::createRedirect($targetModel->url($locale));
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
             }
50 50
 
51 51
             if (!$model) {
52
-                throw new ArchivedUrlException('Corrupt target model for this url request. Model by reference [' . $urlRecord->model_type . '@' . $urlRecord->model_id . '] has probably been archived or deleted.');
52
+                throw new ArchivedUrlException('Corrupt target model for this url request. Model by reference ['.$urlRecord->model_type.'@'.$urlRecord->model_id.'] has probably been archived or deleted.');
53 53
             }
54 54
 
55 55
             if (method_exists($model, 'isPublished') && !$model->isPublished()) {
56 56
 
57 57
                 /** When admin is logged in and this request is in preview mode, we allow the view */
58 58
                 if (!PreviewMode::fromRequest()->check()) {
59
-                    throw new NotFoundHttpException('Model found for request [' . $slug . '] but it is not published.');
59
+                    throw new NotFoundHttpException('Model found for request ['.$slug.'] but it is not published.');
60 60
                 }
61 61
             }
62 62
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             }
68 68
         }
69 69
 
70
-        throw new NotFoundHttpException('No url or model found for request [' . $slug . '] for locale [' . $locale . '].');
70
+        throw new NotFoundHttpException('No url or model found for request ['.$slug.'] for locale ['.$locale.'].');
71 71
     }
72 72
 
73 73
     private static function createRedirect(string $url)
Please login to merge, or discard this patch.