diff --git a/.php_cs b/.php_cs index 7755b4f70..ff43b3584 100644 --- a/.php_cs +++ b/.php_cs @@ -39,6 +39,7 @@ return PhpCsFixer\Config::create() 'no_leading_namespace_whitespace' => true, 'no_trailing_comma_in_singleline_array' => true, 'no_unused_imports' => true, + 'no_useless_else' => true, 'no_whitespace_in_blank_line' => true, 'object_operator_without_whitespace' => true, 'phpdoc_align' => true, diff --git a/src/Composer/Util/Perforce.php b/src/Composer/Util/Perforce.php index 13c07d6fd..fbd73b2b5 100644 --- a/src/Composer/Util/Perforce.php +++ b/src/Composer/Util/Perforce.php @@ -243,13 +243,13 @@ class Perforce } return null; - } else { - $command = 'echo $' . $name; - $this->executeCommand($command); - $result = trim($this->commandResult); - - return $result; } + + $command = 'echo $' . $name; + $this->executeCommand($command); + $result = trim($this->commandResult); + + return $result; } public function queryP4Password()