From fd0d98eacdf06044f2768fe2071bcc5ffcd84be9 Mon Sep 17 00:00:00 2001 From: stancl Date: Sun, 3 May 2020 15:27:47 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/DatabaseConfig.php | 2 +- tests/TenantClassTest.php | 54 +++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/DatabaseConfig.php b/src/DatabaseConfig.php index c2e8a875..93248427 100644 --- a/src/DatabaseConfig.php +++ b/src/DatabaseConfig.php @@ -128,7 +128,7 @@ class DatabaseConfig if (($pos = array_search('_tenancy_db_name', $dbConfig)) !== false) { unset($dbConfig[$pos]); } - + // Remove DB connection because that's not used inside the array if (($pos = array_search('_tenancy_db_connection', $dbConfig)) !== false) { unset($dbConfig[$pos]); diff --git a/tests/TenantClassTest.php b/tests/TenantClassTest.php index be85b99f..ec02775c 100644 --- a/tests/TenantClassTest.php +++ b/tests/TenantClassTest.php @@ -187,21 +187,21 @@ class TenantClassTest extends TestCase ]); config(['database.connections.mysql' => [ - "driver" => "mysql", - "url" => null, - "host" => "mysql", - "port" => "3306", - "database" => "main", - "username" => "root", - "password" => "password", - "unix_socket" => "", - "charset" => "utf8mb4", - "collation" => "utf8mb4_unicode_ci", - "prefix" => "", - "prefix_indexes" => true, - "strict" => true, - "engine" => null, - "options" => [], + 'driver' => 'mysql', + 'url' => null, + 'host' => 'mysql', + 'port' => '3306', + 'database' => 'main', + 'username' => 'root', + 'password' => 'password', + 'unix_socket' => '', + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, + 'options' => [], ]]); $this->assertEquals([ @@ -210,18 +210,18 @@ class TenantClassTest extends TestCase 'password' => 'passwordfoo', 'link' => 'foo', - "driver" => "mysql", - "url" => null, - "host" => "mysql", - "port" => "3306", - "unix_socket" => "", - "charset" => "utf8mb4", - "collation" => "utf8mb4_unicode_ci", - "prefix" => "", - "prefix_indexes" => true, - "strict" => true, - "engine" => null, - "options" => [], + 'driver' => 'mysql', + 'url' => null, + 'host' => 'mysql', + 'port' => '3306', + 'unix_socket' => '', + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, + 'options' => [], ], $tenant->database()->connection()); } }