From e3758875e21608eb451360a85d608470db6688de Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 16 Jan 2019 21:35:37 +0100 Subject: [PATCH] fixed CS --- Dotenv.php | 4 ++-- Tests/DotenvTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dotenv.php b/Dotenv.php index 3d7bc3b..66ca8c8 100644 --- a/Dotenv.php +++ b/Dotenv.php @@ -65,7 +65,7 @@ public function load(string $path, string ...$extraPaths): void * @throws FormatException when a file has a syntax error * @throws PathException when a file does not exist or is not readable */ - public function loadEnv(string $path, string $varName = 'APP_ENV', string $defaultEnv = 'dev', array $testEnvs = array('test')): void + public function loadEnv(string $path, string $varName = 'APP_ENV', string $defaultEnv = 'dev', array $testEnvs = ['test']): void { if (file_exists($path) || !file_exists($p = "$path.dist")) { $this->load($path); @@ -74,7 +74,7 @@ public function loadEnv(string $path, string $varName = 'APP_ENV', string $defau } if (null === $env = $_SERVER[$varName] ?? $_ENV[$varName] ?? null) { - $this->populate(array($varName => $env = $defaultEnv)); + $this->populate([$varName => $env = $defaultEnv]); } if (!\in_array($env, $testEnvs, true) && file_exists($p = "$path.local")) { diff --git a/Tests/DotenvTest.php b/Tests/DotenvTest.php index 29cae1b..b9918c9 100644 --- a/Tests/DotenvTest.php +++ b/Tests/DotenvTest.php @@ -343,7 +343,7 @@ public function testEnvVarIsOverriden() putenv('TEST_ENV_VAR_OVERRIDEN=original_value'); $dotenv = new Dotenv(); - $dotenv->populate(array('TEST_ENV_VAR_OVERRIDEN' => 'new_value'), true); + $dotenv->populate(['TEST_ENV_VAR_OVERRIDEN' => 'new_value'], true); $this->assertSame('new_value', getenv('TEST_ENV_VAR_OVERRIDEN')); $this->assertSame('new_value', $_ENV['TEST_ENV_VAR_OVERRIDEN']);