Skip to content

Commit 4c76b2f

Browse files
committed
Unifying formatting of help() messages.
1 parent 03e7ca7 commit 4c76b2f

File tree

4 files changed

+43
-13
lines changed

4 files changed

+43
-13
lines changed

cake/console/libs/tasks/controller.php

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,24 @@ function help() {
442442
$this->out("Usage: cake bake controller <arg1> <arg2>...");
443443
$this->hr();
444444
$this->out('Commands:');
445-
$this->out("\n\tcontroller <name>\n\t\tbakes controller with var \$scaffold");
446-
$this->out("\n\tcontroller <name> scaffold\n\t\tbakes controller with scaffold actions.\n\t\t(index, view, add, edit, delete)");
447-
$this->out("\n\tcontroller <name> scaffold admin\n\t\tbakes a controller with scaffold actions for both public and Configure::read('Routing.admin')");
448-
$this->out("\n\tcontroller <name> admin\n\t\tbakes a controller with scaffold actions only for Configure::read('Routing.admin')");
449-
$this->out("\n\tcontroller all\n\t\tbakes all controllers with CRUD methods.");
445+
$this->out('');
446+
$this->out("controller <name>");
447+
$this->out("\tbakes controller with var \$scaffold");
448+
$this->out('');
449+
$this->out("controller <name> scaffold");
450+
$this->out("\tbakes controller with scaffold actions.");
451+
$this->out("\t(index, view, add, edit, delete)");
452+
$this->out('');
453+
$this->out("controller <name> scaffold admin");
454+
$this->out("\tbakes a controller with scaffold actions for both public");
455+
$this->out("\tand Configure::read('Routing.admin')");
456+
$this->out('');
457+
$this->out("controller <name> admin");
458+
$this->out("\tbakes a controller with scaffold actions only for");
459+
$this->out("\tConfigure::read('Routing.admin')");
460+
$this->out('');
461+
$this->out("controller all");
462+
$this->out("\tbakes all controllers with CRUD methods.");
450463
$this->out("");
451464
$this->_stop();
452465
}

cake/console/libs/tasks/model.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -846,9 +846,15 @@ function help() {
846846
$this->out("Usage: cake bake model <arg1>");
847847
$this->hr();
848848
$this->out('Commands:');
849-
$this->out("\n\tmodel\n\t\tbakes model in interactive mode.");
850-
$this->out("\n\tmodel <name>\n\t\tbakes model file with no associations or validation");
851-
$this->out("\n\tmodel all\n\t\tbakes all model files with associations and validation");
849+
$this->out('');
850+
$this->out("model");
851+
$this->out("\tbakes model in interactive mode.");
852+
$this->out('');
853+
$this->out("model <name>");
854+
$this->out("\tbakes model file with no associations or validation");
855+
$this->out('');
856+
$this->out("model all");
857+
$this->out("\tbakes all model files with associations and validation");
852858
$this->out("");
853859
$this->_stop();
854860
}

cake/console/libs/tasks/plugin.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,18 @@ function help() {
191191
$this->out("Usage: cake bake plugin <arg1> <arg2>...");
192192
$this->hr();
193193
$this->out('Commands:');
194-
$this->out("\n\tplugin <name>\n\t\tbakes plugin directory structure");
195-
$this->out("\n\tplugin <name> model\n\t\tbakes model. Run 'cake bake model help' for more info.");
196-
$this->out("\n\tplugin <name> controller\n\t\tbakes controller. Run 'cake bake controller help' for more info.");
197-
$this->out("\n\tplugin <name> view\n\t\tbakes view. Run 'cake bake view help' for more info.");
194+
$this->out('');
195+
$this->out("plugin <name>");
196+
$this->out("\tbakes plugin directory structure");
197+
$this->out('');
198+
$this->out("plugin <name> model");
199+
$this->out("\tbakes model. Run 'cake bake model help' for more info.");
200+
$this->out('');
201+
$this->out("plugin <name> controller");
202+
$this->out("\tbakes controller. Run 'cake bake controller help' for more info.");
203+
$this->out('');
204+
$this->out("plugin <name> view");
205+
$this->out("\tbakes view. Run 'cake bake view help' for more info.");
198206
$this->out("");
199207
$this->_stop();
200208
}

cake/console/libs/tasks/project.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,10 @@ function help() {
273273
$this->out("Usage: cake bake project <arg1>");
274274
$this->hr();
275275
$this->out('Commands:');
276-
$this->out("\n\tproject <name>\n\t\tbakes app directory structure.\n\t\tif <name> begins with '/' path is absolute.");
276+
$this->out('');
277+
$this->out("project <name>");
278+
$this->out("\tbakes app directory structure.");
279+
$this->out("\tif <name> begins with '/' path is absolute.");
277280
$this->out("");
278281
$this->_stop();
279282
}

0 commit comments

Comments
 (0)