Permalink
Browse files

Code standards fixes, unneeded break statements

  • Loading branch information...
1 parent 5b64128 commit 200dd2dc9bf6f8117b340ea5c75b440faac4949d @shama shama committed Sep 4, 2012
@@ -175,7 +175,6 @@ public function main($command = null) {
case 'quit':
case 'exit':
return true;
- break;
case 'models':
$this->out(__d('cake_console', 'Model classes:'));
$this->hr();
View
@@ -123,7 +123,6 @@ public function dispatchMethod($method, $params = array()) {
return $this->{$method}($params[0], $params[1], $params[2], $params[3], $params[4]);
default:
return call_user_func_array(array(&$this, $method), $params);
- break;
}
}
@@ -532,7 +532,6 @@ public function dropSchema(CakeSchema $schema, $table = null) {
* @param string $table Table to alter parameters for.
* @param array $parameters Parameters to add & drop.
* @return array Array of table property alteration statements.
- * @todo Implement this method.
*/
protected function _alterTableParameters($table, $parameters) {
if (isset($parameters['change'])) {
@@ -649,7 +649,6 @@ public function column($real) {
return 'float';
default:
return 'text';
- break;
}
}
@@ -879,10 +878,8 @@ public function renderStatement($type, $data) {
}
}
return "CREATE TABLE {$table} (\n\t{$columns}\n);\n{$indexes}";
- break;
default:
return parent::renderStatement($type, $data);
- break;
}
}
@@ -516,10 +516,8 @@ public function renderStatement($type, $data) {
$indexes = "\t" . join("\n\t", array_filter($indexes));
}
return "CREATE TABLE {$table} (\n{$columns});\n{$indexes}";
- break;
default:
return parent::renderStatement($type, $data);
- break;
}
}
@@ -533,10 +533,8 @@ public function renderStatement($type, $data) {
}
}
return "CREATE TABLE {$table} (\n{$columns});\n{$indexes}";
- break;
default:
return parent::renderStatement($type, $data);
- break;
}
}
@@ -341,10 +341,8 @@ public function value($data, $column = null) {
switch ($column) {
case 'binary':
return $this->_connection->quote($data, PDO::PARAM_LOB);
- break;
case 'boolean':
return $this->_connection->quote($this->boolean($data, true), PDO::PARAM_BOOL);
- break;
case 'string':
case 'text':
return $this->_connection->quote($data, PDO::PARAM_STR);
@@ -362,7 +360,6 @@ public function value($data, $column = null) {
return $data;
}
return $this->_connection->quote($data);
- break;
}
}
@@ -2029,7 +2026,6 @@ public function calculate(Model $model, $func, $params = array()) {
$arg = $this->name($params[0]);
}
return strtoupper($func) . '(' . $arg . ') AS ' . $this->name($params[1]);
- break;
}
}
@@ -149,7 +149,6 @@ public function check($aro, $aco, $action = "*") {
break;
case 1:
return true;
- break;
}
}
}
@@ -112,10 +112,8 @@ public function __get($name) {
switch ($name) {
case 'niceFormat':
return self::${$name};
- break;
default:
return null;
- break;
}
}
@@ -250,7 +250,6 @@ public static function showError($code, $description, $file = null, $line = null
break;
default:
return;
- break;
}
$data = compact(
@@ -474,29 +473,23 @@ protected static function _export($var, $depth, $indent) {
switch (self::getType($var)) {
case 'boolean':
return ($var) ? 'true' : 'false';
- break;
case 'integer':
return '(int) ' . $var;
case 'float':
return '(float) ' . $var;
- break;
case 'string':
if (trim($var) == '') {
return "''";
}
return "'" . $var . "'";
- break;
case 'array':
return self::_array($var, $depth - 1, $indent + 1);
- break;
case 'resource':
return strtolower(gettype($var));
- break;
case 'null':
return 'null';
default:
return self::_object($var, $depth - 1, $indent + 1);
- break;
}
}
@@ -42,14 +42,11 @@ public static function inactiveMins() {
switch (Configure::read('Security.level')) {
case 'high':
return 10;
- break;
case 'medium':
return 100;
- break;
case 'low':
default:
return 300;
- break;
}
}

0 comments on commit 200dd2d

Please sign in to comment.