From 39901df8ff28bb74f73996e049879921b145983b Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Wed, 16 Jul 2014 00:18:12 -0300 Subject: [PATCH 1/2] Fixed style in README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bd28de..953f728 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ As environment variables can only be strings, they are also parsed as inline Yaml values to allows specifying ``null``, ``false``, ``true`` or numbers easily. -## Using same names for parameters and environment variables +#### Using same names for parameters and environment variables As an alternative, you can set environment variables with the same uppercased name of your dist parameters and use ``"env-map": "auto"`` to get an auto mapping. From 42ba5d83d5bb73e07b36fd21c4691a7ffb50246b Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Tue, 16 Sep 2014 22:51:35 -0300 Subject: [PATCH 2/2] Replaced array_walk() with foreach(). --- Processor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Processor.php b/Processor.php index 4276894..3b8f1fc 100644 --- a/Processor.php +++ b/Processor.php @@ -104,9 +104,9 @@ private function processParams(array $config, array $expectedParams, array $actu if (!empty($config['env-map'])) { // Hydrate env-map from dist file if ('auto' === $config['env-map']) { - array_walk($expectedParams, function($v, $k) use (&$envMap) { - $envMap[$k] = strtoupper($k); - }); + foreach ($expectedParams as $key => $value) { + $envMap[$key] = strtoupper($key); + } } else { $envMap = (array) $config['env-map']; }