From 2fd3662eb72e3d0225f43d63181172b4c2758d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 23 Aug 2019 18:18:26 +0200 Subject: [PATCH] [1.8.0] Use strict types (#115) * Use strict types * Apply fixes from StyleCI * Fix str_repeat * Fix false json decode --- .styleci.yml | 1 + assets/config.php | 2 ++ .../migrations/2019_08_08_000000_create_tenants_table.php | 2 ++ src/CacheManager.php | 2 ++ src/Commands/Install.php | 2 ++ src/Commands/Migrate.php | 2 ++ src/Commands/Rollback.php | 2 ++ src/Commands/Run.php | 2 ++ src/Commands/Seed.php | 2 ++ src/Commands/TenantList.php | 2 ++ src/Controllers/TenantAssetsController.php | 2 ++ src/DatabaseManager.php | 2 ++ src/Exceptions/CannotChangeUuidOrDomainException.php | 2 ++ src/Exceptions/DatabaseManagerNotRegisteredException.php | 2 ++ src/Exceptions/PhpRedisNotInstalledException.php | 2 ++ src/Exceptions/TenantCouldNotBeIdentifiedException.php | 2 ++ src/GlobalCacheFacade.php | 2 ++ src/Interfaces/StorageDriver.php | 2 ++ src/Interfaces/TenantDatabaseManager.php | 2 ++ src/Interfaces/UniqueIdentifierGenerator.php | 2 ++ src/Jobs/QueuedTenantDatabaseCreator.php | 2 ++ src/Jobs/QueuedTenantDatabaseDeleter.php | 2 ++ src/Middleware/InitializeTenancy.php | 2 ++ src/StorageDrivers/DatabaseStorageDriver.php | 2 ++ src/StorageDrivers/RedisStorageDriver.php | 2 ++ src/TenancyFacade.php | 2 ++ src/TenancyServiceProvider.php | 2 ++ src/Tenant.php | 2 ++ src/TenantDatabaseManagers/MySQLDatabaseManager.php | 2 ++ src/TenantDatabaseManagers/PostgreSQLDatabaseManager.php | 2 ++ src/TenantDatabaseManagers/SQLiteDatabaseManager.php | 2 ++ src/TenantManager.php | 6 +++++- src/TenantRouteServiceProvider.php | 2 ++ src/Traits/BootstrapsTenancy.php | 2 ++ src/Traits/DealsWithMigrations.php | 2 ++ src/Traits/HasATenantsOption.php | 2 ++ src/Traits/TenantManagerEvents.php | 2 ++ src/UUIDGenerator.php | 2 ++ src/helpers.php | 2 ++ src/routes.php | 2 ++ tests/BootstrapsTenancyTest.php | 2 ++ tests/CacheManagerTest.php | 2 ++ tests/CommandsTest.php | 2 ++ tests/DataSeparationTest.php | 2 ++ tests/DatabaseManagerTest.php | 2 ++ tests/Etc/ConsoleKernel.php | 2 ++ tests/Etc/ExampleCommand.php | 2 ++ tests/Etc/ExampleSeeder.php | 2 ++ tests/Etc/HttpKernel.php | 2 ++ tests/FacadeTest.php | 2 ++ tests/GlobalCacheTest.php | 2 ++ tests/QueueTest.php | 2 ++ tests/ReidentificationTest.php | 2 ++ tests/TenantAssetTest.php | 2 ++ tests/TenantDatabaseManagerTest.php | 2 ++ tests/TenantManagerEventsTest.php | 2 ++ tests/TenantManagerTest.php | 2 ++ tests/TenantRedirectMacroTest.php | 2 ++ tests/TenantStorageTest.php | 2 ++ tests/TestCase.php | 4 +++- 60 files changed, 123 insertions(+), 2 deletions(-) diff --git a/.styleci.yml b/.styleci.yml index a1b99be9..547c3853 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1,6 +1,7 @@ preset: laravel enabled: - native_function_invocation +- declare_strict_types disabled: - concat_without_spaces - ternary_operator_spaces diff --git a/assets/config.php b/assets/config.php index c836ca39..79dec526 100644 --- a/assets/config.php +++ b/assets/config.php @@ -1,5 +1,7 @@ 'Stancl\Tenancy\StorageDrivers\DatabaseStorageDriver', 'storage' => [ diff --git a/assets/migrations/2019_08_08_000000_create_tenants_table.php b/assets/migrations/2019_08_08_000000_create_tenants_table.php index 35158a88..f3de166a 100644 --- a/assets/migrations/2019_08_08_000000_create_tenants_table.php +++ b/assets/migrations/2019_08_08_000000_create_tenants_table.php @@ -1,5 +1,7 @@ where('path', '(.*)') ->name('stancl.tenancy.asset'); diff --git a/tests/BootstrapsTenancyTest.php b/tests/BootstrapsTenancyTest.php index f20170bb..f83f4dea 100644 --- a/tests/BootstrapsTenancyTest.php +++ b/tests/BootstrapsTenancyTest.php @@ -1,5 +1,7 @@