From 9fae289542e668c49ed1649c854b18f57e5ffc44 Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Sat, 23 Mar 2002 10:20:41 +0000 Subject: [PATCH] * use switch/case for what it's worth :-) --- pear/PEAR/Command/Install.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pear/PEAR/Command/Install.php b/pear/PEAR/Command/Install.php index 3a8702bd92..40fa0a91da 100644 --- a/pear/PEAR/Command/Install.php +++ b/pear/PEAR/Command/Install.php @@ -62,7 +62,7 @@ class PEAR_Command_Install extends PEAR_Command_Common function run($command, $options, $params) { - $installer =& new PEAR_Installer($this->config->get('php_dir'), + $installer = &new PEAR_Installer($this->config->get('php_dir'), $this->config->get('ext_dir'), $this->config->get('doc_dir')); $installer->debug = $this->config->get('verbose'); @@ -70,11 +70,10 @@ class PEAR_Command_Install extends PEAR_Command_Common $failmsg = ''; $opts = array(); switch ($command) { - case 'install': case 'upgrade': { - if ($command == 'upgrade') { - $opts['upgrade'] = true; - } + $opts['upgrade'] = true; + // fall through + case 'install': if (isset($options['f'])) { $opts['force'] = true; } -- 2.40.0