Skip to content

Commit

Permalink
Fix API doc errors in Console/ and TestSuite/
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 8, 2014
1 parent 244aa06 commit 2d71a81
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 44 deletions.
4 changes: 2 additions & 2 deletions src/Console/Command/OrmCacheShell.php
Expand Up @@ -32,7 +32,7 @@ class OrmCacheShell extends Shell {
/**
* Build metadata.
*
* @param $name string
* @param string $name The name of the table to build cache data for.
* @return bool
*/
public function build($name = null) {
Expand All @@ -59,7 +59,7 @@ public function build($name = null) {
/**
* Clear metadata.
*
* @param $name string
* @param string $name The name of the table to clear cache data for.
* @return bool
*/
public function clear($name = null) {
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command/Task/ControllerTask.php
Expand Up @@ -41,6 +41,7 @@ class ControllerTask extends BakeTask {
/**
* Execution method always used for tasks
*
* @param string $name The name of the controller to bake.
* @return void
*/
public function main($name = null) {
Expand Down Expand Up @@ -233,7 +234,6 @@ public function getHelpers() {
/**
* Outputs and gets the list of possible controllers from database
*
* @param string $useDbConfig Database configuration name
* @return array Set of controllers
*/
public function listAll() {
Expand Down
3 changes: 2 additions & 1 deletion src/Console/Command/Task/FixtureTask.php
Expand Up @@ -86,6 +86,7 @@ public function getOptionParser() {
* Execution method always used for tasks
* Handles dispatching to interactive, named, or all processes.
*
* @param string $name The name of the fixture to bake.
* @return void
*/
public function main($name = null) {
Expand Down Expand Up @@ -309,7 +310,7 @@ protected function _values($values) {
/**
* Generate String representation of Records
*
* @param array $tableInfo Table schema array
* @param \Cake\Database\Schema\Table $table Table schema array
* @param int $recordCount The number of records to generate.
* @return array Array of records to use in the fixture.
*/
Expand Down
13 changes: 9 additions & 4 deletions src/Console/Command/Task/ModelTask.php
Expand Up @@ -71,6 +71,7 @@ class ModelTask extends BakeTask {
/**
* Execution method always used for tasks
*
* @param string $name The name of the table to bake.
* @return void
*/
public function main($name = null) {
Expand Down Expand Up @@ -155,7 +156,7 @@ public function getTableObject($className, $table) {
/**
* Get the array of associations to generate.
*
* @param \Cake\ORM\Table $table
* @param \Cake\ORM\Table $table The table to get associations for.
* @return array
*/
public function getAssociations(Table $table) {
Expand Down Expand Up @@ -193,6 +194,10 @@ public function getAssociations(Table $table) {
* Composer's class cache prevents us from loading the
* newly generated class. Applying associations if we have a
* generic table object means fields will be detected correctly.
*
* @param \Cake\ORM\Table $model The table to apply associations to.
* @param array $associations The associations to append.
* @return void
*/
public function applyAssociations($model, $associations) {
if (get_class($model) !== 'Cake\ORM\Table') {
Expand Down Expand Up @@ -432,7 +437,7 @@ public function getValidation($model) {
*
* @param string $fieldName Name of field to be validated.
* @param array $metaData metadata for field
* @param string $primaryKey
* @param string $primaryKey The primary key field
* @return array Array of validation for the field.
*/
public function fieldValidation($fieldName, array $metaData, $primaryKey) {
Expand Down Expand Up @@ -491,7 +496,7 @@ public function fieldValidation($fieldName, array $metaData, $primaryKey) {
/**
* Get behaviors
*
* @param \Cake\ORM\Table $model
* @param \Cake\ORM\Table $model The model to generate behaviors for.
* @return array Behaviors
*/
public function getBehaviors($model) {
Expand Down Expand Up @@ -522,7 +527,7 @@ public function getBehaviors($model) {
/**
* Get CounterCaches
*
* @param \Cake\ORM\Table $model
* @param \Cake\ORM\Table $model The table to get counter cache fields for.
* @return array CounterCache configurations
*/
public function getCounterCache($model) {
Expand Down
4 changes: 3 additions & 1 deletion src/Console/Command/Task/SimpleBakeTask.php
Expand Up @@ -69,6 +69,7 @@ public function templateData() {
/**
* Execute method
*
* @param string $name The name of the object to bake.
* @return void
*/
public function main($name = null) {
Expand All @@ -85,7 +86,7 @@ public function main($name = null) {
/**
* Generate a class stub
*
* @param string $className The classname to generate.
* @param string $name The classname to generate.
* @return void
*/
public function bake($name) {
Expand All @@ -101,6 +102,7 @@ public function bake($name) {
/**
* Generate a test case.
*
* @param string $className The class to bake a test for.
* @return void
*/
public function bakeTest($className) {
Expand Down
7 changes: 5 additions & 2 deletions src/Console/Command/Task/ViewTask.php
Expand Up @@ -96,6 +96,9 @@ public function initialize() {
/**
* Execution method always used for tasks
*
* @param string $name The name of the controller to bake views for.
* @param string $template The template to bake with.
* @param string $action The action to bake with.
* @return mixed
*/
public function main($name = null, $template = null, $action = null) {
Expand Down Expand Up @@ -266,7 +269,7 @@ protected function _loadController() {
* Bake a view file for each of the supplied actions
*
* @param array $actions Array of actions to make files for.
* @param array $vars
* @param array $vars The context for generating views.
* @return void
*/
public function bakeActions(array $actions, $vars) {
Expand Down Expand Up @@ -412,7 +415,7 @@ public function getOptionParser() {
/**
* Returns associations for controllers models.
*
* @param Table $model
* @param Table $model The model to build associations for.
* @return array associations
*/
protected function _associations(Table $model) {
Expand Down
2 changes: 1 addition & 1 deletion src/Console/ConsoleIo.php
Expand Up @@ -238,7 +238,7 @@ public function ask($prompt, $default = null) {
/**
* Change the output mode of the stdout stream
*
* @param int $mode
* @param int $mode The output mode.
* @return void
* @see \Cake\Console\ConsoleOutput::outputAs()
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Console/ConsoleOptionParser.php
Expand Up @@ -458,8 +458,6 @@ public function subcommands() {
* to parse the $argv
*
* @param array $argv Array of args (argv) to parse.
* @param string $command The subcommand to use. If this parameter is a subcommand, that has a parser,
* That parser will be used to parse $argv instead.
* @return Array [$params, $args]
* @throws \Cake\Console\Error\ConsoleException When an invalid parameter is encountered.
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Console/Shell.php
Expand Up @@ -172,8 +172,8 @@ public function __construct(ConsoleIo $io = null) {
/**
* Get/Set the io object for this shell.
*
* @param \Cake\Console\ConsoleIo $io
* @return \Cake\Console\ConsoleIo
* @param \Cake\Console\ConsoleIo $io The ConsoleIo object to use.
* @return \Cake\Console\ConsoleIo The current ConsoleIo object.
*/
public function io(ConsoleIo $io = null) {
if ($io !== null) {
Expand Down Expand Up @@ -382,7 +382,7 @@ public function runCommand($argv, $autoMethod = false) {
/**
* Display the help in the correct format
*
* @param string $command
* @param string $command The command to get help for.
* @return void
*/
protected function _displayHelp($command) {
Expand Down Expand Up @@ -413,7 +413,7 @@ public function getOptionParser() {
/**
* Overload get for lazy building of tasks
*
* @param string $name
* @param string $name The task to get.
* @return Shell Object of Task
*/
public function __get($name) {
Expand Down
5 changes: 2 additions & 3 deletions src/TestSuite/ControllerTestCase.php
Expand Up @@ -59,9 +59,8 @@ class StubControllerFilter extends DispatcherFilter {
/**
* Returns the test controller
*
* @param \Cake\Network\Request $request Request object
* @param \Cake\Network\Response $response Response for the controller.
* @return \Cake\Controller\Controller
* @param \Cake\Event\Event $event The event object.
* @return void
*/
public function beforeDispatch(Event $event) {
if (empty($event->data['controller'])) {
Expand Down
46 changes: 23 additions & 23 deletions src/TestSuite/Fixture/FixtureInjector.php
Expand Up @@ -45,7 +45,7 @@ class FixtureInjector implements PHPUnit_Framework_TestListener {
/**
* Constructor. Save internally the reference to the passed fixture manager
*
* @param \Cake\TestSuite\Fixture\FixtureManager $manager
* @param \Cake\TestSuite\Fixture\FixtureManager $manager The fixture manager
*/
public function __construct(FixtureManager $manager) {
$this->_fixtureManager = $manager;
Expand All @@ -56,7 +56,7 @@ public function __construct(FixtureManager $manager) {
* Iterates the tests inside a test suite and creates the required fixtures as
* they were expressed inside each test case.
*
* @param \PHPUnit_Framework_TestSuite $suite
* @param \PHPUnit_Framework_TestSuite $suite The test suite
* @return void
*/
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
Expand All @@ -69,7 +69,7 @@ public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
* Destroys the fixtures created by the fixture manager at the end of the test
* suite run
*
* @param \PHPUnit_Framework_TestSuite $suite
* @param \PHPUnit_Framework_TestSuite $suite The test suite
* @return void
*/
public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
Expand All @@ -81,9 +81,9 @@ public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
/**
* Not Implemented
*
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @param PHPUnit_Framework_Test $test The test to add errors from.
* @param Exception $e The exception
* @param float $time current time
* @return void
*/
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) {
Expand All @@ -92,9 +92,9 @@ public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) {
/**
* Not Implemented
*
* @param PHPUnit_Framework_Test $test
* @param PHPUnit_Framework_AssertionFailedError $e
* @param float $time
* @param PHPUnit_Framework_Test $test The test case
* @param PHPUnit_Framework_AssertionFailedError $e The failed assertion
* @param float $time current time
* @return void
*/
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {
Expand All @@ -103,9 +103,9 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser
/**
* Not Implemented
*
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @param PHPUnit_Framework_Test $test The test case
* @param Exception $e The incomplete test error.
* @param float $time current time
* @return void
*/
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
Expand All @@ -114,18 +114,18 @@ public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $t
/**
* Not Implemented
*
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @param PHPUnit_Framework_Test $test The test case
* @param Exception $e Skipped test exception
* @param float $time current time
* @return void
*/
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
}

/**
* Not Implemented
* Adds fixtures to a test case when it starts.
*
* @param PHPUnit_Framework_Test $test
* @param PHPUnit_Framework_Test $test The test case
* @return void
*/
public function startTest(PHPUnit_Framework_Test $test) {
Expand All @@ -137,10 +137,10 @@ public function startTest(PHPUnit_Framework_Test $test) {
}

/**
* Not Implemented
* Unloads fixtures from the test case.
*
* @param PHPUnit_Framework_Test $test
* @param float $time
* @param PHPUnit_Framework_Test $test The test case
* @param float $time current time
* @return void
*/
public function endTest(PHPUnit_Framework_Test $test, $time) {
Expand All @@ -152,9 +152,9 @@ public function endTest(PHPUnit_Framework_Test $test, $time) {
/**
* Not Implemented
*
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @param PHPUnit_Framework_Test $test The test case
* @param Exception $e The exception to track
* @param float $time current time
* @return void
*/
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
Expand Down

0 comments on commit 2d71a81

Please sign in to comment.