Code standards fixes, unneeded break statements

This commit is contained in:
Kyle Robinson Young 2012-09-04 10:57:47 -07:00
parent 5b641287e9
commit 200dd2dc9b
11 changed files with 0 additions and 27 deletions

View file

@ -175,7 +175,6 @@ class ConsoleShell extends AppShell {
case 'quit': case 'quit':
case 'exit': case 'exit':
return true; return true;
break;
case 'models': case 'models':
$this->out(__d('cake_console', 'Model classes:')); $this->out(__d('cake_console', 'Model classes:'));
$this->hr(); $this->hr();

View file

@ -123,7 +123,6 @@ class Object {
return $this->{$method}($params[0], $params[1], $params[2], $params[3], $params[4]); return $this->{$method}($params[0], $params[1], $params[2], $params[3], $params[4]);
default: default:
return call_user_func_array(array(&$this, $method), $params); return call_user_func_array(array(&$this, $method), $params);
break;
} }
} }

View file

@ -532,7 +532,6 @@ class Mysql extends DboSource {
* @param string $table Table to alter parameters for. * @param string $table Table to alter parameters for.
* @param array $parameters Parameters to add & drop. * @param array $parameters Parameters to add & drop.
* @return array Array of table property alteration statements. * @return array Array of table property alteration statements.
* @todo Implement this method.
*/ */
protected function _alterTableParameters($table, $parameters) { protected function _alterTableParameters($table, $parameters) {
if (isset($parameters['change'])) { if (isset($parameters['change'])) {

View file

@ -649,7 +649,6 @@ class Postgres extends DboSource {
return 'float'; return 'float';
default: default:
return 'text'; return 'text';
break;
} }
} }
@ -879,10 +878,8 @@ class Postgres extends DboSource {
} }
} }
return "CREATE TABLE {$table} (\n\t{$columns}\n);\n{$indexes}"; return "CREATE TABLE {$table} (\n\t{$columns}\n);\n{$indexes}";
break;
default: default:
return parent::renderStatement($type, $data); return parent::renderStatement($type, $data);
break;
} }
} }

View file

@ -516,10 +516,8 @@ class Sqlite extends DboSource {
$indexes = "\t" . join("\n\t", array_filter($indexes)); $indexes = "\t" . join("\n\t", array_filter($indexes));
} }
return "CREATE TABLE {$table} (\n{$columns});\n{$indexes}"; return "CREATE TABLE {$table} (\n{$columns});\n{$indexes}";
break;
default: default:
return parent::renderStatement($type, $data); return parent::renderStatement($type, $data);
break;
} }
} }

View file

@ -533,10 +533,8 @@ class Sqlserver extends DboSource {
} }
} }
return "CREATE TABLE {$table} (\n{$columns});\n{$indexes}"; return "CREATE TABLE {$table} (\n{$columns});\n{$indexes}";
break;
default: default:
return parent::renderStatement($type, $data); return parent::renderStatement($type, $data);
break;
} }
} }

View file

@ -341,10 +341,8 @@ class DboSource extends DataSource {
switch ($column) { switch ($column) {
case 'binary': case 'binary':
return $this->_connection->quote($data, PDO::PARAM_LOB); return $this->_connection->quote($data, PDO::PARAM_LOB);
break;
case 'boolean': case 'boolean':
return $this->_connection->quote($this->boolean($data, true), PDO::PARAM_BOOL); return $this->_connection->quote($this->boolean($data, true), PDO::PARAM_BOOL);
break;
case 'string': case 'string':
case 'text': case 'text':
return $this->_connection->quote($data, PDO::PARAM_STR); return $this->_connection->quote($data, PDO::PARAM_STR);
@ -362,7 +360,6 @@ class DboSource extends DataSource {
return $data; return $data;
} }
return $this->_connection->quote($data); return $this->_connection->quote($data);
break;
} }
} }
@ -2029,7 +2026,6 @@ class DboSource extends DataSource {
$arg = $this->name($params[0]); $arg = $this->name($params[0]);
} }
return strtoupper($func) . '(' . $arg . ') AS ' . $this->name($params[1]); return strtoupper($func) . '(' . $arg . ') AS ' . $this->name($params[1]);
break;
} }
} }

View file

@ -149,7 +149,6 @@ class Permission extends AppModel {
break; break;
case 1: case 1:
return true; return true;
break;
} }
} }
} }

View file

@ -112,10 +112,8 @@ class CakeTime {
switch ($name) { switch ($name) {
case 'niceFormat': case 'niceFormat':
return self::${$name}; return self::${$name};
break;
default: default:
return null; return null;
break;
} }
} }

View file

@ -250,7 +250,6 @@ class Debugger {
break; break;
default: default:
return; return;
break;
} }
$data = compact( $data = compact(
@ -474,29 +473,23 @@ class Debugger {
switch (self::getType($var)) { switch (self::getType($var)) {
case 'boolean': case 'boolean':
return ($var) ? 'true' : 'false'; return ($var) ? 'true' : 'false';
break;
case 'integer': case 'integer':
return '(int) ' . $var; return '(int) ' . $var;
case 'float': case 'float':
return '(float) ' . $var; return '(float) ' . $var;
break;
case 'string': case 'string':
if (trim($var) == '') { if (trim($var) == '') {
return "''"; return "''";
} }
return "'" . $var . "'"; return "'" . $var . "'";
break;
case 'array': case 'array':
return self::_array($var, $depth - 1, $indent + 1); return self::_array($var, $depth - 1, $indent + 1);
break;
case 'resource': case 'resource':
return strtolower(gettype($var)); return strtolower(gettype($var));
break;
case 'null': case 'null':
return 'null'; return 'null';
default: default:
return self::_object($var, $depth - 1, $indent + 1); return self::_object($var, $depth - 1, $indent + 1);
break;
} }
} }

View file

@ -42,14 +42,11 @@ class Security {
switch (Configure::read('Security.level')) { switch (Configure::read('Security.level')) {
case 'high': case 'high':
return 10; return 10;
break;
case 'medium': case 'medium':
return 100; return 100;
break;
case 'low': case 'low':
default: default:
return 300; return 300;
break;
} }
} }