Permalink
Browse files

Fixed some API doc in console.

  • Loading branch information...
1 parent f9373ff commit a0ee8b49feed1d49c30af90ae99d688e8a01059e @jrbasso jrbasso committed Jul 29, 2011
@@ -58,6 +58,7 @@ class AclShell extends Shell {
/**
* Override startup of the Shell
*
+ * @return void
*/
public function startup() {
parent::startup();
@@ -96,6 +97,7 @@ public function startup() {
/**
* Override main() for help message hook
*
+ * @return voids
@renan

renan Jul 29, 2011

Member

One little typo in here.

@jrbasso

jrbasso Jul 29, 2011

Member

Thanks! I will fix in my next push.

*/
public function main() {
$this->out($this->OptionParser->help());
@@ -104,6 +106,7 @@ public function main() {
/**
* Creates an ARO/ACO node
*
+ * @return void
*/
public function create() {
extract($this->__dataVars());
@@ -136,6 +139,7 @@ public function create() {
/**
* Delete an ARO/ACO node.
*
+ * @return void
*/
public function delete() {
extract($this->__dataVars());
@@ -152,6 +156,7 @@ public function delete() {
/**
* Set parent for an ARO/ACO node.
*
+ * @return void
*/
public function setParent() {
extract($this->__dataVars());
@@ -175,6 +180,7 @@ public function setParent() {
/**
* Get path to specified ARO/ACO node.
*
+ * @return void
*/
public function getPath() {
extract($this->__dataVars());
@@ -217,6 +223,7 @@ protected function _outputNode($class, $node, $indent) {
/**
* Check permission for a given ARO to a given ACO.
*
+ * @return void
*/
public function check() {
extract($this->__getParams());
@@ -231,6 +238,7 @@ public function check() {
/**
* Grant permission for a given ARO to a given ACO.
*
+ * @return void
*/
public function grant() {
extract($this->__getParams());
@@ -245,6 +253,7 @@ public function grant() {
/**
* Deny access for an ARO to an ACO.
*
+ * @return void
*/
public function deny() {
extract($this->__getParams());
@@ -259,6 +268,7 @@ public function deny() {
/**
* Set an ARO to inherit permission to an ACO.
*
+ * @return void
*/
public function inherit() {
extract($this->__getParams());
@@ -273,6 +283,7 @@ public function inherit() {
/**
* Show a specific ARO/ACO node.
*
+ * @return void
*/
public function view() {
extract($this->__dataVars());
@@ -332,6 +343,7 @@ public function view() {
/**
* Initialize ACL database.
*
+ * @return mixed
*/
public function initdb() {
return $this->dispatchShell('schema create DbAcl');
@@ -493,8 +505,6 @@ public function getOptionParser() {
/**
* Checks that given node exists
*
- * @param string $type Node type (ARO/ACO)
- * @param integer $id Node id
* @return boolean Success
*/
public function nodeExists() {
@@ -36,6 +36,7 @@ class ApiShell extends Shell {
/**
* Override initialize of the Shell
*
+ * @return void
*/
public function initialize() {
$this->paths = array_merge($this->paths, array(
@@ -53,6 +54,7 @@ public function initialize() {
/**
* Override main() to handle action
*
+ * @return void
*/
public function main() {
if (empty($this->args)) {
@@ -150,6 +152,7 @@ public function getOptionParser() {
/**
* Show help for this shell.
*
+ * @return void
*/
public function help() {
$head = "Usage: cake api [<type>] <className> [-m <method>]\n";
@@ -187,7 +190,7 @@ public function help() {
* Parse a given class (located on given file) and get public methods and their
* signatures.
*
- * @param object $File File object
+ * @param string $path File path
* @param string $class Class name
* @return array Methods and signatures indexed by method name
*/
@@ -47,6 +47,7 @@ class BakeShell extends Shell {
/**
* Assign $this->connection to the active task if a connection param is set.
*
+ * @return void
*/
public function startup() {
parent::startup();
@@ -61,6 +62,7 @@ public function startup() {
/**
* Override main() to handle action
*
+ * @return mixed
*/
public function main() {
if (!is_dir($this->DbConfig->path)) {
@@ -124,6 +126,7 @@ public function main() {
/**
* Quickly bake the MVC
*
+ * @return void
*/
public function all() {
$this->out('Bake All');
@@ -98,6 +98,9 @@ protected function _getShellList() {
/**
* Scan the provided paths for shells, and append them into $shellList
*
+ * @param string $type
+ * @param array $shells
+ * @param array $shellList
* @return array
*/
protected function _appendShells($type, $shells, $shellList) {
@@ -111,6 +114,7 @@ protected function _appendShells($type, $shells, $shellList) {
/**
* Output text.
*
+ * @param array $shellList
* @return void
*/
protected function _asText($shellList) {
@@ -146,6 +150,7 @@ protected function _asText($shellList) {
/**
* Generates the shell list sorted by where the shells are found.
*
+ * @param array $shellList
* @return void
*/
protected function _asSorted($shellList) {
@@ -184,6 +189,7 @@ protected function _asSorted($shellList) {
/**
* Output as XML
*
+ * @param array $shellList
* @return void
*/
protected function _asXml($shellList) {
@@ -47,6 +47,7 @@ class ConsoleShell extends Shell {
/**
* Override initialize of the Shell
*
+ * @return void
*/
public function initialize() {
App::uses('Dispatcher', 'Routing');
@@ -71,6 +72,7 @@ public function initialize() {
/**
* Prints the help message
*
+ * @return void
*/
public function help() {
$out = 'Console help:';
@@ -133,6 +135,8 @@ public function help() {
/**
* Override main() to handle action
*
+ * @param string $command
+ * @return void
*/
public function main($command = null) {
while (true) {
@@ -40,6 +40,7 @@ class I18nShell extends Shell {
/**
* Override startup of the Shell
*
+ * @return mixed
*/
public function startup() {
$this->_welcome();
@@ -58,6 +59,7 @@ public function startup() {
/**
* Override main() for help message hook
*
+ * @return void
*/
public function main() {
$this->out(__d('cake_console', '<info>I18n Shell</info>'));
@@ -91,6 +93,7 @@ public function main() {
/**
* Initialize I18N database.
*
+ * @return void
*/
public function initdb() {
$this->dispatchShell('schema create i18n');
@@ -47,6 +47,7 @@ class SchemaShell extends Shell {
/**
* Override initialize
*
+ * @return string
*/
public function initialize() {
$this->_welcome();
@@ -57,6 +58,7 @@ public function initialize() {
/**
* Override startup
*
+ * @return void
*/
public function startup() {
$name = $path = $connection = $plugin = null;
@@ -103,6 +105,7 @@ public function startup() {
* Read and output contents of schema object
* path to read as second arg
*
+ * @return void
*/
public function view() {
$File = new File($this->Schema->path . DS . $this->params['file']);
@@ -120,6 +123,7 @@ public function view() {
* Read database and Write schema object
* accepts a connection as first arg or path to save as second arg
*
+ * @return void
*/
public function generate() {
$this->out(__d('cake_console', 'Generating Schema...'));
@@ -197,6 +201,7 @@ public function generate() {
* If -write contains a full path name the file will be saved there. If -write only
* contains no DS, that will be used as the file name, in the same dir as the schema file.
*
+ * @return string
*/
public function dump() {
$write = false;
@@ -300,6 +305,9 @@ function _loadSchema() {
* Create database from Schema object
* Should be called via the run method
*
+ * @param CakeSchema $Schema
+ * @param string $table
+ * @return void
*/
function __create($Schema, $table = null) {
$db = ConnectionManager::getDataSource($this->Schema->connection);
@@ -342,6 +350,9 @@ function __create($Schema, $table = null) {
* Update database with Schema object
* Should be called via the run method
*
+ * @param CakeSchema $Schema
+ * @param string $table
+ * @return void
*/
function __update(&$Schema, $table = null) {
$db = ConnectionManager::getDataSource($this->Schema->connection);
@@ -383,6 +394,10 @@ function __update(&$Schema, $table = null) {
/**
* Runs sql from __create() or __update()
*
+ * @param array $contents
+ * @param string $event
+ * @param CakeSchema $Schema
+ * @return void
*/
function __run($contents, $event, &$Schema) {
if (empty($contents)) {
@@ -43,6 +43,7 @@ class ControllerTask extends BakeTask {
/**
* Override initialize
*
+ * @return void
*/
public function initialize() {
$this->path = current(App::path('Controller'));
@@ -51,6 +52,7 @@ public function initialize() {
/**
* Execution method always used for tasks
*
+ * @return void
*/
public function execute() {
parent::execute();
@@ -203,6 +205,10 @@ protected function _interactive() {
/**
* Confirm a to be baked controller with the user
*
+ * @param string $controllerName
+ * @param string $useDynamicScaffold
+ * @param array $helpers
+ * @param array $components
* @return void
*/
public function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) {
@@ -299,7 +305,6 @@ public function bakeActions($controllerName, $admin = null, $wannaUseSession = t
* @param string $actions Actions to add, or set the whole controller to use $scaffold (set $actions to 'scaffold')
* @param array $helpers Helpers to use in controller
* @param array $components Components to use in controller
- * @param array $uses Models to use in controller
* @return string Baked controller
*/
public function bake($controllerName, $actions = '', $helpers = null, $components = null) {
@@ -378,7 +383,6 @@ protected function _doPropertyChoices($prompt, $example) {
* Outputs and gets the list of possible controllers from database
*
* @param string $useDbConfig Database configuration name
- * @param boolean $interactive Whether you are using listAll interactively and want options output.
* @return array Set of controllers
*/
public function listAll($useDbConfig = null) {
@@ -462,6 +466,7 @@ public function getOptionParser() {
/**
* Displays help contents
*
+ * @return void
*/
public function help() {
$this->hr();
@@ -60,7 +60,7 @@ class DbConfigTask extends Shell {
/**
* initialization callback
*
- * @var string
+ * @return void
*/
public function initialize() {
$this->path = APP . 'Config' . DS;
@@ -69,6 +69,7 @@ public function initialize() {
/**
* Execution method always used for tasks
*
+ * @return void
*/
public function execute() {
if (empty($this->args)) {
@@ -197,6 +198,7 @@ protected function _interactive() {
/**
* Output verification message and bake if it looks good
*
+ * @param array $config
* @return boolean True if user says it looks good, false otherwise
*/
protected function _verify($config) {
Oops, something went wrong.

0 comments on commit a0ee8b4

Please sign in to comment.