Browse Source

Merge pull request #2789 from rockingeric/3.0

3.0 - Fix more doc blocks errors
Mark Story 12 years ago
parent
commit
59bdf9ee79

+ 1 - 1
src/Console/Command/UpgradeShell.php

@@ -210,7 +210,7 @@ class UpgradeShell extends Shell {
  * Replace all the App::uses() calls with `use`.
  *
  * @param string $file The file to search and replace.
- * @return mixed Replacement of uses call
+ * @return string|void If there is no `App::uses()` returns void, string otherwise
  */
 	protected function _replaceUses($file) {
 		$pattern = '#App::uses\([\'"]([a-z0-9_]+)[\'"],\s*[\'"]([a-z0-9/_]+)(?:\.([a-z0-9/_]+))?[\'"]\)#i';

+ 1 - 0
src/Database/Expression/QueryExpression.php

@@ -492,6 +492,7 @@ class QueryExpression implements ExpressionInterface, Countable {
  * Returns an array of placeholders that will have a bound value corresponding
  * to each value in the first argument.
  *
+ * @param string $field database field to be used to bind values
  * @param array $values
  * @param string $type the type to be used to bind the values
  * @return array

+ 2 - 0
src/Database/Query.php

@@ -1579,6 +1579,8 @@ class Query implements ExpressionInterface, IteratorAggregate {
  *	});
  * }}}
  *
+ * @param null|callable $callback
+ * @param boolean $overwrite
  * @return Query
  */
 	public function decorateResults($callback, $overwrite = false) {

+ 14 - 1
src/Database/Statement/BufferedStatement.php

@@ -26,8 +26,18 @@ class BufferedStatement extends StatementDecorator {
 
 	protected $_count = 0;
 
+/**
+ * Array of results
+ *
+ * @var array
+ */
 	protected $_records = [];
 
+ /**
+ * If true, all rows were fetched
+ *
+ * @var boolean
+ */
 	protected $_allFetched = true;
 
 	protected $_counter = 0;
@@ -107,12 +117,15 @@ class BufferedStatement extends StatementDecorator {
 	}
 
 /**
- * {@inheritDoc}
+ * Rewind the _counter property
  */
 	public function rewind() {
 		$this->_counter = 0;
 	}
 
+/**
+ * Reset all properties
+ */
 	protected function _reset() {
 		$this->_count = $this->_counter = 0;
 		$this->_records = [];

+ 1 - 0
src/Network/Email/Email.php

@@ -1383,6 +1383,7 @@ class Email {
  * Wrap the message to follow the RFC 2822 - 2.1.1
  *
  * @param string $message Message to wrap
+ * @param integer $wrapLength The line length
  * @return array Wrapped message
  */
 	protected function _wrap($message, $wrapLength = Email::LINE_LENGTH_MUST) {

+ 1 - 0
src/Network/Http/Auth/Oauth.php

@@ -104,6 +104,7 @@ class Oauth {
  *
  * @param Request $request
  * @param array $credentials
+ * @return string
  */
 	protected function _hmacSha1($request, $credentials) {
 		$nonce = isset($credentials['nonce']) ? $credentials['nonce'] : uniqid();

+ 4 - 2
src/Network/Http/Client.php

@@ -106,7 +106,7 @@ class Client {
 /**
  * List of cookies from responses made with this client.
  *
- * Cookies are indexed by the cookie's domain or 
+ * Cookies are indexed by the cookie's domain or
  * request host name.
  *
  * @var Cake\Network\Http\Cookies
@@ -197,7 +197,7 @@ class Client {
  *
  * The $data argument supports a special `_content` key
  * for providing a request body in a GET request. This is
- * generally not used but services like ElasticSearch use 
+ * generally not used but services like ElasticSearch use
  * this feature.
  *
  * @param string $url The url or path you want to request.
@@ -296,6 +296,8 @@ class Client {
  *
  * @param string $method HTTP method.
  * @param string $url URL to request.
+ * @param mixed $data The request body.
+ * @param array $options The options to use. Contains auth, proxy etc.
  * @return Cake\Network\Http\Response
  */
 	protected function _doRequest($method, $url, $data, $options) {

+ 2 - 0
src/Network/Request.php

@@ -263,6 +263,7 @@ class Request implements \ArrayAccess {
 /**
  * Process the GET parameters and move things into the object.
  *
+ * @param array $query Contains querystring data such as `pag`
  * @return void
  */
 	protected function _processGet($query) {
@@ -280,6 +281,7 @@ class Request implements \ArrayAccess {
  * by PHP. Following that, REQUEST_URI, PHP_SELF, HTTP_X_REWRITE_URL and argv are checked in that order.
  * Each of these server variables have the base path, and query strings stripped off
  *
+ * @param array $config
  * @return string URI The CakePHP request path that is being accessed.
  */
 	protected static function _url($config) {

+ 6 - 1
src/ORM/Association/BelongsToMany.php

@@ -489,6 +489,7 @@ class BelongsToMany extends Association {
  * association
  * @param array list of entities to link to link to the source entity using the
  * junction table
+ * @param array $options list of options accepted by Table::save()
  * @return boolean success
  */
 	protected function _saveLinks(Entity $sourceEntity, $targetEntities, $options) {
@@ -786,6 +787,10 @@ class BelongsToMany extends Association {
  * Throws an exception should any of the passed entities is not persisted.
  *
  * @throws \InvalidArgumentException
+ * @param \Cake\ORM\Entity $sourceEntity the row belonging to the `source` side
+ * of this association
+ * @param array $targetEntities list of entities belonging to the `target` side
+ * of this association
  * @return boolean
  */
 	protected function _checkPersistenceStatus($sourceEntity, array $targetEntities) {
@@ -880,7 +885,7 @@ class BelongsToMany extends Association {
  * Generates a string used as a table field that contains the values upon
  * which the filter should be applied
  *
- * params array $options
+ * @param array $options
  * @return string
  */
 	protected function _linkField($options) {

+ 1 - 0
src/ORM/Association/ExternalAssociationTrait.php

@@ -80,6 +80,7 @@ trait ExternalAssociationTrait {
  * Returns true if the eager loading process will require a set of parent table's
  * primary keys in order to use them as a filter in the finder query.
  *
+ * @param array $options
  * @return boolean true if a list of keys will be required
  */
 	public function requiresKeys($options = []) {

+ 1 - 0
src/ORM/Associations.php

@@ -99,6 +99,7 @@ class Associations {
 /**
  * Get an array of associations matching a specific type.
  *
+ * @param string $class
  * @return array
  */
 	public function type($class) {

+ 2 - 0
src/ORM/BehaviorRegistry.php

@@ -127,6 +127,8 @@ class BehaviorRegistry extends ObjectRegistry {
  * declared on Cake\ORM\Behavior
  *
  * @param Cake\ORM\Behavior $instance
+ * @param string $class The classname that is missing.
+ * @param string $alias The alias of the object.
  * @return void
  * @throws Cake\Error\Exception when duplicate methods are connected.
  */

+ 3 - 0
src/ORM/Marshaller.php

@@ -113,6 +113,9 @@ class Marshaller {
 /**
  * Create a new sub-marshaller and marshal the associated data.
  *
+ * @param Cake\ORM\Association $assoc
+ * @param array $value The data to hydrate
+ * @param array $include The associations to include.
  * @return mixed
  */
 	protected function _marshalAssociation($assoc, $value, $include) {

+ 1 - 0
src/ORM/ResultSet.php

@@ -327,6 +327,7 @@ class ResultSet implements Countable, Iterator, Serializable, JsonSerializable {
 /**
  * Correctly nest results keys including those coming from associations
  *
+ * @param mixed|boolean $row array containing columns and values or false if there is no results
  * @return array
  */
 	protected function _groupResult($row) {

+ 3 - 2
src/Routing/Route/Route.php

@@ -500,8 +500,9 @@ class Route {
  * Composes the string URL using the template
  * used to create the route.
  *
- * @param array $params The params to convert to a string url.
- * @param array $pass The additional passed arguments.
+ * @param array $params The params to convert to a string url
+ * @param array $pass The additional passed arguments
+ * @param array $query An array of parameters
  * @return string Composed route string.
  */
 	protected function _writeUrl($params, $pass = array(), $query = array()) {

+ 16 - 0
src/TestSuite/Fixture/FixtureInjector.php

@@ -40,6 +40,7 @@ class FixtureInjector implements PHPUnit_Framework_TestListener {
 /**
  * Constructor. Save internally the reference to the passed fixture manager
  *
+ * @param Cake\TestSuite\Fixture\FixtureManager $manager
  * @return void
  */
 	public function __construct(FixtureManager $manager) {
@@ -76,6 +77,9 @@ class FixtureInjector implements PHPUnit_Framework_TestListener {
 /**
  * Not Implemented
  *
+ * @param PHPUnit_Framework_Test $test
+ * @param Exception $e
+ * @param float $time
  * @return void
  */
 	public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) {
@@ -84,6 +88,9 @@ class FixtureInjector implements PHPUnit_Framework_TestListener {
 /**
  * Not Implemented
  *
+ * @param PHPUnit_Framework_Test $test
+ * @param PHPUnit_Framework_AssertionFailedError $e
+ * @param float $time
  * @return void
  */
 	public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {
@@ -92,6 +99,9 @@ class FixtureInjector implements PHPUnit_Framework_TestListener {
 /**
  * Not Implemented
  *
+ * @param PHPUnit_Framework_Test $test
+ * @param PHPUnit_Framework_AssertionFailedError $e
+ * @param float $time
  * @return void
  */
 	public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
@@ -100,6 +110,9 @@ class FixtureInjector implements PHPUnit_Framework_TestListener {
 /**
  * Not Implemented
  *
+ * @param PHPUnit_Framework_Test $test
+ * @param Exception $e
+ * @param float $time
  * @return void
  */
 	public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
@@ -108,6 +121,7 @@ class FixtureInjector implements PHPUnit_Framework_TestListener {
 /**
  * Not Implemented
  *
+ * @param PHPUnit_Framework_Test $test
  * @return void
  */
 	public function startTest(PHPUnit_Framework_Test $test) {
@@ -116,6 +130,8 @@ class FixtureInjector implements PHPUnit_Framework_TestListener {
 /**
  * Not Implemented
  *
+ * @param PHPUnit_Framework_Test $test
+ * @param float $time
  * @return void
  */
 	public function endTest(PHPUnit_Framework_Test $test, $time) {

+ 2 - 0
src/Validation/Validator.php

@@ -131,6 +131,8 @@ class Validator implements \ArrayAccess, \IteratorAggregate, \Countable {
  * If called with no arguments, it will return the provider stored under that name if
  * it exists, otherwise it returns this instance of chaining.
  *
+ * @param string $name
+ * @param null|object|string $object
  * @return Validator|object|string
  */
 	public function provider($name, $object = null) {