Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Nov 27, 2023
1 parent 6cf3ce2 commit 81e270f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/Traits/HasMedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ public function getMediaCollections(): Collection
/**
* @return Collection<string, MediaConversion>
*/
function getMediaConversions(Media $media): Collection
public function getMediaConversions(Media $media): Collection
{
$conversions = collect([]);

return $conversions;
}

Expand Down
7 changes: 0 additions & 7 deletions tests/Feature/HasMediaTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?php

use FFMpeg\Coordinate\Dimension;
use Finller\LaravelMedia\Casts\GeneratedConversion;
use Finller\LaravelMedia\Database\Factories\MediaFactory;
use Finller\LaravelMedia\Enums\MediaType;
use Finller\LaravelMedia\Media;
use Finller\LaravelMedia\Tests\Models\Test;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;

it('retrieve the generated conversion key', function () {
$model = (new Test())->save();
Expand Down
5 changes: 2 additions & 3 deletions tests/Models/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Finller\LaravelMedia\Traits\HasMedia;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;

/**
* @property ?string $uuid
Expand All @@ -32,11 +31,11 @@ public function getMediaCollections(): Collection
'files' => new MediaCollection(
single: false,
public: false,
)
),
]);
}

function getMediaConversions(Media $media): Collection
public function getMediaConversions(Media $media): Collection
{

$conversions = collect();
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected function setUp(): void
parent::setUp();

Factory::guessFactoryNamesUsing(
fn (string $modelName) => 'Finller\\LaravelMedia\\Database\\Factories\\' . class_basename($modelName) . 'Factory'
fn (string $modelName) => 'Finller\\LaravelMedia\\Database\\Factories\\'.class_basename($modelName).'Factory'
);
}

Expand All @@ -29,9 +29,9 @@ public function getEnvironmentSetUp($app)
{
config()->set('database.default', 'testing');

$migration = include __DIR__ . '/../database/migrations/1_create_media_table.php.stub';
$migration = include __DIR__.'/../database/migrations/1_create_media_table.php.stub';
$migration->up();
$migration = include __DIR__ . '/../database/migrations/2_add_columns_to_media_table.php.stub';
$migration = include __DIR__.'/../database/migrations/2_add_columns_to_media_table.php.stub';
$migration->up();

$app['db']->connection()->getSchemaBuilder()->create('tests', function (Blueprint $table) {
Expand Down

0 comments on commit 81e270f

Please sign in to comment.