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

Apply fixes from StyleCI (#126)

This commit is contained in:
Samuel Štancl 2019-09-11 17:37:02 +02:00 committed by GitHub
parent e43bd21442
commit 1bfe4a7ea5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 59 additions and 59 deletions

View file

@ -2,9 +2,9 @@
declare(strict_types=1); declare(strict_types=1);
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTenantsTable extends Migration class CreateTenantsTable extends Migration
{ {

View file

@ -5,11 +5,11 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Commands; namespace Stancl\Tenancy\Commands;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Stancl\Tenancy\DatabaseManager;
use Illuminate\Database\Migrations\Migrator;
use Stancl\Tenancy\Traits\HasATenantsOption;
use Stancl\Tenancy\Traits\DealsWithMigrations;
use Illuminate\Database\Console\Migrations\MigrateCommand; use Illuminate\Database\Console\Migrations\MigrateCommand;
use Illuminate\Database\Migrations\Migrator;
use Stancl\Tenancy\DatabaseManager;
use Stancl\Tenancy\Traits\DealsWithMigrations;
use Stancl\Tenancy\Traits\HasATenantsOption;
class Migrate extends MigrateCommand class Migrate extends MigrateCommand
{ {

View file

@ -5,11 +5,11 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Commands; namespace Stancl\Tenancy\Commands;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Stancl\Tenancy\DatabaseManager;
use Illuminate\Database\Migrations\Migrator;
use Stancl\Tenancy\Traits\HasATenantsOption;
use Stancl\Tenancy\Traits\DealsWithMigrations;
use Illuminate\Database\Console\Migrations\RollbackCommand; use Illuminate\Database\Console\Migrations\RollbackCommand;
use Illuminate\Database\Migrations\Migrator;
use Stancl\Tenancy\DatabaseManager;
use Stancl\Tenancy\Traits\DealsWithMigrations;
use Stancl\Tenancy\Traits\HasATenantsOption;
class Rollback extends RollbackCommand class Rollback extends RollbackCommand
{ {

View file

@ -4,10 +4,10 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Commands; namespace Stancl\Tenancy\Commands;
use Illuminate\Database\ConnectionResolverInterface;
use Illuminate\Database\Console\Seeds\SeedCommand;
use Stancl\Tenancy\DatabaseManager; use Stancl\Tenancy\DatabaseManager;
use Stancl\Tenancy\Traits\HasATenantsOption; use Stancl\Tenancy\Traits\HasATenantsOption;
use Illuminate\Database\Console\Seeds\SeedCommand;
use Illuminate\Database\ConnectionResolverInterface;
class Seed extends SeedCommand class Seed extends SeedCommand
{ {

View file

@ -4,10 +4,10 @@ declare(strict_types=1);
namespace Stancl\Tenancy; namespace Stancl\Tenancy;
use Stancl\Tenancy\Jobs\QueuedTenantDatabaseCreator;
use Stancl\Tenancy\Jobs\QueuedTenantDatabaseDeleter;
use Illuminate\Database\DatabaseManager as BaseDatabaseManager; use Illuminate\Database\DatabaseManager as BaseDatabaseManager;
use Stancl\Tenancy\Exceptions\DatabaseManagerNotRegisteredException; use Stancl\Tenancy\Exceptions\DatabaseManagerNotRegisteredException;
use Stancl\Tenancy\Jobs\QueuedTenantDatabaseCreator;
use Stancl\Tenancy\Jobs\QueuedTenantDatabaseDeleter;
/** /**
* @final Class is subject to breaking changes in minor and patch versions. * @final Class is subject to breaking changes in minor and patch versions.

View file

@ -4,11 +4,11 @@ declare(strict_types=1);
namespace Stancl\Tenancy; namespace Stancl\Tenancy;
use Illuminate\Foundation\Application;
use Stancl\Tenancy\Jobs\QueuedTenantDatabaseCreator;
use Illuminate\Database\DatabaseManager as BaseDatabaseManager; use Illuminate\Database\DatabaseManager as BaseDatabaseManager;
use Stancl\Tenancy\Exceptions\TenantDatabaseAlreadyExistsException; use Illuminate\Foundation\Application;
use Stancl\Tenancy\Exceptions\DatabaseManagerNotRegisteredException; use Stancl\Tenancy\Exceptions\DatabaseManagerNotRegisteredException;
use Stancl\Tenancy\Exceptions\TenantDatabaseAlreadyExistsException;
use Stancl\Tenancy\Jobs\QueuedTenantDatabaseCreator;
class DatabaseManagerv2 class DatabaseManagerv2
{ {

View file

@ -4,8 +4,8 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Facades; namespace Stancl\Tenancy\Facades;
use Stancl\Tenancy\TenantManager;
use Illuminate\Support\Facades\Facade; use Illuminate\Support\Facades\Facade;
use Stancl\Tenancy\TenantManager;
class Tenancy extends Facade class Tenancy extends Facade
{ {

View file

@ -4,10 +4,10 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Features; namespace Stancl\Tenancy\Features;
use Laravel\Telescope\Telescope;
use Stancl\Tenancy\TenantManager;
use Laravel\Telescope\IncomingEntry; use Laravel\Telescope\IncomingEntry;
use Laravel\Telescope\Telescope;
use Stancl\Tenancy\Contracts\FeatureProvider; use Stancl\Tenancy\Contracts\FeatureProvider;
use Stancl\Tenancy\TenantManager;
class TelescopeTags implements FeatureProvider class TelescopeTags implements FeatureProvider
{ {

View file

@ -2,8 +2,8 @@
declare(strict_types=1); declare(strict_types=1);
use Stancl\Tenancy\TenantManager;
use Stancl\Tenancy\Contracts\FeatureProvider; use Stancl\Tenancy\Contracts\FeatureProvider;
use Stancl\Tenancy\TenantManager;
class TenantRedirect implements FeatureProvider class TenantRedirect implements FeatureProvider
{ {

View file

@ -5,10 +5,10 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Jobs; namespace Stancl\Tenancy\Jobs;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Stancl\Tenancy\Interfaces\TenantDatabaseManager; use Stancl\Tenancy\Interfaces\TenantDatabaseManager;
class QueuedTenantDatabaseCreator implements ShouldQueue class QueuedTenantDatabaseCreator implements ShouldQueue

View file

@ -5,10 +5,10 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Jobs; namespace Stancl\Tenancy\Jobs;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Stancl\Tenancy\Interfaces\TenantDatabaseManager; use Stancl\Tenancy\Interfaces\TenantDatabaseManager;
class QueuedTenantDatabaseDeleter implements ShouldQueue class QueuedTenantDatabaseDeleter implements ShouldQueue

View file

@ -4,9 +4,9 @@ declare(strict_types=1);
namespace Stancl\Tenancy\StorageDrivers; namespace Stancl\Tenancy\StorageDrivers;
use Stancl\Tenancy\TenantModel as Tenant;
use Stancl\Tenancy\Interfaces\StorageDriver;
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException; use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
use Stancl\Tenancy\Interfaces\StorageDriver;
use Stancl\Tenancy\TenantModel as Tenant;
class DatabaseStorageDriver implements StorageDriver class DatabaseStorageDriver implements StorageDriver
{ {

View file

@ -4,11 +4,11 @@ declare(strict_types=1);
namespace Stancl\Tenancy\StorageDrivers; namespace Stancl\Tenancy\StorageDrivers;
use Stancl\Tenancy\Tenant;
use Illuminate\Foundation\Application;
use Stancl\Tenancy\Interfaces\StorageDriver;
use Illuminate\Contracts\Redis\Factory as Redis; use Illuminate\Contracts\Redis\Factory as Redis;
use Illuminate\Foundation\Application;
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException; use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
use Stancl\Tenancy\Interfaces\StorageDriver;
use Stancl\Tenancy\Tenant;
class RedisStorageDriver implements StorageDriver class RedisStorageDriver implements StorageDriver
{ {

View file

@ -4,9 +4,9 @@ declare(strict_types=1);
namespace Stancl\Tenancy\TenancyBoostrappers; namespace Stancl\Tenancy\TenancyBoostrappers;
use Stancl\Tenancy\DatabaseManager;
use Illuminate\Foundation\Application; use Illuminate\Foundation\Application;
use Stancl\Tenancy\Contracts\TenancyBootstrapper; use Stancl\Tenancy\Contracts\TenancyBootstrapper;
use Stancl\Tenancy\DatabaseManager;
class DatabaseTenancyBootstrapper implements TenancyBootstrapper class DatabaseTenancyBootstrapper implements TenancyBootstrapper
{ {

View file

@ -4,14 +4,14 @@ declare(strict_types=1);
namespace Stancl\Tenancy; namespace Stancl\Tenancy;
use Stancl\Tenancy\Commands\Run;
use Stancl\Tenancy\Commands\Seed;
use Illuminate\Cache\CacheManager; use Illuminate\Cache\CacheManager;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;
use Stancl\Tenancy\Commands\Install; use Stancl\Tenancy\Commands\Install;
use Stancl\Tenancy\Commands\Migrate; use Stancl\Tenancy\Commands\Migrate;
use Illuminate\Support\Facades\Route;
use Stancl\Tenancy\Commands\Rollback; use Stancl\Tenancy\Commands\Rollback;
use Illuminate\Support\ServiceProvider; use Stancl\Tenancy\Commands\Run;
use Stancl\Tenancy\Commands\Seed;
use Stancl\Tenancy\Commands\TenantList; use Stancl\Tenancy\Commands\TenantList;
use Stancl\Tenancy\Interfaces\StorageDriver; use Stancl\Tenancy\Interfaces\StorageDriver;

View file

@ -4,12 +4,12 @@ declare(strict_types=1);
namespace Stancl\Tenancy; namespace Stancl\Tenancy;
use Stancl\Tenancy\Interfaces\StorageDriver;
use Stancl\Tenancy\Traits\BootstrapsTenancy;
use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Foundation\Application;
use Stancl\Tenancy\Interfaces\UniqueIdentifierGenerator;
use Stancl\Tenancy\Exceptions\CannotChangeUuidOrDomainException; use Stancl\Tenancy\Exceptions\CannotChangeUuidOrDomainException;
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException; use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
use Stancl\Tenancy\Interfaces\StorageDriver;
use Stancl\Tenancy\Interfaces\UniqueIdentifierGenerator;
use Stancl\Tenancy\Traits\BootstrapsTenancy;
/** /**
* @final Class is subject to breaking changes in minor and patch versions. * @final Class is subject to breaking changes in minor and patch versions.

View file

@ -4,10 +4,10 @@ declare(strict_types=1);
namespace Stancl\Tenancy; namespace Stancl\Tenancy;
use Illuminate\Foundation\Application;
use Illuminate\Contracts\Console\Kernel as ConsoleKernel; use Illuminate\Contracts\Console\Kernel as ConsoleKernel;
use Stancl\Tenancy\Exceptions\NoTenantIdentifiedException; use Illuminate\Foundation\Application;
use Stancl\Tenancy\Contracts\TenantCannotBeCreatedException; use Stancl\Tenancy\Contracts\TenantCannotBeCreatedException;
use Stancl\Tenancy\Exceptions\NoTenantIdentifiedException;
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException; use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
/** /**

View file

@ -4,8 +4,8 @@ declare(strict_types=1);
namespace Stancl\Tenancy; namespace Stancl\Tenancy;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider; use Illuminate\Foundation\Support\Providers\RouteServiceProvider;
use Illuminate\Support\Facades\Route;
class TenantRouteServiceProvider extends RouteServiceProvider class TenantRouteServiceProvider extends RouteServiceProvider
{ {

View file

@ -4,9 +4,9 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Traits; namespace Stancl\Tenancy\Traits;
use Stancl\Tenancy\CacheManager;
use Illuminate\Support\Facades\Redis; use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Stancl\Tenancy\CacheManager;
use Stancl\Tenancy\Exceptions\PhpRedisNotInstalledException; use Stancl\Tenancy\Exceptions\PhpRedisNotInstalledException;
trait BootstrapsTenancy trait BootstrapsTenancy

View file

@ -4,8 +4,8 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests; namespace Stancl\Tenancy\Tests;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Redis;
class BootstrapsTenancyTest extends TestCase class BootstrapsTenancyTest extends TestCase
{ {

View file

@ -4,9 +4,9 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests; namespace Stancl\Tenancy\Tests;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Artisan;
use Stancl\Tenancy\Tests\Etc\ExampleSeeder; use Stancl\Tenancy\Tests\Etc\ExampleSeeder;
class CommandsTest extends TestCase class CommandsTest extends TestCase

View file

@ -4,11 +4,11 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests; namespace Stancl\Tenancy\Tests;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis; use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
class DataSeparationTest extends TestCase class DataSeparationTest extends TestCase
{ {

View file

@ -2,9 +2,9 @@
declare(strict_types=1); declare(strict_types=1);
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddCustomColumn extends Migration class AddCustomColumn extends Migration
{ {

View file

@ -4,9 +4,9 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests\Etc; namespace Stancl\Tenancy\Tests\Etc;
use Illuminate\Support\Str;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class ExampleSeeder extends Seeder class ExampleSeeder extends Seeder
{ {

View file

@ -4,8 +4,8 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests; namespace Stancl\Tenancy\Tests;
use Tenant;
use Tenancy; use Tenancy;
use Tenant;
class FacadeTest extends TestCase class FacadeTest extends TestCase
{ {

View file

@ -5,12 +5,12 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests; namespace Stancl\Tenancy\Tests;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Support\Facades\Event;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\Events\JobProcessing;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\Events\JobProcessing;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Event;
class QueueTest extends TestCase class QueueTest extends TestCase
{ {

View file

@ -5,8 +5,8 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests; namespace Stancl\Tenancy\Tests;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Stancl\Tenancy\DatabaseManager;
use Illuminate\Support\Facades\Queue; use Illuminate\Support\Facades\Queue;
use Stancl\Tenancy\DatabaseManager;
use Stancl\Tenancy\Jobs\QueuedTenantDatabaseCreator; use Stancl\Tenancy\Jobs\QueuedTenantDatabaseCreator;
use Stancl\Tenancy\Jobs\QueuedTenantDatabaseDeleter; use Stancl\Tenancy\Jobs\QueuedTenantDatabaseDeleter;

View file

@ -4,8 +4,8 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests; namespace Stancl\Tenancy\Tests;
use Tenant;
use Tenancy; use Tenancy;
use Tenant;
class TenantManagerEventsTest extends TestCase class TenantManagerEventsTest extends TestCase
{ {

View file

@ -4,9 +4,9 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests; namespace Stancl\Tenancy\Tests;
use Stancl\Tenancy\Tenant;
use Stancl\Tenancy\StorageDrivers\RedisStorageDriver;
use Stancl\Tenancy\StorageDrivers\DatabaseStorageDriver; use Stancl\Tenancy\StorageDrivers\DatabaseStorageDriver;
use Stancl\Tenancy\StorageDrivers\RedisStorageDriver;
use Stancl\Tenancy\Tenant;
class TenantStorageTest extends TestCase class TenantStorageTest extends TestCase
{ {

View file

@ -5,8 +5,8 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests; namespace Stancl\Tenancy\Tests;
use Illuminate\Support\Facades\Redis; use Illuminate\Support\Facades\Redis;
use Stancl\Tenancy\StorageDrivers\RedisStorageDriver;
use Stancl\Tenancy\StorageDrivers\DatabaseStorageDriver; use Stancl\Tenancy\StorageDrivers\DatabaseStorageDriver;
use Stancl\Tenancy\StorageDrivers\RedisStorageDriver;
abstract class TestCase extends \Orchestra\Testbench\TestCase abstract class TestCase extends \Orchestra\Testbench\TestCase
{ {