From ad5e5c8bfdb0ef8ade446022f9d0dee58dc8b5af Mon Sep 17 00:00:00 2001 From: Daniel Bannert Date: Wed, 21 Sep 2016 23:04:04 +0200 Subject: [PATCH] fixes #389 (#392) --- composer.json | 3 +++ src/Viserio/Support/Env.php | 24 ++++++++++++------------ src/Viserio/helpers.php | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 src/Viserio/helpers.php diff --git a/composer.json b/composer.json index 1295666e9..df85fa48e 100644 --- a/composer.json +++ b/composer.json @@ -141,6 +141,9 @@ "yosymfony/toml" : "^0.3" }, "autoload": { + "files": [ + "src/Viserio/helpers.php" + ], "psr-4": { "Viserio\\" : "src/Viserio/", "Narrowspark\\" : "benchmarks/" diff --git a/src/Viserio/Support/Env.php b/src/Viserio/Support/Env.php index 1296f95bf..47d1e881f 100644 --- a/src/Viserio/Support/Env.php +++ b/src/Viserio/Support/Env.php @@ -27,18 +27,18 @@ public static function get(string $key, $default = null) if (in_array( $value, [ - 'false', - '(false)', - 'true', - '(true)', - 'yes', - '(yes)', - 'no', - '(no)', - 'on', - '(on)', - 'off', - '(off)', + 'false', + '(false)', + 'true', + '(true)', + 'yes', + '(yes)', + 'no', + '(no)', + 'on', + '(on)', + 'off', + '(off)', ] )) { $value = str_replace(['(', ')'], '', $value); diff --git a/src/Viserio/helpers.php b/src/Viserio/helpers.php new file mode 100644 index 000000000..7950dcc1c --- /dev/null +++ b/src/Viserio/helpers.php @@ -0,0 +1,19 @@ +