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 'exit':
return true;
break;
case 'models':
$this->out(__d('cake_console', 'Model classes:'));
$this->hr();

View file

@ -123,7 +123,6 @@ class Object {
return $this->{$method}($params[0], $params[1], $params[2], $params[3], $params[4]);
default:
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 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'])) {

View file

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

View file

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

View file

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

View file

@ -341,10 +341,8 @@ class DboSource extends DataSource {
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 @@ class DboSource extends DataSource {
return $data;
}
return $this->_connection->quote($data);
break;
}
}
@ -2029,7 +2026,6 @@ class DboSource extends DataSource {
$arg = $this->name($params[0]);
}
return strtoupper($func) . '(' . $arg . ') AS ' . $this->name($params[1]);
break;
}
}

View file

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

View file

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

View file

@ -250,7 +250,6 @@ class Debugger {
break;
default:
return;
break;
}
$data = compact(
@ -474,29 +473,23 @@ class Debugger {
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;
}
}

View file

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