Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Array coding convention and extraneous punctuation

Signed-off-by: Mark Story <mark@mark-story.com>
  • Loading branch information...
commit 2e3bbe363dde2bfab61f783d4adea78d839e618c 1 parent 17edec8
Gordon petteyg authored markstory committed
Showing with 13 additions and 13 deletions.
  1. +13 −13 cake/console/libs/tasks/controller.php
26 cake/console/libs/tasks/controller.php
View
@@ -267,10 +267,10 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
$actions .= "\tfunction {$admin}view(\$id = null) {\n";
$actions .= "\t\tif (!\$id) {\n";
if ($wannaUseSession) {
- $actions .= "\t\t\t\$this->Session->setFlash(__('Invalid {$singularHumanName}.', true));\n";
- $actions .= "\t\t\t\$this->redirect(array('action'=>'index'));\n";
+ $actions .= "\t\t\t\$this->Session->setFlash(__('Invalid {$singularHumanName}', true));\n";
+ $actions .= "\t\t\t\$this->redirect(array('action' => 'index'));\n";
} else {
- $actions .= "\t\t\t\$this->flash(__('Invalid {$singularHumanName}', true), array('action'=>'index'));\n";
+ $actions .= "\t\t\t\$this->flash(__('Invalid {$singularHumanName}', true), array('action' => 'index'));\n";
}
$actions .= "\t\t}\n";
$actions .= "\t\t\$this->set('" . $singularName . "', \$this->{$currentModelName}->read(null, \$id));\n";
@@ -285,9 +285,9 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
$actions .= "\t\t\tif (\$this->{$currentModelName}->save(\$this->data)) {\n";
if ($wannaUseSession) {
$actions .= "\t\t\t\t\$this->Session->setFlash(__('The " . $singularHumanName . " has been saved', true));\n";
- $actions .= "\t\t\t\t\$this->redirect(array('action'=>'index'));\n";
+ $actions .= "\t\t\t\t\$this->redirect(array('action' => 'index'));\n";
} else {
- $actions .= "\t\t\t\t\$this->flash(__('{$currentModelName} saved.', true), array('action'=>'index'));\n";
+ $actions .= "\t\t\t\t\$this->flash(__('{$currentModelName} saved.', true), array('action' => 'index'));\n";
}
$actions .= "\t\t\t} else {\n";
if ($wannaUseSession) {
@@ -324,18 +324,18 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
$actions .= "\t\tif (!\$id && empty(\$this->data)) {\n";
if ($wannaUseSession) {
$actions .= "\t\t\t\$this->Session->setFlash(__('Invalid {$singularHumanName}', true));\n";
- $actions .= "\t\t\t\$this->redirect(array('action'=>'index'));\n";
+ $actions .= "\t\t\t\$this->redirect(array('action' => 'index'));\n";
} else {
- $actions .= "\t\t\t\$this->flash(__('Invalid {$singularHumanName}', true), array('action'=>'index'));\n";
+ $actions .= "\t\t\t\$this->flash(__('Invalid {$singularHumanName}', true), array('action' => 'index'));\n";
}
$actions .= "\t\t}\n";
$actions .= "\t\tif (!empty(\$this->data)) {\n";
$actions .= "\t\t\tif (\$this->{$currentModelName}->save(\$this->data)) {\n";
if ($wannaUseSession) {
$actions .= "\t\t\t\t\$this->Session->setFlash(__('The " . $singularHumanName . " has been saved', true));\n";
- $actions .= "\t\t\t\t\$this->redirect(array('action'=>'index'));\n";
+ $actions .= "\t\t\t\t\$this->redirect(array('action' => 'index'));\n";
} else {
- $actions .= "\t\t\t\t\$this->flash(__('The " . $singularHumanName . " has been saved.', true), array('action'=>'index'));\n";
+ $actions .= "\t\t\t\t\$this->flash(__('The " . $singularHumanName . " has been saved.', true), array('action' => 'index'));\n";
}
$actions .= "\t\t\t} else {\n";
if ($wannaUseSession) {
@@ -373,17 +373,17 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
$actions .= "\t\tif (!\$id) {\n";
if ($wannaUseSession) {
$actions .= "\t\t\t\$this->Session->setFlash(__('Invalid id for {$singularHumanName}', true));\n";
- $actions .= "\t\t\t\$this->redirect(array('action'=>'index'));\n";
+ $actions .= "\t\t\t\$this->redirect(array('action' => 'index'));\n";
} else {
- $actions .= "\t\t\t\$this->flash(__('Invalid {$singularHumanName}', true), array('action'=>'index'));\n";
+ $actions .= "\t\t\t\$this->flash(__('Invalid {$singularHumanName}', true), array('action' => 'index'));\n";
}
$actions .= "\t\t}\n";
$actions .= "\t\tif (\$this->{$currentModelName}->del(\$id)) {\n";
if ($wannaUseSession) {
$actions .= "\t\t\t\$this->Session->setFlash(__('{$singularHumanName} deleted', true));\n";
- $actions .= "\t\t\t\$this->redirect(array('action'=>'index'));\n";
+ $actions .= "\t\t\t\$this->redirect(array('action' => 'index'));\n";
} else {
- $actions .= "\t\t\t\$this->flash(__('{$singularHumanName} deleted', true), array('action'=>'index'));\n";
+ $actions .= "\t\t\t\$this->flash(__('{$singularHumanName} deleted', true), array('action' => 'index'));\n";
}
$actions .= "\t\t}\n";
$actions .= "\t}\n";
Please sign in to comment.
Something went wrong with that request. Please try again.