Skip to content

Commit

Permalink
Update help/option parser for FixtureTask.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 18, 2014
1 parent 2bd7408 commit ac1cb87
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions src/Console/Command/Task/FixtureTask.php
@@ -1,7 +1,5 @@
<?php
/**
* The FixtureTask handles creating and updating fixture files.
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
Expand All @@ -24,7 +22,6 @@

/**
* Task class for creating and updating fixtures files.
*
*/
class FixtureTask extends BakeTask {

Expand All @@ -42,13 +39,6 @@ class FixtureTask extends BakeTask {
*/
public $path = null;

/**
* Schema instance
*
* @var \Cake\Model\Schema
*/
protected $_Schema = null;

/**
* Override initialize
*
Expand All @@ -73,34 +63,32 @@ public function getOptionParser() {
__d('cake_console', 'Generate fixtures for use with the test suite. You can use `bake fixture all` to bake all fixtures.')
)->addArgument('name', [
'help' => __d('cake_console', 'Name of the fixture to bake. Can use Plugin.name to bake plugin fixtures.')
])->addOption('count', [
'help' => __d('cake_console', 'When using generated data, the number of records to include in the fixture(s).'),
'short' => 'n',
'default' => 10
])->addOption('connection', [
'help' => __d('cake_console', 'Which database configuration to use for baking.'),
'short' => 'c',
'default' => 'default'
])->addOption('plugin', [
'help' => __d('cake_console', 'CamelCased name of the plugin to bake fixtures for.'),
'short' => 'p',
])->addOption('schema', [
'help' => __d('cake_console', 'Importing schema for fixtures rather than hardcoding it.'),
'short' => 's',
'boolean' => true
])->addOption('theme', [
'short' => 't',
'help' => __d('cake_console', 'Theme to use when baking code.')
])->addOption('force', [
'short' => 'f',
'help' => __d('cake_console', 'Force overwriting existing files without prompting.')
])->addOption('count', [
'help' => __d('cake_console', 'When using generated data, the number of records to include in the fixture(s).'),
'short' => 'n',
'default' => 10
])->addOption('schema', [
'help' => __d('cake_console', 'Create a fixture that imports schema, instead of dumping a schema snapshot into the fixture.'),
'short' => 's',
'boolean' => true
])->addOption('records', [
'help' => __d('cake_console', 'Used with --count and <name>/all commands to pull [n] records from the live tables, where [n] is either --count or the default of 10.'),
'short' => 'r',
'boolean' => true
])->epilog(
__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.')
);
]);

return $parser;
}
Expand Down

0 comments on commit ac1cb87

Please sign in to comment.