From a71ba16800aeffd4aecb8fe38eb65bf02d341b6c Mon Sep 17 00:00:00 2001 From: silverqx Date: Wed, 24 Nov 2021 14:47:26 +0100 Subject: [PATCH] fixed phpstorm warnings --- tests/testdata/create_and_seed_database.php | 36 ++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/testdata/create_and_seed_database.php b/tests/testdata/create_and_seed_database.php index 040affe82..fbc92764a 100644 --- a/tests/testdata/create_and_seed_database.php +++ b/tests/testdata/create_and_seed_database.php @@ -53,7 +53,7 @@ function dropAllTables(string $connection): void function allEnvVariablesEmpty(array $envVariables): bool { return collect($envVariables)->every(function (string $envVariable) { - return false === \getenv($envVariable); + return false === getenv($envVariable); }); } @@ -396,7 +396,7 @@ function seedTables(string $connection): void /** * Fix sequence number for Postgres. * - * I have to fix sequences in Postgres because I'm inserting IDs manually and + * I have to fix sequences in Postgres because I'm inserting IDs manually, and * it doesn't increment sequences. * * @return void @@ -418,7 +418,7 @@ function fixSequences(): void foreach ($sequences as $sequence => $id) { Capsule::connection('pgsql') - ->unprepared("ALTER SEQUENCE {$sequence} RESTART WITH {$id}"); + ->unprepared("ALTER SEQUENCE $sequence RESTART WITH $id"); } } @@ -450,33 +450,33 @@ $capsule->bootEloquent(); $configs = [ 'mysql' => [ 'driver' => 'mysql', - 'host' => \getenv('DB_MYSQL_HOST') ?: '127.0.0.1', - 'port' => \getenv('DB_MYSQL_PORT') ?: '3306', - 'database' => \getenv('DB_MYSQL_DATABASE') ?: '', - 'username' => \getenv('DB_MYSQL_USERNAME') ?: 'root', - 'password' => \getenv('DB_MYSQL_PASSWORD') ?: '', - 'charset' => \getenv('DB_MYSQL_CHARSET') ?: 'utf8mb4', - 'collation' => \getenv('DB_MYSQL_COLLATION') ?: 'utf8mb4_0900_ai_ci', + 'host' => getenv('DB_MYSQL_HOST') ?: '127.0.0.1', + 'port' => getenv('DB_MYSQL_PORT') ?: '3306', + 'database' => getenv('DB_MYSQL_DATABASE') ?: '', + 'username' => getenv('DB_MYSQL_USERNAME') ?: 'root', + 'password' => getenv('DB_MYSQL_PASSWORD') ?: '', + 'charset' => getenv('DB_MYSQL_CHARSET') ?: 'utf8mb4', + 'collation' => getenv('DB_MYSQL_COLLATION') ?: 'utf8mb4_0900_ai_ci', 'timezone' => '+00:00', 'prefix' => '', ], 'sqlite' => [ 'driver' => 'sqlite', - 'database' => \getenv('DB_SQLITE_DATABASE') ?: '', + 'database' => getenv('DB_SQLITE_DATABASE') ?: '', 'prefix' => '', 'foreign_key_constraints' => true, ], 'pgsql' => [ 'driver' => 'pgsql', - 'host' => \getenv('DB_PGSQL_HOST') ?: '127.0.0.1', - 'port' => \getenv('DB_PGSQL_PORT') ?: '5432', - 'database' => \getenv('DB_PGSQL_DATABASE') ?: 'postgres', - 'schema' => \getenv('DB_PGSQL_SCHEMA') ?: 'public', - 'username' => \getenv('DB_PGSQL_USERNAME') ?: 'postgres', - 'password' => \getenv('DB_PGSQL_PASSWORD') ?: '', - 'charset' => \getenv('DB_PGSQL_CHARSET') ?: 'utf8', + 'host' => getenv('DB_PGSQL_HOST') ?: '127.0.0.1', + 'port' => getenv('DB_PGSQL_PORT') ?: '5432', + 'database' => getenv('DB_PGSQL_DATABASE') ?: 'postgres', + 'schema' => getenv('DB_PGSQL_SCHEMA') ?: 'public', + 'username' => getenv('DB_PGSQL_USERNAME') ?: 'postgres', + 'password' => getenv('DB_PGSQL_PASSWORD') ?: '', + 'charset' => getenv('DB_PGSQL_CHARSET') ?: 'utf8', 'timezone' => 'UTC', 'sslmode' => 'prefer', 'prefix' => '',