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

Fix code style (php-cs-fixer)

This commit is contained in:
PHP CS Fixer 2022-07-27 11:45:40 +00:00
parent c0b65a98c0
commit 77100f7f28
6 changed files with 8 additions and 21 deletions

View file

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

View file

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

View file

@ -6,4 +6,4 @@ namespace Stancl\Tenancy\Events;
class RemovingStorageSymlink extends Contracts\TenantEvent
{
}
}

View file

@ -6,4 +6,4 @@ namespace Stancl\Tenancy\Events;
class StorageSymlinkRemoved extends Contracts\TenantEvent
{
}
}

View file

@ -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;
/**

View file

@ -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;
/**