From ccbc6f35f0d6f00c3a598fcfbe3a2646c7edda81 Mon Sep 17 00:00:00 2001 From: davidpersson Date: Sat, 26 Sep 2009 23:08:37 +0200 Subject: [PATCH] Updating all calls to Shell::out(). --- cake/console/libs/bake.php | 2 +- cake/console/libs/console.php | 4 ++-- cake/console/libs/i18n.php | 2 +- cake/console/libs/schema.php | 4 ++-- cake/console/libs/tasks/controller.php | 14 +++++++------- cake/console/libs/tasks/db_config.php | 2 +- cake/console/libs/tasks/extract.php | 18 +++++++++--------- cake/console/libs/tasks/fixture.php | 4 ++-- cake/console/libs/tasks/model.php | 14 +++++++------- cake/console/libs/tasks/plugin.php | 10 +++++----- cake/console/libs/tasks/project.php | 4 ++-- cake/console/libs/tasks/view.php | 12 ++++++------ cake/console/libs/testsuite.php | 12 ++++++------ 13 files changed, 51 insertions(+), 51 deletions(-) diff --git a/cake/console/libs/bake.php b/cake/console/libs/bake.php index 469e952efe2..ec7c8b9f4b8 100644 --- a/cake/console/libs/bake.php +++ b/cake/console/libs/bake.php @@ -225,7 +225,7 @@ function help() { $this->out("\n\tbake model\n\t\tbakes a model. run 'bake model help' for more info"); $this->out("\n\tbake view\n\t\tbakes views. run 'bake view help' for more info"); $this->out("\n\tbake controller\n\t\tbakes a controller. run 'bake controller help' for more info"); - $this->out(""); + $this->out(); } } diff --git a/cake/console/libs/console.php b/cake/console/libs/console.php index 82427d9b462..d8a833731f4 100644 --- a/cake/console/libs/console.php +++ b/cake/console/libs/console.php @@ -238,7 +238,7 @@ function main($command = null) { $this->out("\t$field2: $value2"); } - $this->out(""); + $this->out(); } else { $this->out("\t$field: $value"); } @@ -253,7 +253,7 @@ function main($command = null) { $this->out("\t$field2: $value2"); } - $this->out(""); + $this->out(); } else { $this->out("\t$field: $value"); } diff --git a/cake/console/libs/i18n.php b/cake/console/libs/i18n.php index 5e8d547eda2..d0e428f28b3 100644 --- a/cake/console/libs/i18n.php +++ b/cake/console/libs/i18n.php @@ -128,7 +128,7 @@ function help() { $this->out(__('usage:', true)); $this->out(' cake i18n help'); $this->out(' cake i18n initdb [-datasource custom]'); - $this->out(''); + $this->out(); $this->hr(); $this->Extract->help(); diff --git a/cake/console/libs/schema.php b/cake/console/libs/schema.php index 42c06c9d6f6..59cb1487d98 100644 --- a/cake/console/libs/schema.php +++ b/cake/console/libs/schema.php @@ -371,7 +371,7 @@ function __update(&$Schema, $table = null) { $this->out("\n" . __('The following statements will run.', true)); $this->out(array_map('trim', $contents)); if ('y' == $this->in(__('Are you sure you want to alter the tables?', true), array('y', 'n'), 'n')) { - $this->out(''); + $this->out(); $this->out(__('Updating Database...', true)); $this->__run($contents, 'update', $Schema); } @@ -447,7 +447,7 @@ function help() { $this->out("\n\tschema dump \n\t\tDump database sql based on schema file to . \n\t\tIf is write, schema dump will be written to a file\n\t\tthat has the same name as the app directory."); $this->out("\n\tschema run create \n\t\tDrop and create tables based on schema file\n\t\toptional arg for selecting schema name\n\t\toptional
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"); $this->out("\n\tschema run update
\n\t\talter tables based on schema file\n\t\toptional arg for selecting schema name.\n\t\toptional
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"); - $this->out(""); + $this->out(); $this->_stop(); } } diff --git a/cake/console/libs/tasks/controller.php b/cake/console/libs/tasks/controller.php index 103a1d21010..a9462e6704e 100644 --- a/cake/console/libs/tasks/controller.php +++ b/cake/console/libs/tasks/controller.php @@ -222,7 +222,7 @@ function __interactive() { * @return void **/ function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) { - $this->out(''); + $this->out(); $this->hr(); $this->out(__('The following controller will be created:', true)); $this->hr(); @@ -457,27 +457,27 @@ function help() { $this->out("Usage: cake bake controller ..."); $this->hr(); $this->out('Commands:'); - $this->out(''); + $this->out(); $this->out("controller "); $this->out("\tbakes controller with var \$scaffold"); - $this->out(''); + $this->out(); $this->out("controller public"); $this->out("\tbakes controller with basic crud actions"); $this->out("\t(index, view, add, edit, delete)"); - $this->out(''); + $this->out(); $this->out("controller admin"); $this->out("\tbakes a controller with basic crud actions for"); $this->out("\tConfigure::read('Routing.admin') methods."); - $this->out(''); + $this->out(); $this->out("controller public admin"); $this->out("\tbakes a controller with basic crud actions for"); $this->out("\tConfigure::read('Routing.admin') and non admin methods."); $this->out("\t(index, view, add, edit, delete,"); $this->out("\tadmin_index, admin_view, admin_edit, admin_add, admin_delete)"); - $this->out(''); + $this->out(); $this->out("controller all"); $this->out("\tbakes all controllers with CRUD methods."); - $this->out(""); + $this->out(); $this->_stop(); } } diff --git a/cake/console/libs/tasks/db_config.php b/cake/console/libs/tasks/db_config.php index befedb4c1ad..cc73caf1b21 100644 --- a/cake/console/libs/tasks/db_config.php +++ b/cake/console/libs/tasks/db_config.php @@ -204,7 +204,7 @@ function __interactive() { function __verify($config) { $config = array_merge($this->__defaultConfig, $config); extract($config); - $this->out(''); + $this->out(); $this->hr(); $this->out('The following database configuration will be created:'); $this->hr(); diff --git a/cake/console/libs/tasks/extract.php b/cake/console/libs/tasks/extract.php index 4f02f813385..e5c67d67c31 100644 --- a/cake/console/libs/tasks/extract.php +++ b/cake/console/libs/tasks/extract.php @@ -106,7 +106,7 @@ function execute() { $this->out(__('Extract Aborted', true)); $this->_stop(); } elseif (strtoupper($response) === 'D') { - $this->out(''); + $this->out(); break; } elseif (is_dir($response)) { $this->__paths[] = $response; @@ -114,7 +114,7 @@ function execute() { } else { $this->err(__('The directory path you supplied was not found. Please try again.', true)); } - $this->out(''); + $this->out(); } } @@ -133,7 +133,7 @@ function execute() { } else { $this->err(__('The directory path you supplied was not found. Please try again.', true)); } - $this->out(''); + $this->out(); } } @@ -150,8 +150,8 @@ function execute() { * @access private */ function __extract() { - $this->out(''); - $this->out(''); + $this->out(); + $this->out(); $this->out(__('Extracting...', true)); $this->hr(); $this->out(__('Paths:', true)); @@ -177,7 +177,7 @@ function help() { $this->out(__('By default -app is ROOT/app', true)); $this->hr(); $this->out(__('Usage: cake i18n extract [command] [path...]', true)); - $this->out(''); + $this->out(); $this->out(__('Commands:', true)); $this->out(__(' -app [path...]: directory where your application is located', true)); $this->out(__(' -root [path...]: path to install', true)); @@ -186,7 +186,7 @@ function help() { $this->out(__(' -output [path...]: Full path to output directory', true)); $this->out(__(' -files: [comma separated list of files, full path to file is needed]', true)); $this->out(__(' cake i18n extract help: Shows this help message.', true)); - $this->out(''); + $this->out(); } /** @@ -230,7 +230,7 @@ function __extractTokens() { } $this->__buildFiles(); $this->__writeFiles(); - $this->out(''); + $this->out(); $this->out(__('Done.', true)); } @@ -364,7 +364,7 @@ function __writeFiles() { if ($File->exists()) { $response = ''; while ($response == '') { - $this->out(''); + $this->out(); $response = $this->in(sprintf(__('Error: %s already exists in this location. Overwrite?', true), $filename), array('y', 'n'), 'y'); if (strtoupper($response) === 'N') { $response = ''; diff --git a/cake/console/libs/tasks/fixture.php b/cake/console/libs/tasks/fixture.php index de374dedc7b..672c0735630 100644 --- a/cake/console/libs/tasks/fixture.php +++ b/cake/console/libs/tasks/fixture.php @@ -415,12 +415,12 @@ function help() { $this->out('Commands:'); $this->out("\nfixture \n\tbakes fixture with specified name."); $this->out("\nfixture all\n\tbakes all fixtures."); - $this->out(""); + $this->out(); $this->out('Parameters:'); $this->out("\t-count When using generated data, the number of records to include in the fixture(s)."); $this->out("\t-connection Which database configuration to use for baking."); $this->out("\t-plugin lowercased_underscored name of plugin to bake fixtures for."); - $this->out(""); + $this->out(); $this->_stop(); } } diff --git a/cake/console/libs/tasks/model.php b/cake/console/libs/tasks/model.php index 6dfb2c0811d..4efe1cf9314 100644 --- a/cake/console/libs/tasks/model.php +++ b/cake/console/libs/tasks/model.php @@ -220,7 +220,7 @@ function __interactive() { $associations = $this->doAssociations($tempModel); } - $this->out(''); + $this->out(); $this->hr(); $this->out(__('The following Model will be created:', true)); $this->hr(); @@ -379,7 +379,7 @@ function fieldValidation($fieldName, $metaData, $primaryKey = 'id') { $anotherValidator = 'y'; while ($anotherValidator == 'y') { if ($this->interactive) { - $this->out(''); + $this->out(); $this->out(sprintf(__('Field: %s', true), $fieldName)); $this->out(sprintf(__('Type: %s', true), $metaData['type'])); $this->hr(); @@ -801,7 +801,7 @@ function getTable($modelName, $useDbConfig = null) { $tableIsGood = false; if (array_search($useTable, $this->__tables) === false) { - $this->out(''); + $this->out(); $this->out(sprintf(__("Given your model named '%s',\nCake would expect a database table named '%s'", true), $modelName, $fullTableName)); $tableIsGood = $this->in(__('Do you want to use this table?', true), array('y','n'), 'y'); } @@ -883,16 +883,16 @@ function help() { $this->out("Usage: cake bake model "); $this->hr(); $this->out('Commands:'); - $this->out(''); + $this->out(); $this->out("model"); $this->out("\tbakes model in interactive mode."); - $this->out(''); + $this->out(); $this->out("model "); $this->out("\tbakes model file with no associations or validation"); - $this->out(''); + $this->out(); $this->out("model all"); $this->out("\tbakes all model files with associations and validation"); - $this->out(""); + $this->out(); $this->_stop(); } diff --git a/cake/console/libs/tasks/plugin.php b/cake/console/libs/tasks/plugin.php index 557b60b60bc..702cf0f211c 100644 --- a/cake/console/libs/tasks/plugin.php +++ b/cake/console/libs/tasks/plugin.php @@ -232,19 +232,19 @@ function help() { $this->out("Usage: cake bake plugin ..."); $this->hr(); $this->out('Commands:'); - $this->out(''); + $this->out(); $this->out("plugin "); $this->out("\tbakes plugin directory structure"); - $this->out(''); + $this->out(); $this->out("plugin model"); $this->out("\tbakes model. Run 'cake bake model help' for more info."); - $this->out(''); + $this->out(); $this->out("plugin controller"); $this->out("\tbakes controller. Run 'cake bake controller help' for more info."); - $this->out(''); + $this->out(); $this->out("plugin view"); $this->out("\tbakes view. Run 'cake bake view help' for more info."); - $this->out(""); + $this->out(); $this->_stop(); } } diff --git a/cake/console/libs/tasks/project.php b/cake/console/libs/tasks/project.php index 6fdfde6cea6..7c59849b890 100644 --- a/cake/console/libs/tasks/project.php +++ b/cake/console/libs/tasks/project.php @@ -308,11 +308,11 @@ function help() { $this->out("Usage: cake bake project "); $this->hr(); $this->out('Commands:'); - $this->out(''); + $this->out(); $this->out("project "); $this->out("\tbakes app directory structure."); $this->out("\tif begins with '/' path is absolute."); - $this->out(""); + $this->out(); $this->_stop(); } diff --git a/cake/console/libs/tasks/view.php b/cake/console/libs/tasks/view.php index b79dc0b4b42..54ec5b2ea09 100644 --- a/cake/console/libs/tasks/view.php +++ b/cake/console/libs/tasks/view.php @@ -242,7 +242,7 @@ function __interactive() { $this->bakeActions($adminActions, $vars); } $this->hr(); - $this->out(''); + $this->out(); $this->out(__("View Scaffolding Complete.\n", true)); } else { $this->customAction(); @@ -332,7 +332,7 @@ function customAction() { $this->out(__('The action name you supplied was empty. Please try again.', true)); } } - $this->out(''); + $this->out(); $this->hr(); $this->out(__('The following view will be created:', true)); $this->hr(); @@ -419,7 +419,7 @@ function help() { $this->out("Usage: cake bake view ..."); $this->hr(); $this->out('Commands:'); - $this->out(''); + $this->out(); $this->out("view "); $this->out("\tWill read the given controller for methods"); $this->out("\tand bake corresponding views."); @@ -427,14 +427,14 @@ function help() { $this->out("\tthat begin with Routing.admin."); $this->out("\tIf var scaffold is found it will bake the CRUD actions"); $this->out("\t(index,view,add,edit)"); - $this->out(''); + $this->out(); $this->out("view "); $this->out("\tWill bake a template. core templates: (index, add, edit, view)"); - $this->out(''); + $this->out(); $this->out("view