From: Stig Bakken Date: Sat, 23 Mar 2002 10:20:41 +0000 (+0000) Subject: * use switch/case for what it's worth :-) X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~1098 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fae289542e668c49ed1649c854b18f57e5ffc44;p=php * use switch/case for what it's worth :-) --- 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; }