Skip to content

Commit

Permalink
Code standards fixes, unneeded break statements
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Sep 4, 2012
1 parent 5b64128 commit 200dd2d
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 27 deletions.
1 change: 0 additions & 1 deletion lib/Cake/Console/Command/ConsoleShell.php
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Core/Object.php
Expand Up @@ -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;
}
}

Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Model/Datasource/Database/Mysql.php
Expand Up @@ -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'])) {
Expand Down
3 changes: 0 additions & 3 deletions lib/Cake/Model/Datasource/Database/Postgres.php
Expand Up @@ -649,7 +649,6 @@ public function column($real) {
return 'float';
default:
return 'text';
break;
}
}

Expand Down Expand Up @@ -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;
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/Model/Datasource/Database/Sqlite.php
Expand Up @@ -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;
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/Model/Datasource/Database/Sqlserver.php
Expand Up @@ -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;
}
}

Expand Down
4 changes: 0 additions & 4 deletions lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -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);
Expand All @@ -362,7 +360,6 @@ public function value($data, $column = null) {
return $data;
}
return $this->_connection->quote($data);
break;
}
}

Expand Down Expand Up @@ -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;
}
}

Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Model/Permission.php
Expand Up @@ -149,7 +149,6 @@ public function check($aro, $aco, $action = "*") {
break;
case 1:
return true;
break;
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/Utility/CakeTime.php
Expand Up @@ -112,10 +112,8 @@ public function __get($name) {
switch ($name) {
case 'niceFormat':
return self::${$name};
break;
default:
return null;
break;
}
}

Expand Down
7 changes: 0 additions & 7 deletions lib/Cake/Utility/Debugger.php
Expand Up @@ -250,7 +250,6 @@ public static function showError($code, $description, $file = null, $line = null
break;
default:
return;
break;
}

$data = compact(
Expand Down Expand Up @@ -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;
}
}

Expand Down
3 changes: 0 additions & 3 deletions lib/Cake/Utility/Security.php
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 200dd2d

Please sign in to comment.