Test Failed
Push — master ( cae42c...ab8eb3 )
by Philippe
03:15
created
src/AssetLibraryServiceProvider.php 1 patch
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,11 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace Thinktomorrow\AssetLibrary;
4 4
 
5
+use Illuminate\Database\Eloquent\Factory as EloquentFactory;
5 6
 use Illuminate\Routing\Router;
6
-use Thinktomorrow\Locale\Locale;
7 7
 use Illuminate\Support\ServiceProvider;
8 8
 use Thinktomorrow\AssetLibrary\Models\Asset;
9
-use Illuminate\Database\Eloquent\Factory as EloquentFactory;
10 9
 
11 10
 class AssetLibraryServiceProvider extends ServiceProvider
12 11
 {
Please login to merge, or discard this patch.
src/Models/Asset.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      *
89 89
      * @param Model $model
90 90
      * @param string $type
91
-     * @param null $locale
91
+     * @param null|string $locale
92 92
      * @return Model
93 93
      */
94 94
     public function attachToModel(Model $model, $type = '', $locale = null)
@@ -118,6 +118,9 @@  discard block
 block discarded – undo
118 118
         return basename($this->getFileUrl($size));
119 119
     }
120 120
 
121
+    /**
122
+     * @return string
123
+     */
121 124
     public function getFileUrl($size = '')
122 125
     {
123 126
         $media = $this->getMedia();
Please login to merge, or discard this patch.
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
2 2
 
3 3
 namespace Thinktomorrow\AssetLibrary\Models;
4 4
 
5
+use Illuminate\Database\Eloquent\Model;
5 6
 use Illuminate\Http\File;
6
-use Spatie\MediaLibrary\Media;
7
-use Thinktomorrow\Locale\Locale;
8 7
 use Illuminate\Http\UploadedFile;
9
-use Illuminate\Database\Eloquent\Model;
10 8
 use Spatie\MediaLibrary\HasMedia\HasMediaTrait;
11 9
 use Spatie\MediaLibrary\HasMedia\Interfaces\HasMediaConversions;
10
+use Spatie\MediaLibrary\Media;
11
+use Thinktomorrow\Locale\Locale;
12 12
 
13 13
 class Asset extends Model implements HasMediaConversions
14 14
 {
Please login to merge, or discard this patch.
src/Traits/AssetTrait.php 2 patches
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -25,6 +25,11 @@
 block discarded – undo
25 25
         return basename($this->getFileUrl($type, '', $locale));
26 26
     }
27 27
 
28
+    /**
29
+     * @param string $locale
30
+     *
31
+     * @return string
32
+     */
28 33
     public function getFileUrl($type = '', $size = '', $locale = null)
29 34
     {
30 35
         if ($this->assets->first() === null || $this->assets->first()->pivot === null) {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Thinktomorrow\AssetLibrary\Traits;
4 4
 
5
-use Thinktomorrow\Locale\Locale;
6 5
 use Illuminate\Support\Collection;
7 6
 use Thinktomorrow\AssetLibrary\Models\Asset;
7
+use Thinktomorrow\Locale\Locale;
8 8
 
9 9
 trait AssetTrait
10 10
 {
Please login to merge, or discard this patch.