Merge pull request #3661 from cakephp/api-docs

Api docs
This commit is contained in:
ADmad 2014-06-06 23:57:31 +05:30
commit 92a89d7f5d
10 changed files with 83 additions and 83 deletions

View file

@ -407,9 +407,9 @@ class PhpAro {
/** /**
* Constructor * Constructor
* *
* @param array $aro * @param array $aro The aro data
* @param array $map * @param array $map The identifier mappings
* @param array $aliases * @param array $aliases The aliases to map.
*/ */
public function __construct(array $aro = array(), array $map = array(), array $aliases = array()) { public function __construct(array $aro = array(), array $map = array(), array $aliases = array()) {
if (!empty($map)) { if (!empty($map)) {

View file

@ -212,7 +212,7 @@ class Mysql extends DboSource {
/** /**
* Returns an array of sources (tables) in the database. * Returns an array of sources (tables) in the database.
* *
* @param mixed $data * @param mixed $data List of tables.
* @return array Array of table names in the database * @return array Array of table names in the database
*/ */
public function listSources($data = null) { public function listSources($data = null) {
@ -240,7 +240,7 @@ class Mysql extends DboSource {
/** /**
* Builds a map of the columns contained in a result * Builds a map of the columns contained in a result
* *
* @param PDOStatement $results * @param PDOStatement $results The results to format.
* @return void * @return void
*/ */
public function resultSet($results) { public function resultSet($results) {
@ -374,10 +374,10 @@ class Mysql extends DboSource {
/** /**
* Generates and executes an SQL UPDATE statement for given model, fields, and values. * Generates and executes an SQL UPDATE statement for given model, fields, and values.
* *
* @param Model $model * @param Model $model The model to update.
* @param array $fields * @param array $fields The fields to update.
* @param array $values * @param array $values The values to set.
* @param mixed $conditions * @param mixed $conditions The conditions to use.
* @return array * @return array
*/ */
public function update(Model $model, $fields = array(), $values = null, $conditions = null) { public function update(Model $model, $fields = array(), $values = null, $conditions = null) {
@ -418,8 +418,8 @@ class Mysql extends DboSource {
/** /**
* Generates and executes an SQL DELETE statement for given id/conditions on given model. * Generates and executes an SQL DELETE statement for given id/conditions on given model.
* *
* @param Model $model * @param Model $model The model to delete from.
* @param mixed $conditions * @param mixed $conditions The conditions to use.
* @return boolean Success * @return boolean Success
*/ */
public function delete(Model $model, $conditions = null) { public function delete(Model $model, $conditions = null) {
@ -516,7 +516,7 @@ class Mysql extends DboSource {
* Generate a MySQL Alter Table syntax for the given Schema comparison * Generate a MySQL Alter Table syntax for the given Schema comparison
* *
* @param array $compare Result of a CakeSchema::compare() * @param array $compare Result of a CakeSchema::compare()
* @param string $table * @param string $table The table name.
* @return array Array of alter statements to make. * @return array Array of alter statements to make.
*/ */
public function alterSchema($compare, $table = null) { public function alterSchema($compare, $table = null) {

View file

@ -158,7 +158,7 @@ class Postgres extends DboSource {
/** /**
* Returns an array of tables in the database. If there are no tables, an error is raised and the application exits. * Returns an array of tables in the database. If there are no tables, an error is raised and the application exits.
* *
* @param mixed $data * @param mixed $data The sources to list.
* @return array Array of table names in the database * @return array Array of table names in the database
*/ */
public function listSources($data = null) { public function listSources($data = null) {
@ -361,7 +361,7 @@ class Postgres extends DboSource {
/** /**
* Prepares field names to be quoted by parent * Prepares field names to be quoted by parent
* *
* @param string $data * @param string $data The name to format.
* @return string SQL field * @return string SQL field
*/ */
public function name($data) { public function name($data) {
@ -374,10 +374,10 @@ class Postgres extends DboSource {
/** /**
* Generates the fields list of an SQL query. * Generates the fields list of an SQL query.
* *
* @param Model $model * @param Model $model The model to get fields for.
* @param string $alias Alias table name * @param string $alias Alias table name.
* @param mixed $fields * @param mixed $fields The list of fields to get.
* @param boolean $quote * @param boolean $quote Whether or not to quote identifiers.
* @return array * @return array
*/ */
public function fields(Model $model, $alias = null, $fields = array(), $quote = true) { public function fields(Model $model, $alias = null, $fields = array(), $quote = true) {
@ -731,7 +731,7 @@ class Postgres extends DboSource {
/** /**
* resultSet method * resultSet method
* *
* @param array $results * @param array &$results The results
* @return void * @return void
*/ */
public function resultSet(&$results) { public function resultSet(&$results) {
@ -886,8 +886,8 @@ class Postgres extends DboSource {
/** /**
* Format indexes for create table * Format indexes for create table
* *
* @param array $indexes * @param array $indexes The index to build
* @param string $table * @param string $table The table name.
* @return string * @return string
*/ */
public function buildIndex($indexes, $table = null) { public function buildIndex($indexes, $table = null) {
@ -918,8 +918,8 @@ class Postgres extends DboSource {
/** /**
* Overrides DboSource::renderStatement to handle schema generation with Postgres-style indexes * Overrides DboSource::renderStatement to handle schema generation with Postgres-style indexes
* *
* @param string $type * @param string $type The query type.
* @param array $data * @param array $data The array of data to render.
* @return string * @return string
*/ */
public function renderStatement($type, $data) { public function renderStatement($type, $data) {

View file

@ -166,7 +166,7 @@ class Sqlserver extends DboSource {
/** /**
* Returns an array of sources (tables) in the database. * Returns an array of sources (tables) in the database.
* *
* @param mixed $data * @param mixed $data The names
* @return array Array of table names in the database * @return array Array of table names in the database
*/ */
public function listSources($data = null) { public function listSources($data = null) {
@ -269,10 +269,10 @@ class Sqlserver extends DboSource {
/** /**
* Generates the fields list of an SQL query. * Generates the fields list of an SQL query.
* *
* @param Model $model * @param Model $model The model to get fields for.
* @param string $alias Alias table name * @param string $alias Alias table name
* @param array $fields * @param array $fields The fields so far.
* @param boolean $quote * @param boolean $quote Whether or not to quote identfiers.
* @return array * @return array
*/ */
public function fields(Model $model, $alias = null, $fields = array(), $quote = true) { public function fields(Model $model, $alias = null, $fields = array(), $quote = true) {
@ -338,9 +338,9 @@ class Sqlserver extends DboSource {
* Removes Identity (primary key) column from update data before returning to parent, if * Removes Identity (primary key) column from update data before returning to parent, if
* value is empty. * value is empty.
* *
* @param Model $model * @param Model $model The model to insert into.
* @param array $fields * @param array $fields The fields to set.
* @param array $values * @param array $values The values to set.
* @return array * @return array
*/ */
public function create(Model $model, $fields = null, $values = null) { public function create(Model $model, $fields = null, $values = null) {
@ -367,10 +367,10 @@ class Sqlserver extends DboSource {
* Generates and executes an SQL UPDATE statement for given model, fields, and values. * Generates and executes an SQL UPDATE statement for given model, fields, and values.
* Removes Identity (primary key) column from update data before returning to parent. * Removes Identity (primary key) column from update data before returning to parent.
* *
* @param Model $model * @param Model $model The model to update.
* @param array $fields * @param array $fields The fields to set.
* @param array $values * @param array $values The values to set.
* @param mixed $conditions * @param mixed $conditions The conditions to use.
* @return array * @return array
*/ */
public function update(Model $model, $fields = array(), $values = null, $conditions = null) { public function update(Model $model, $fields = array(), $values = null, $conditions = null) {
@ -482,7 +482,7 @@ class Sqlserver extends DboSource {
/** /**
* Builds a map of the columns contained in a result * Builds a map of the columns contained in a result
* *
* @param PDOStatement $results * @param PDOStatement $results The result to modify.
* @return void * @return void
*/ */
public function resultSet($results) { public function resultSet($results) {
@ -608,9 +608,9 @@ class Sqlserver extends DboSource {
* Returns an array of all result rows for a given SQL query. * Returns an array of all result rows for a given SQL query.
* Returns false if no rows matched. * Returns false if no rows matched.
* *
* @param Model $model * @param Model $model The model to read from
* @param array $queryData * @param array $queryData The query data
* @param integer $recursive * @param integer $recursive How many layers to go.
* @return array|false Array of resultset rows, or false if no rows matched * @return array|false Array of resultset rows, or false if no rows matched
*/ */
public function read(Model $model, $queryData = array(), $recursive = null) { public function read(Model $model, $queryData = array(), $recursive = null) {
@ -647,9 +647,9 @@ class Sqlserver extends DboSource {
/** /**
* Inserts multiple values into a table * Inserts multiple values into a table
* *
* @param string $table * @param string $table The table to insert into.
* @param string $fields * @param string $fields The fields to set.
* @param array $values * @param array $values The values to set.
* @return void * @return void
*/ */
public function insertMulti($table, $fields, $values) { public function insertMulti($table, $fields, $values) {
@ -699,8 +699,8 @@ class Sqlserver extends DboSource {
/** /**
* Format indexes for create table * Format indexes for create table
* *
* @param array $indexes * @param array $indexes The indexes to build
* @param string $table * @param string $table The table to make indexes for.
* @return string * @return string
*/ */
public function buildIndex($indexes, $table = null) { public function buildIndex($indexes, $table = null) {
@ -744,7 +744,7 @@ class Sqlserver extends DboSource {
* Returns number of affected rows in previous database operation. If no previous operation exists, * Returns number of affected rows in previous database operation. If no previous operation exists,
* this returns false. * this returns false.
* *
* @param mixed $source * @param mixed $source Unused
* @return integer Number of affected rows * @return integer Number of affected rows
*/ */
public function lastAffected($source = null) { public function lastAffected($source = null) {

View file

@ -373,7 +373,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
* *
* @param string $string An HTML/XHTML/XML string * @param string $string An HTML/XHTML/XML string
* @param array $expected An array, see above * @param array $expected An array, see above
* @param string $message SimpleTest failure output string * @param string $fullDebug Whether or not more verbose output should be used.
* @return boolean * @return boolean
*/ */
public function assertTags($string, $expected, $fullDebug = false) { public function assertTags($string, $expected, $fullDebug = false) {

View file

@ -35,7 +35,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
/** /**
* Construct method * Construct method
* *
* @param mixed $loader * @param mixed $loader The loader instance to use.
* @param array $params list of options to be used for this run * @param array $params list of options to be used for this run
* @throws MissingTestLoaderException When a loader class could not be found. * @throws MissingTestLoaderException When a loader class could not be found.
*/ */
@ -55,8 +55,8 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
/** /**
* Ugly hack to get around PHPUnit having a hard coded class name for the Runner. :( * Ugly hack to get around PHPUnit having a hard coded class name for the Runner. :(
* *
* @param array $argv * @param array $argv The command arguments
* @param boolean $exit * @param boolean $exit The exit mode.
* @return void * @return void
*/ */
public function run(array $argv, $exit = true) { public function run(array $argv, $exit = true) {
@ -131,7 +131,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
/** /**
* Handles output flag used to change printing on webrunner. * Handles output flag used to change printing on webrunner.
* *
* @param string $reporter * @param string $reporter The reporter class to use.
* @return void * @return void
*/ */
public function handleReporter($reporter) { public function handleReporter($reporter) {

View file

@ -134,8 +134,8 @@ abstract class BaseCoverageReport {
* 3.5 uses -1 for uncovered, and -2 for dead. * 3.5 uses -1 for uncovered, and -2 for dead.
* 3.6 uses array() for uncovered and null for dead. * 3.6 uses array() for uncovered and null for dead.
* *
* @param array $fileLines * @param array $fileLines The lines in the file.
* @param array $coverageData * @param array $coverageData The raw coverage data.
* @return array Array of covered, total lines. * @return array Array of covered, total lines.
*/ */
protected function _calculateCoveredLines($fileLines, $coverageData) { protected function _calculateCoveredLines($fileLines, $coverageData) {

View file

@ -127,7 +127,7 @@ HTML;
/** /**
* Guess the class name the test was for based on the test case filename. * Guess the class name the test was for based on the test case filename.
* *
* @param ReflectionClass $testReflection. * @param ReflectionClass $testReflection The class to reflect
* @return string Possible test subject name. * @return string Possible test subject name.
*/ */
protected function _guessSubjectName($testReflection) { protected function _guessSubjectName($testReflection) {
@ -143,10 +143,10 @@ HTML;
/** /**
* Renders the HTML for a single line in the HTML diff. * Renders the HTML for a single line in the HTML diff.
* *
* @param string $line * @param string $line The line content.
* @param integer $linenumber * @param integer $linenumber The line number
* @param string $class * @param string $class The classname to use.
* @param array $coveringTests * @param array $coveringTests The tests covering the line.
* @return string * @return string
*/ */
protected function _paintLine($line, $linenumber, $class, $coveringTests) { protected function _paintLine($line, $linenumber, $class, $coveringTests) {
@ -195,8 +195,8 @@ HTML;
/** /**
* Generate an HTML snippet for coverage headers * Generate an HTML snippet for coverage headers
* *
* @param string $filename * @param string $filename The file name being covered
* @param string $percent * @param string $percent The percentage covered
* @return string * @return string
*/ */
public function coverageHeader($filename, $percent) { public function coverageHeader($filename, $percent) {

View file

@ -121,7 +121,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* Print result * Print result
* *
* @param PHPUnit_Framework_TestResult $result * @param PHPUnit_Framework_TestResult $result The result object
* @return void * @return void
*/ */
public function printResult(PHPUnit_Framework_TestResult $result) { public function printResult(PHPUnit_Framework_TestResult $result) {
@ -131,7 +131,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* Paint result * Paint result
* *
* @param PHPUnit_Framework_TestResult $result * @param PHPUnit_Framework_TestResult $result The result object
* @return void * @return void
*/ */
public function paintResult(PHPUnit_Framework_TestResult $result) { public function paintResult(PHPUnit_Framework_TestResult $result) {
@ -141,9 +141,9 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* An error occurred. * An error occurred.
* *
* @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_Test $test The test to add an error for.
* @param Exception $e * @param Exception $e The exception object to add.
* @param float $time * @param float $time The current time.
* @return void * @return void
*/ */
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) { public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) {
@ -153,9 +153,9 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* A failure occurred. * A failure occurred.
* *
* @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_Test $test The test that failed
* @param PHPUnit_Framework_AssertionFailedError $e * @param PHPUnit_Framework_AssertionFailedError $e The assertion that failed.
* @param float $time * @param float $time The current time.
* @return void * @return void
*/ */
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) { public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {
@ -165,9 +165,9 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* Incomplete test. * Incomplete test.
* *
* @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_Test $test The test that was incomplete.
* @param Exception $e * @param Exception $e The incomplete exception
* @param float $time * @param float $time The current time.
* @return void * @return void
*/ */
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) { public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
@ -177,9 +177,9 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* Skipped test. * Skipped test.
* *
* @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_Test $test The test that failed.
* @param Exception $e * @param Exception $e The skip object.
* @param float $time * @param float $time The current time.
* @return void * @return void
*/ */
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) { public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
@ -189,7 +189,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* A test suite started. * A test suite started.
* *
* @param PHPUnit_Framework_TestSuite $suite * @param PHPUnit_Framework_TestSuite $suite The suite to start
* @return void * @return void
*/ */
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) { public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
@ -202,7 +202,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* A test suite ended. * A test suite ended.
* *
* @param PHPUnit_Framework_TestSuite $suite * @param PHPUnit_Framework_TestSuite $suite The suite that ended.
* @return void * @return void
*/ */
public function endTestSuite(PHPUnit_Framework_TestSuite $suite) { public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
@ -211,7 +211,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* A test started. * A test started.
* *
* @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_Test $test The test that started.
* @return void * @return void
*/ */
public function startTest(PHPUnit_Framework_Test $test) { public function startTest(PHPUnit_Framework_Test $test) {
@ -220,8 +220,8 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
/** /**
* A test ended. * A test ended.
* *
* @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_Test $test The test that ended
* @param float $time * @param float $time The current time.
* @return void * @return void
*/ */
public function endTest(PHPUnit_Framework_Test $test, $time) { public function endTest(PHPUnit_Framework_Test $test, $time) {

View file

@ -169,7 +169,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
/** /**
* Paints a code coverage report. * Paints a code coverage report.
* *
* @param array $coverage * @param array $coverage The coverage data
* @return void * @return void
*/ */
public function paintCoverage(array $coverage) { public function paintCoverage(array $coverage) {
@ -243,7 +243,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
* *
* @param PHPUnit_Framework_AssertionFailedError $message Failure object displayed in * @param PHPUnit_Framework_AssertionFailedError $message Failure object displayed in
* the context of the other tests. * the context of the other tests.
* @param mixed $test * @param mixed $test The test case to paint a failure for.
* @return void * @return void
*/ */
public function paintFail($message, $test) { public function paintFail($message, $test) {
@ -278,7 +278,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
* trail of the nesting test suites below the * trail of the nesting test suites below the
* top level test. * top level test.
* *
* @param PHPUnit_Framework_Test test method that just passed * @param PHPUnit_Framework_Test $test Test method that just passed
* @param float $time time spent to run the test method * @param float $time time spent to run the test method
* @return void * @return void
*/ */
@ -295,8 +295,8 @@ class CakeHtmlReporter extends CakeBaseReporter {
/** /**
* Paints a PHP exception. * Paints a PHP exception.
* *
* @param Exception $exception Exception to display. * @param Exception $message Exception to display.
* @param mixed $test * @param mixed $test The test that failed.
* @return void * @return void
*/ */
public function paintException($message, $test) { public function paintException($message, $test) {
@ -370,7 +370,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
/** /**
* A test suite started. * A test suite started.
* *
* @param PHPUnit_Framework_TestSuite $suite * @param PHPUnit_Framework_TestSuite $suite The test suite to start.
* @return void * @return void
*/ */
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) { public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {