diff --git a/lib/Cake/Cache/Cache.php b/lib/Cake/Cache/Cache.php index 78619d86b..174c4e504 100644 --- a/lib/Cake/Cache/Cache.php +++ b/lib/Cake/Cache/Cache.php @@ -538,9 +538,8 @@ class Cache { } if (isset(self::$_groups[$group])) { return array($group => self::$_groups[$group]); - } else { - throw new CacheException(__d('cake_dev', 'Invalid cache group %s', $group)); } + throw new CacheException(__d('cake_dev', 'Invalid cache group %s', $group)); } } diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 30c6f3340..223b1179b 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -235,10 +235,9 @@ class SchemaShell extends AppShell { if ($File->write($contents)) { $this->out(__d('cake_console', 'SQL dump file created in %s', $File->pwd())); return $this->_stop(); - } else { - $this->err(__d('cake_console', 'SQL dump could not be created')); - return $this->_stop(); } + $this->err(__d('cake_console', 'SQL dump could not be created')); + return $this->_stop(); } $this->out($contents); return $contents; diff --git a/lib/Cake/Model/Behavior/TreeBehavior.php b/lib/Cake/Model/Behavior/TreeBehavior.php index 4e3c472cd..094d15be5 100644 --- a/lib/Cake/Model/Behavior/TreeBehavior.php +++ b/lib/Cake/Model/Behavior/TreeBehavior.php @@ -789,10 +789,9 @@ class TreeBehavior extends ModelBehavior { if ($node[$right] == $node[$left] + 1) { if ($delete) { return $Model->delete($id); - } else { - $Model->id = $id; - return $Model->saveField($parent, null); } + $Model->id = $id; + return $Model->saveField($parent, null); } elseif ($node[$parent]) { list($parentNode) = array_values($Model->find('first', array( 'conditions' => array($scope, $Model->escapeField() => $node[$parent]), diff --git a/lib/Cake/View/Helper/HtmlHelper.php b/lib/Cake/View/Helper/HtmlHelper.php index 8b309c981..9c892a592 100644 --- a/lib/Cake/View/Helper/HtmlHelper.php +++ b/lib/Cake/View/Helper/HtmlHelper.php @@ -556,9 +556,8 @@ class HtmlHelper extends AppHelper { if (empty($options['block'])) { return $out; - } else { - $this->_View->append($options['block'], $out); } + $this->_View->append($options['block'], $out); } /** @@ -593,9 +592,8 @@ class HtmlHelper extends AppHelper { if (empty($options['block'])) { return $out; - } else { - $this->_View->append($options['block'], $out); } + $this->_View->append($options['block'], $out); } /**