From 146414662975039bb198be0921e702a35bd9d9a8 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 19 Dec 2016 10:31:48 +0100 Subject: [PATCH] Explicitly cast possible-null to string --- src/Composer/Config.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Composer/Config.php b/src/Composer/Config.php index 88e9af73a..2888b8d29 100644 --- a/src/Composer/Config.php +++ b/src/Composer/Config.php @@ -217,7 +217,7 @@ class Config $env = 'COMPOSER_' . strtoupper(strtr($key, '-', '_')); $val = $this->getComposerEnv($env); - $val = rtrim($this->process(false !== $val ? $val : $this->config[$key], $flags), '/\\'); + $val = rtrim((string) $this->process(false !== $val ? $val : $this->config[$key], $flags), '/\\'); $val = Platform::expandPath($val); if (substr($key, -4) !== '-dir') { @@ -358,9 +358,9 @@ class Config /** * Replaces {$refs} inside a config string * - * @param string $value a config string that can contain {$refs-to-other-config} - * @param int $flags Options (see class constants) - * @return string + * @param string|int|null $value a config string that can contain {$refs-to-other-config} + * @param int $flags Options (see class constants) + * @return string|int|null */ private function process($value, $flags) {