1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 14:34:04 +00:00

Fix code style (php-cs-fixer)

This commit is contained in:
PHP CS Fixer 2022-08-23 12:46:00 +00:00
parent 2594b1960f
commit 63386a1ef0
5 changed files with 18 additions and 13 deletions

View file

@ -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.');

View file

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Concerns;
use Illuminate\Support\Collection;
@ -30,7 +32,7 @@ trait DealsWithTenantSymlinks
$symlinks[] = [$publicPath => $storagePath];
}
return collect($symlinks)->mapWithKeys(fn($item) => $item);
return collect($symlinks)->mapWithKeys(fn ($item) => $item);
}
/**

View file

@ -1,13 +1,15 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy;
use Closure;
use Exception;
use Stancl\Tenancy\Database\Models\Tenant;
use Stancl\Tenancy\Events\StorageSymlinkCreated;
use Stancl\Tenancy\Events\CreatingStorageSymlink;
use Stancl\Tenancy\Concerns\DealsWithTenantSymlinks;
use Stancl\Tenancy\Database\Models\Tenant;
use Stancl\Tenancy\Events\CreatingStorageSymlink;
use Stancl\Tenancy\Events\StorageSymlinkCreated;
class CreateStorageSymlinksAction
{
@ -19,7 +21,7 @@ class CreateStorageSymlinksAction
/** @var Tenant $tenant */
foreach ($tenants as $tenant) {
foreach(static::possibleTenantSymlinks($tenant) as $publicPath => $storagePath) {
foreach (static::possibleTenantSymlinks($tenant) as $publicPath => $storagePath) {
static::createLink($publicPath, $storagePath, $tenant, $relativeLink, $force, $afterLinkCreation);
}
}

View file

@ -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

View file

@ -1,13 +1,14 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy;
use Closure;
use Illuminate\Support\Collection;
use Stancl\Tenancy\Concerns\DealsWithTenantSymlinks;
use Stancl\Tenancy\Database\Models\Tenant;
use Stancl\Tenancy\Events\StorageSymlinkRemoved;
use Stancl\Tenancy\Events\RemovingStorageSymlink;
use Stancl\Tenancy\Events\StorageSymlinkRemoved;
class RemoveStorageSymlinksAction
{
@ -19,7 +20,7 @@ class RemoveStorageSymlinksAction
/** @var Tenant $tenant */
foreach ($tenants as $tenant) {
foreach(static::possibleTenantSymlinks($tenant) as $publicPath => $storagePath) {
foreach (static::possibleTenantSymlinks($tenant) as $publicPath => $storagePath) {
static::removeLink($publicPath, $tenant, $afterLinkRemoval);
}
}