From 9e592f19a1298f46b7222005634064c2e42a250b Mon Sep 17 00:00:00 2001 From: Tehem Date: Mon, 3 Aug 2015 23:36:05 +0200 Subject: [PATCH] Used shorthand version for ternary operator --- src/Composer/Command/ConfigCommand.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php index f792f84bd..96c431655 100644 --- a/src/Composer/Command/ConfigCommand.php +++ b/src/Composer/Command/ConfigCommand.php @@ -138,12 +138,8 @@ EOT // Get the local composer.json, global config.json, or if the user // passed in a file to use $configFile = $input->getOption('global') - ? ($this->config->get('home').'/config.json') - : ( - $input->getOption('file') - ? $input->getOption('file') - : (trim(getenv('COMPOSER')) ? trim(getenv('COMPOSER')) : 'composer.json') - ); + ? ($this->config->get('home') . '/config.json') + : ($input->getOption('file') ?: (trim(getenv('COMPOSER')) ? trim(getenv('COMPOSER')) : 'composer.json')); // create global composer.json if this was invoked using `composer global config` if ($configFile === 'composer.json' && !file_exists($configFile) && realpath(getcwd()) === realpath($this->config->get('home'))) {