diff --git a/src/Bootstrappers/FilesystemTenancyBootstrapper.php b/src/Bootstrappers/FilesystemTenancyBootstrapper.php index aeef10e1..d90d36d0 100644 --- a/src/Bootstrappers/FilesystemTenancyBootstrapper.php +++ b/src/Bootstrappers/FilesystemTenancyBootstrapper.php @@ -6,7 +6,6 @@ namespace Stancl\Tenancy\Bootstrappers; use Illuminate\Contracts\Foundation\Application; use Illuminate\Support\Facades\Storage; -use League\Flysystem\Adapter\Local as LocalAdapter; use Stancl\Tenancy\Contracts\TenancyBootstrapper; use Stancl\Tenancy\Contracts\Tenant; diff --git a/src/Commands/Link.php b/src/Commands/Link.php index 3aae0a90..90169d16 100644 --- a/src/Commands/Link.php +++ b/src/Commands/Link.php @@ -88,11 +88,12 @@ class Link extends Command $tenants = $this->option('remove') && filled($this->option('tenants')) ? collect($this->option('tenants')) - : $this->getTenants()->map(function(Tenant $tenant) { return $tenant->getTenantKey(); }); + : $this->getTenants()->map(function (Tenant $tenant) { + return $tenant->getTenantKey(); + }); return $tenants ->map(function ($tenant_key) use ($suffix_base, $disk_urls, $disks) { - $map = []; foreach ($disk_urls as $disk => $public_path) { @@ -111,18 +112,15 @@ class Link extends Command } return $map; - })->flatten(1) - ->mapWithKeys(function ($item) {return $item; }) + ->mapWithKeys(function ($item) { + return $item; + }) ->all(); } /** * Determine if the provided path is a symlink that can be removed. - * - * @param string $link - * @param bool $force - * @return bool */ protected function isRemovableSymlink(string $link, bool $force): bool { diff --git a/src/Events/RemovingStorageSymlink.php b/src/Events/RemovingStorageSymlink.php index 3afc30b6..24f60e0e 100644 --- a/src/Events/RemovingStorageSymlink.php +++ b/src/Events/RemovingStorageSymlink.php @@ -6,4 +6,4 @@ namespace Stancl\Tenancy\Events; class RemovingStorageSymlink extends Contracts\TenantEvent { -} \ No newline at end of file +} diff --git a/src/Events/StorageSymlinkRemoved.php b/src/Events/StorageSymlinkRemoved.php index 4174e329..9bf067cd 100644 --- a/src/Events/StorageSymlinkRemoved.php +++ b/src/Events/StorageSymlinkRemoved.php @@ -6,4 +6,4 @@ namespace Stancl\Tenancy\Events; class StorageSymlinkRemoved extends Contracts\TenantEvent { -} \ No newline at end of file +} diff --git a/src/Jobs/CreateStorageSymlinks.php b/src/Jobs/CreateStorageSymlinks.php index 4c5fe0c7..490e7b2d 100644 --- a/src/Jobs/CreateStorageSymlinks.php +++ b/src/Jobs/CreateStorageSymlinks.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace Stancl\Tenancy\Jobs; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; @@ -19,9 +18,6 @@ class CreateStorageSymlinks implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - /** - * @var \Stancl\Tenancy\Contracts\Tenant - */ public Tenant $tenant; /** diff --git a/src/Jobs/RemoveStorageSymlinks.php b/src/Jobs/RemoveStorageSymlinks.php index 3c22f463..c6ba71b4 100644 --- a/src/Jobs/RemoveStorageSymlinks.php +++ b/src/Jobs/RemoveStorageSymlinks.php @@ -5,25 +5,19 @@ declare(strict_types=1); namespace Stancl\Tenancy\Jobs; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Artisan; use Stancl\Tenancy\Contracts\Tenant; -use Stancl\Tenancy\Events\CreatingStorageSymlink; use Stancl\Tenancy\Events\RemovingStorageSymlink; -use Stancl\Tenancy\Events\StorageSymlinkCreated; use Stancl\Tenancy\Events\StorageSymlinkRemoved; class RemoveStorageSymlinks implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - /** - * @var \Stancl\Tenancy\Contracts\Tenant - */ public Tenant $tenant; /**