Passed
Branch master (2dec25)
by Philippe
05:14
created
Category
src/AssetLibraryServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         // use this if your package has routes
32 32
         $this->setupRoutes($this->app->router);
33 33
 
34
-        if (! class_exists('CreateAssetTable')) {
34
+        if (!class_exists('CreateAssetTable')) {
35 35
             $this->publishes([
36 36
                 __DIR__.'/../database/migrations/create_asset_table.php' => database_path('migrations/'.date('Y_m_d_His',
37 37
                         time()).'_create_asset_table.php'),
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function setupRoutes(Router $router)
63 63
     {
64
-        $router->group(['namespace' => 'Thinktomorrow\AssetLibrary\Http\Controllers'], function ($router) {
64
+        $router->group(['namespace' => 'Thinktomorrow\AssetLibrary\Http\Controllers'], function($router) {
65 65
             require __DIR__.'/Http/routes.php';
66 66
         });
67 67
     }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     private function registerAssetLibrary()
94 94
     {
95
-        $this->app->singleton('asset', function ($app) {
95
+        $this->app->singleton('asset', function($app) {
96 96
             return new Asset($app);
97 97
         });
98 98
     }
Please login to merge, or discard this patch.
src/Traits/AssetTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             return;
32 32
         }
33 33
 
34
-        if (! $locale) {
34
+        if (!$locale) {
35 35
             $locale = Locale::getDefault();
36 36
         }
37 37
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function getAllImages()
73 73
     {
74
-        $images = $this->assets->filter(function ($asset) {
74
+        $images = $this->assets->filter(function($asset) {
75 75
             return $asset->getExtensionForFilter() == 'image';
76 76
         });
77 77
 
Please login to merge, or discard this patch.
src/Models/Asset.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         if ($files instanceof self) {
30 30
             return $files;
31 31
         } elseif (is_array($files)) {
32
-            collect($files)->each(function ($file) use ($list) {
32
+            collect($files)->each(function($file) use ($list) {
33 33
                 if ($file instanceof Asset) {
34 34
                     $list->push($file);
35 35
                 } else {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function uploadToAsset($files, $keepOriginal = false)
59 59
     {
60
-        if (! ($files instanceof File) && ! ($files instanceof UploadedFile)) {
60
+        if (!($files instanceof File) && !($files instanceof UploadedFile)) {
61 61
             return;
62 62
         }
63 63
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             $customProps['dimensions'] = getimagesize($files)[0].' x '.getimagesize($files)[1];
67 67
         }
68 68
 
69
-        $fileAdd                   = $this->addMedia($files)->withCustomProperties($customProps);
69
+        $fileAdd = $this->addMedia($files)->withCustomProperties($customProps);
70 70
         if ($keepOriginal) {
71 71
             $fileAdd = $fileAdd->preservingOriginal();
72 72
         }
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $asset = $model->assets->where('pivot.type', $type)->where('pivot.locale', $locale);
97 97
 
98
-        if (! $asset->isEmpty() && $asset->first()->pivot->type !== '') {
98
+        if (!$asset->isEmpty() && $asset->first()->pivot->type !== '') {
99 99
             $model->assets()->detach($asset->first()->id);
100 100
         }
101 101
 
102
-        if (! $locale) {
102
+        if (!$locale) {
103 103
             $locale = Locale::getDefault();
104 104
         }
105 105
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         }
128 128
 
129 129
         if (config('assetlibrary.conversionPrefix') && $size != '') {
130
-            $conversionName = $media->first()->name . '_' . $size;
130
+            $conversionName = $media->first()->name.'_'.$size;
131 131
         } else {
132 132
             $conversionName = $size;
133 133
         }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     {
240 240
         $result = '<input type="hidden" value="'.$type.'" name="';
241 241
 
242
-        if (! $locale) {
242
+        if (!$locale) {
243 243
             return $result.$name.'">';
244 244
         }
245 245
 
Please login to merge, or discard this patch.
database/factories/ArticleFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 |
15 15
 */
16 16
 
17
-$factory->define(Article::class, function (Faker $faker) {
17
+$factory->define(Article::class, function(Faker $faker) {
18 18
     return [
19 19
     ];
20 20
 });
Please login to merge, or discard this patch.
database/migrations/create_asset_pivot_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('asset_pivots', function (Blueprint $table) {
16
+        Schema::create('asset_pivots', function(Blueprint $table) {
17 17
             $table->integer('asset_id');
18 18
             $table->integer('entity_id');
19 19
             $table->string('entity_type');
Please login to merge, or discard this patch.
database/migrations/create_asset_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('assets', function (Blueprint $table) {
16
+        Schema::create('assets', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->timestamps();
19 19
         });
Please login to merge, or discard this patch.