Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/dependency-injection/EnvVarProcessor.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/vendor/symfony/dependency-injection/EnvVarProcessor.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/dependency-injection/EnvVarProcessor.php Thu Feb 28 13:21:36 2019 +0000 @@ -32,7 +32,7 @@ */ public static function getProvidedTypes() { - return array( + return [ 'base64' => 'string', 'bool' => 'bool', 'const' => 'bool|int|float|string|array', @@ -42,7 +42,7 @@ 'json' => 'array', 'resolve' => 'string', 'string' => 'string', - ); + ]; } /** @@ -110,11 +110,11 @@ } if ('const' === $prefix) { - if (!defined($env)) { + if (!\defined($env)) { throw new RuntimeException(sprintf('Env var "%s" maps to undefined constant "%s".', $name, $env)); } - return constant($env); + return \constant($env); } if ('base64' === $prefix) { @@ -128,8 +128,8 @@ throw new RuntimeException(sprintf('Invalid JSON in env var "%s": '.json_last_error_msg(), $name)); } - if (!is_array($env)) { - throw new RuntimeException(sprintf('Invalid JSON env var "%s": array expected, %s given.', $name, gettype($env))); + if (!\is_array($env)) { + throw new RuntimeException(sprintf('Invalid JSON env var "%s": array expected, %s given.', $name, \gettype($env))); } return $env; @@ -142,7 +142,7 @@ } $value = $this->container->getParameter($match[1]); if (!is_scalar($value)) { - throw new RuntimeException(sprintf('Parameter "%s" found when resolving env var "%s" must be scalar, "%s" given.', $match[1], $name, gettype($value))); + throw new RuntimeException(sprintf('Parameter "%s" found when resolving env var "%s" must be scalar, "%s" given.', $match[1], $name, \gettype($value))); } return $value;