From 63386a1ef0b9d2b0686353d50436f9a225ebec66 Mon Sep 17 00:00:00 2001 From: PHP CS Fixer Date: Tue, 23 Aug 2022 12:46:00 +0000 Subject: [PATCH] Fix code style (php-cs-fixer) --- src/Commands/Link.php | 4 ++-- src/Concerns/DealsWithTenantSymlinks.php | 4 +++- src/CreateStorageSymlinksAction.php | 10 ++++++---- src/Jobs/RemoveStorageSymlinks.php | 6 +++--- src/RemoveStorageSymlinksAction.php | 7 ++++--- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Commands/Link.php b/src/Commands/Link.php index fabde169..17f2f1a5 100644 --- a/src/Commands/Link.php +++ b/src/Commands/Link.php @@ -63,7 +63,7 @@ class Link extends Command { RemoveStorageSymlinksAction::handle( $tenants, - afterLinkRemoval: fn($publicPath) => $this->info("The [$publicPath] link has been removed.") + afterLinkRemoval: fn ($publicPath) => $this->info("The [$publicPath] link has been removed.") ); $this->info('The links have been removed.'); @@ -79,7 +79,7 @@ class Link extends Command $tenants, $this->option('relative') ?? false, $this->option('force') ?? false, - afterLinkCreation: fn($publicPath, $storagePath) => $this->info("The [$publicPath] link has been connected to [$storagePath].") + afterLinkCreation: fn ($publicPath, $storagePath) => $this->info("The [$publicPath] link has been connected to [$storagePath].") ); $this->info('The links have been created.'); diff --git a/src/Concerns/DealsWithTenantSymlinks.php b/src/Concerns/DealsWithTenantSymlinks.php index b0aa052d..1ed62f85 100644 --- a/src/Concerns/DealsWithTenantSymlinks.php +++ b/src/Concerns/DealsWithTenantSymlinks.php @@ -1,5 +1,7 @@ $storagePath]; } - return collect($symlinks)->mapWithKeys(fn($item) => $item); + return collect($symlinks)->mapWithKeys(fn ($item) => $item); } /** diff --git a/src/CreateStorageSymlinksAction.php b/src/CreateStorageSymlinksAction.php index 508f8993..351a88b9 100644 --- a/src/CreateStorageSymlinksAction.php +++ b/src/CreateStorageSymlinksAction.php @@ -1,13 +1,15 @@ $storagePath) { + foreach (static::possibleTenantSymlinks($tenant) as $publicPath => $storagePath) { static::createLink($publicPath, $storagePath, $tenant, $relativeLink, $force, $afterLinkCreation); } } diff --git a/src/Jobs/RemoveStorageSymlinks.php b/src/Jobs/RemoveStorageSymlinks.php index 9d2c700e..79ff8335 100644 --- a/src/Jobs/RemoveStorageSymlinks.php +++ b/src/Jobs/RemoveStorageSymlinks.php @@ -5,11 +5,11 @@ declare(strict_types=1); namespace Stancl\Tenancy\Jobs; use Illuminate\Bus\Queueable; -use Stancl\Tenancy\Contracts\Tenant; -use Illuminate\Queue\SerializesModels; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\SerializesModels; +use Stancl\Tenancy\Contracts\Tenant; use Stancl\Tenancy\RemoveStorageSymlinksAction; class RemoveStorageSymlinks implements ShouldQueue diff --git a/src/RemoveStorageSymlinksAction.php b/src/RemoveStorageSymlinksAction.php index f01437c3..e7a9908e 100644 --- a/src/RemoveStorageSymlinksAction.php +++ b/src/RemoveStorageSymlinksAction.php @@ -1,13 +1,14 @@ $storagePath) { + foreach (static::possibleTenantSymlinks($tenant) as $publicPath => $storagePath) { static::removeLink($publicPath, $tenant, $afterLinkRemoval); } }