Skip to content
This repository
Browse code

Updating all calls to Shell::out().

  • Loading branch information...
commit ccbc6f35f0d6f00c3a598fcfbe3a2646c7edda81 1 parent 0f6bca7
David Persson authored September 26, 2009
2  cake/console/libs/bake.php
@@ -225,7 +225,7 @@ function help() {
225 225
 		$this->out("\n\tbake model\n\t\tbakes a model. run 'bake model help' for more info");
226 226
 		$this->out("\n\tbake view\n\t\tbakes views. run 'bake view help' for more info");
227 227
 		$this->out("\n\tbake controller\n\t\tbakes a controller. run 'bake controller help' for more info");
228  
-		$this->out("");
  228
+		$this->out();
229 229
 
230 230
 	}
231 231
 }
4  cake/console/libs/console.php
@@ -238,7 +238,7 @@ function main($command = null) {
238 238
 													$this->out("\t$field2: $value2");
239 239
 												}
240 240
 
241  
-												$this->out("");
  241
+												$this->out();
242 242
 											} else {
243 243
 												$this->out("\t$field: $value");
244 244
 											}
@@ -253,7 +253,7 @@ function main($command = null) {
253 253
 												$this->out("\t$field2: $value2");
254 254
 											}
255 255
 
256  
-											$this->out("");
  256
+											$this->out();
257 257
 										} else {
258 258
 											$this->out("\t$field: $value");
259 259
 										}
2  cake/console/libs/i18n.php
@@ -128,7 +128,7 @@ function help() {
128 128
 		$this->out(__('usage:', true));
129 129
 		$this->out('   cake i18n help');
130 130
 		$this->out('   cake i18n initdb [-datasource custom]');
131  
-		$this->out('');
  131
+		$this->out();
132 132
 		$this->hr();
133 133
 
134 134
 		$this->Extract->help();
4  cake/console/libs/schema.php
@@ -371,7 +371,7 @@ function __update(&$Schema, $table = null) {
371 371
 		$this->out("\n" . __('The following statements will run.', true));
372 372
 		$this->out(array_map('trim', $contents));
373 373
 		if ('y' == $this->in(__('Are you sure you want to alter the tables?', true), array('y', 'n'), 'n')) {
374  
-			$this->out('');
  374
+			$this->out();
375 375
 			$this->out(__('Updating Database...', true));
376 376
 			$this->__run($contents, 'update', $Schema);
377 377
 		}
@@ -447,7 +447,7 @@ function help() {
447 447
 		$this->out("\n\tschema dump <filename>\n\t\tDump database sql based on schema file to <filename>. \n\t\tIf <filename> is write, schema dump will be written to a file\n\t\tthat has the same name as the app directory.");
448 448
 		$this->out("\n\tschema run create <schema> <table>\n\t\tDrop and create tables based on schema file\n\t\toptional <schema> arg for selecting schema name\n\t\toptional <table> arg for creating only one table\n\t\tpass the -s param with a number to use a snapshot\n\t\tTo see the changes, perform a dry run with the -dry param");
449 449
 		$this->out("\n\tschema run update <schema> <table>\n\t\talter tables based on schema file\n\t\toptional <schema> arg for selecting schema name.\n\t\toptional <table> arg for altering only one table.\n\t\tTo use a snapshot, pass the -s param with the snapshot number\n\t\tTo see the changes, perform a dry run with the -dry param");
450  
-		$this->out("");
  450
+		$this->out();
451 451
 		$this->_stop();
452 452
 	}
453 453
 }
14  cake/console/libs/tasks/controller.php
@@ -222,7 +222,7 @@ function __interactive() {
222 222
  * @return void
223 223
  **/
224 224
 	function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) {
225  
-		$this->out('');
  225
+		$this->out();
226 226
 		$this->hr();
227 227
 		$this->out(__('The following controller will be created:', true));
228 228
 		$this->hr();
@@ -457,27 +457,27 @@ function help() {
457 457
 		$this->out("Usage: cake bake controller <arg1> <arg2>...");
458 458
 		$this->hr();
459 459
 		$this->out('Commands:');
460  
-		$this->out('');
  460
+		$this->out();
461 461
 		$this->out("controller <name>");
462 462
 		$this->out("\tbakes controller with var \$scaffold");
463  
-		$this->out('');
  463
+		$this->out();
464 464
 		$this->out("controller <name> public");
465 465
 		$this->out("\tbakes controller with basic crud actions");
466 466
 		$this->out("\t(index, view, add, edit, delete)");
467  
-		$this->out('');
  467
+		$this->out();
468 468
 		$this->out("controller <name> admin");
469 469
 		$this->out("\tbakes a controller with basic crud actions for");
470 470
 		$this->out("\tConfigure::read('Routing.admin') methods.");
471  
-		$this->out('');
  471
+		$this->out();
472 472
 		$this->out("controller <name> public admin");
473 473
 		$this->out("\tbakes a controller with basic crud actions for");
474 474
 		$this->out("\tConfigure::read('Routing.admin') and non admin methods.");
475 475
 		$this->out("\t(index, view, add, edit, delete,");
476 476
 		$this->out("\tadmin_index, admin_view, admin_edit, admin_add, admin_delete)");
477  
-		$this->out('');
  477
+		$this->out();
478 478
 		$this->out("controller all");
479 479
 		$this->out("\tbakes all controllers with CRUD methods.");
480  
-		$this->out("");
  480
+		$this->out();
481 481
 		$this->_stop();
482 482
 	}
483 483
 }
2  cake/console/libs/tasks/db_config.php
@@ -204,7 +204,7 @@ function __interactive() {
204 204
 	function __verify($config) {
205 205
 		$config = array_merge($this->__defaultConfig, $config);
206 206
 		extract($config);
207  
-		$this->out('');
  207
+		$this->out();
208 208
 		$this->hr();
209 209
 		$this->out('The following database configuration will be created:');
210 210
 		$this->hr();
18  cake/console/libs/tasks/extract.php
@@ -106,7 +106,7 @@ function execute() {
106 106
 					$this->out(__('Extract Aborted', true));
107 107
 					$this->_stop();
108 108
 				} elseif (strtoupper($response) === 'D') {
109  
-					$this->out('');
  109
+					$this->out();
110 110
 					break;
111 111
 				} elseif (is_dir($response)) {
112 112
 					$this->__paths[] = $response;
@@ -114,7 +114,7 @@ function execute() {
114 114
 				} else {
115 115
 					$this->err(__('The directory path you supplied was not found. Please try again.', true));
116 116
 				}
117  
-				$this->out('');
  117
+				$this->out();
118 118
 			}
119 119
 		}
120 120
 
@@ -133,7 +133,7 @@ function execute() {
133 133
 				} else {
134 134
 					$this->err(__('The directory path you supplied was not found. Please try again.', true));
135 135
 				}
136  
-				$this->out('');
  136
+				$this->out();
137 137
 			}
138 138
 		}
139 139
 
@@ -150,8 +150,8 @@ function execute() {
150 150
  * @access private
151 151
  */
152 152
 	function __extract() {
153  
-		$this->out('');
154  
-		$this->out('');
  153
+		$this->out();
  154
+		$this->out();
155 155
 		$this->out(__('Extracting...', true));
156 156
 		$this->hr();
157 157
 		$this->out(__('Paths:', true));
@@ -177,7 +177,7 @@ function help() {
177 177
 		$this->out(__('By default -app is ROOT/app', true));
178 178
 		$this->hr();
179 179
 		$this->out(__('Usage: cake i18n extract [command] [path...]', true));
180  
-		$this->out('');
  180
+		$this->out();
181 181
 		$this->out(__('Commands:', true));
182 182
 		$this->out(__('   -app [path...]: directory where your application is located', true));
183 183
 		$this->out(__('   -root [path...]: path to install', true));
@@ -186,7 +186,7 @@ function help() {
186 186
 		$this->out(__('   -output [path...]: Full path to output directory', true));
187 187
 		$this->out(__('   -files: [comma separated list of files, full path to file is needed]', true));
188 188
 		$this->out(__('   cake i18n extract help: Shows this help message.', true));
189  
-		$this->out('');
  189
+		$this->out();
190 190
 	}
191 191
 
192 192
 /**
@@ -230,7 +230,7 @@ function __extractTokens() {
230 230
 		}
231 231
 		$this->__buildFiles();
232 232
 		$this->__writeFiles();
233  
-		$this->out('');
  233
+		$this->out();
234 234
 		$this->out(__('Done.', true));
235 235
 	}
236 236
 
@@ -364,7 +364,7 @@ function __writeFiles() {
364 364
 			if ($File->exists()) {
365 365
 				$response = '';
366 366
 				while ($response == '') {
367  
-					$this->out('');
  367
+					$this->out();
368 368
 					$response = $this->in(sprintf(__('Error: %s already exists in this location. Overwrite?', true), $filename), array('y', 'n'), 'y');
369 369
 					if (strtoupper($response) === 'N') {
370 370
 						$response = '';
4  cake/console/libs/tasks/fixture.php
@@ -415,12 +415,12 @@ function help() {
415 415
 		$this->out('Commands:');
416 416
 		$this->out("\nfixture <name>\n\tbakes fixture with specified name.");
417 417
 		$this->out("\nfixture all\n\tbakes all fixtures.");
418  
-		$this->out("");
  418
+		$this->out();
419 419
 		$this->out('Parameters:');
420 420
 		$this->out("\t-count       When using generated data, the number of records to include in the fixture(s).");
421 421
 		$this->out("\t-connection  Which database configuration to use for baking.");
422 422
 		$this->out("\t-plugin      lowercased_underscored name of plugin to bake fixtures for.");
423  
-		$this->out("");
  423
+		$this->out();
424 424
 		$this->_stop();
425 425
 	}
426 426
 }
14  cake/console/libs/tasks/model.php
@@ -220,7 +220,7 @@ function __interactive() {
220 220
 			$associations = $this->doAssociations($tempModel);
221 221
 		}
222 222
 
223  
-		$this->out('');
  223
+		$this->out();
224 224
 		$this->hr();
225 225
 		$this->out(__('The following Model will be created:', true));
226 226
 		$this->hr();
@@ -379,7 +379,7 @@ function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
379 379
 		$anotherValidator = 'y';
380 380
 		while ($anotherValidator == 'y') {
381 381
 			if ($this->interactive) {
382  
-				$this->out('');
  382
+				$this->out();
383 383
 				$this->out(sprintf(__('Field: %s', true), $fieldName));
384 384
 				$this->out(sprintf(__('Type: %s', true), $metaData['type']));
385 385
 				$this->hr();
@@ -801,7 +801,7 @@ function getTable($modelName, $useDbConfig = null) {
801 801
 		$tableIsGood = false;
802 802
 
803 803
 		if (array_search($useTable, $this->__tables) === false) {
804  
-			$this->out('');
  804
+			$this->out();
805 805
 			$this->out(sprintf(__("Given your model named '%s',\nCake would expect a database table named '%s'", true), $modelName, $fullTableName));
806 806
 			$tableIsGood = $this->in(__('Do you want to use this table?', true), array('y','n'), 'y');
807 807
 		}
@@ -883,16 +883,16 @@ function help() {
883 883
 		$this->out("Usage: cake bake model <arg1>");
884 884
 		$this->hr();
885 885
 		$this->out('Commands:');
886  
-		$this->out('');
  886
+		$this->out();
887 887
 		$this->out("model");
888 888
 		$this->out("\tbakes model in interactive mode.");
889  
-		$this->out('');
  889
+		$this->out();
890 890
 		$this->out("model <name>");
891 891
 		$this->out("\tbakes model file with no associations or validation");
892  
-		$this->out('');
  892
+		$this->out();
893 893
 		$this->out("model all");
894 894
 		$this->out("\tbakes all model files with associations and validation");
895  
-		$this->out("");
  895
+		$this->out();
896 896
 		$this->_stop();
897 897
 	}
898 898
 
10  cake/console/libs/tasks/plugin.php
@@ -232,19 +232,19 @@ function help() {
232 232
 		$this->out("Usage: cake bake plugin <arg1> <arg2>...");
233 233
 		$this->hr();
234 234
 		$this->out('Commands:');
235  
-		$this->out('');
  235
+		$this->out();
236 236
 		$this->out("plugin <name>");
237 237
 		$this->out("\tbakes plugin directory structure");
238  
-		$this->out('');
  238
+		$this->out();
239 239
 		$this->out("plugin <name> model");
240 240
 		$this->out("\tbakes model. Run 'cake bake model help' for more info.");
241  
-		$this->out('');
  241
+		$this->out();
242 242
 		$this->out("plugin <name> controller");
243 243
 		$this->out("\tbakes controller. Run 'cake bake controller help' for more info.");
244  
-		$this->out('');
  244
+		$this->out();
245 245
 		$this->out("plugin <name> view");
246 246
 		$this->out("\tbakes view. Run 'cake bake view help' for more info.");
247  
-		$this->out("");
  247
+		$this->out();
248 248
 		$this->_stop();
249 249
 	}
250 250
 }
4  cake/console/libs/tasks/project.php
@@ -308,11 +308,11 @@ function help() {
308 308
 		$this->out("Usage: cake bake project <arg1>");
309 309
 		$this->hr();
310 310
 		$this->out('Commands:');
311  
-		$this->out('');
  311
+		$this->out();
312 312
 		$this->out("project <name>");
313 313
 		$this->out("\tbakes app directory structure.");
314 314
 		$this->out("\tif <name> begins with '/' path is absolute.");
315  
-		$this->out("");
  315
+		$this->out();
316 316
 		$this->_stop();
317 317
 	}
318 318
 
12  cake/console/libs/tasks/view.php
@@ -242,7 +242,7 @@ function __interactive() {
242 242
 				$this->bakeActions($adminActions, $vars);
243 243
 			}
244 244
 			$this->hr();
245  
-			$this->out('');
  245
+			$this->out();
246 246
 			$this->out(__("View Scaffolding Complete.\n", true));
247 247
 		} else {
248 248
 			$this->customAction();
@@ -332,7 +332,7 @@ function customAction() {
332 332
 				$this->out(__('The action name you supplied was empty. Please try again.', true));
333 333
 			}
334 334
 		}
335  
-		$this->out('');
  335
+		$this->out();
336 336
 		$this->hr();
337 337
 		$this->out(__('The following view will be created:', true));
338 338
 		$this->hr();
@@ -419,7 +419,7 @@ function help() {
419 419
 		$this->out("Usage: cake bake view <arg1> <arg2>...");
420 420
 		$this->hr();
421 421
 		$this->out('Commands:');
422  
-		$this->out('');
  422
+		$this->out();
423 423
 		$this->out("view <controller>");
424 424
 		$this->out("\tWill read the given controller for methods");
425 425
 		$this->out("\tand bake corresponding views.");
@@ -427,14 +427,14 @@ function help() {
427 427
 		$this->out("\tthat begin with Routing.admin.");
428 428
 		$this->out("\tIf var scaffold is found it will bake the CRUD actions");
429 429
 		$this->out("\t(index,view,add,edit)");
430  
-		$this->out('');
  430
+		$this->out();
431 431
 		$this->out("view <controller> <action>");
432 432
 		$this->out("\tWill bake a template. core templates: (index, add, edit, view)");
433  
-		$this->out('');
  433
+		$this->out();
434 434
 		$this->out("view <controller> <template> <alias>");
435 435
 		$this->out("\tWill use the template specified");
436 436
 		$this->out("\tbut name the file based on the alias");
437  
-		$this->out('');
  437
+		$this->out();
438 438
 		$this->out("view all");
439 439
 		$this->out("\tBake all CRUD action views for all controllers.");
440 440
 		$this->out("\tRequires that models and controllers exist.");
12  cake/console/libs/testsuite.php
@@ -170,28 +170,28 @@ function help() {
170 170
 		$this->out("\t\t- category - \"app\", \"core\" or name of a plugin");
171 171
 		$this->out("\t\t- test_type - \"case\", \"group\" or \"all\"");
172 172
 		$this->out("\t\t- test_file - file name with folder prefix and without the (test|group).php suffix");
173  
-		$this->out('');
  173
+		$this->out();
174 174
 		$this->out('Examples: ');
175 175
 		$this->out("\t\tcake testsuite app all");
176 176
 		$this->out("\t\tcake testsuite core all");
177  
-		$this->out('');
  177
+		$this->out();
178 178
 		$this->out("\t\tcake testsuite app case behaviors/debuggable");
179 179
 		$this->out("\t\tcake testsuite app case models/my_model");
180 180
 		$this->out("\t\tcake testsuite app case controllers/my_controller");
181  
-		$this->out('');
  181
+		$this->out();
182 182
 		$this->out("\t\tcake testsuite core case file");
183 183
 		$this->out("\t\tcake testsuite core case router");
184 184
 		$this->out("\t\tcake testsuite core case set");
185  
-		$this->out('');
  185
+		$this->out();
186 186
 		$this->out("\t\tcake testsuite app group mygroup");
187 187
 		$this->out("\t\tcake testsuite core group acl");
188 188
 		$this->out("\t\tcake testsuite core group socket");
189  
-		$this->out('');
  189
+		$this->out();
190 190
 		$this->out("\t\tcake testsuite bugs case models/bug");
191 191
 		$this->out("\t\t  // for the plugin 'bugs' and its test case 'models/bug'");
192 192
 		$this->out("\t\tcake testsuite bugs group bug");
193 193
 		$this->out("\t\t  // for the plugin bugs and its test group 'bug'");
194  
-		$this->out('');
  194
+		$this->out();
195 195
 		$this->out('Code Coverage Analysis: ');
196 196
 		$this->out("\n\nAppend 'cov' to any of the above in order to enable code coverage analysis");
197 197
 	}

0 notes on commit ccbc6f3

Please sign in to comment.
Something went wrong with that request. Please try again.