1
0
Fork 0

Used shorthand version for ternary operator

pull/4305/head
Tehem 2015-08-03 23:36:05 +02:00
parent b35e762354
commit 9e592f19a1
1 changed files with 2 additions and 6 deletions

View File

@ -138,12 +138,8 @@ EOT
// Get the local composer.json, global config.json, or if the user // Get the local composer.json, global config.json, or if the user
// passed in a file to use // passed in a file to use
$configFile = $input->getOption('global') $configFile = $input->getOption('global')
? ($this->config->get('home').'/config.json') ? ($this->config->get('home') . '/config.json')
: ( : ($input->getOption('file') ?: (trim(getenv('COMPOSER')) ? trim(getenv('COMPOSER')) : 'composer.json'));
$input->getOption('file')
? $input->getOption('file')
: (trim(getenv('COMPOSER')) ? trim(getenv('COMPOSER')) : 'composer.json')
);
// create global composer.json if this was invoked using `composer global config` // 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'))) { if ($configFile === 'composer.json' && !file_exists($configFile) && realpath(getcwd()) === realpath($this->config->get('home'))) {