Permalink
Browse files

Fixes ApiGen doc blocks

  • Loading branch information...
1 parent db36ba0 commit e60b1f430d5bfd5dca96a11569b7db2370bac1a7 @rockingeric rockingeric committed Feb 6, 2014
@@ -210,7 +210,7 @@ public function app_uses() {
* 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';
@@ -492,6 +492,7 @@ protected function _parseCondition($field, $value, $types) {
* 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
View
@@ -1579,6 +1579,8 @@ public function clause($name) {
* });
* }}}
*
+ * @param null|callable $callback
+ * @param boolean $overwrite
* @return Query
*/
public function decorateResults($callback, $overwrite = false) {
@@ -24,10 +24,20 @@
*/
class BufferedStatement extends StatementDecorator {
- protected $_count = 0;
+ protected $_count = 0;
+/**
+ * Array of results
+ *
+ * @var array
+ */
protected $_records = [];
+ /**
+ * If true, all rows were fetched
+ *
+ * @var boolean
+ */
protected $_allFetched = true;
protected $_counter = 0;
@@ -106,13 +116,16 @@ public function rowCount() {
return $this->_count;
}
-/**
- * {@inheritDoc}
- */
+ /**
+ * Rewind the _counter property
+ */
public function rewind() {
$this->_counter = 0;
}
+ /**
+ * Reset all properties
+ */
protected function _reset() {
$this->_count = $this->_counter = 0;
$this->_records = [];
@@ -1383,6 +1383,7 @@ protected function _encodeString($text, $charset) {
* 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) {
@@ -104,6 +104,7 @@ protected function _plaintext($request, $credentials) {
*
* @param Request $request
* @param array $credentials
+ * @return string
*/
protected function _hmacSha1($request, $credentials) {
$nonce = isset($credentials['nonce']) ? $credentials['nonce'] : uniqid();
@@ -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 @@ public function cookies() {
*
* 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 @@ public function head($url, $data = [], $options = []) {
*
* @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) {
View
@@ -263,6 +263,7 @@ protected function _processPost($data) {
/**
* 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 @@ protected function _processGet($query) {
* 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) {
@@ -489,6 +489,7 @@ protected function _saveTarget(Entity $parentEntity, $entities, $options) {
* 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 @@ protected function _diffLinks($existing, $jointEntities, $targetEntities) {
* 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 @@ protected function _addFilteringCondition($query, $key, $filter) {
* 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) {
@@ -80,6 +80,7 @@ public function sort($sort = null) {
* 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 = []) {
View
@@ -99,6 +99,7 @@ public function keys() {
/**
* Get an array of associations matching a specific type.
*
+ * @param string $class
* @return array
*/
public function type($class) {
@@ -127,6 +127,8 @@ protected function _create($class, $alias, $config) {
* 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.
*/
View
@@ -113,6 +113,9 @@ public function one(array $data, $include = []) {
/**
* 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) {
View
@@ -327,6 +327,7 @@ protected function _fetchResult() {
/**
* 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) {
@@ -500,8 +500,9 @@ public function match($url, $context = array()) {
* 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()) {
@@ -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 @@ public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
/**
* 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 @@ 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
* @return void
*/
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {
@@ -92,6 +99,9 @@ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_Asser
/**
* 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 @@ public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $t
/**
* 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 @@ public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time
/**
* Not Implemented
*
+ * @param PHPUnit_Framework_Test $test
* @return void
*/
public function startTest(PHPUnit_Framework_Test $test) {
@@ -116,6 +130,8 @@ public function startTest(PHPUnit_Framework_Test $test) {
/**
* Not Implemented
*
+ * @param PHPUnit_Framework_Test $test
+ * @param float $time
* @return void
*/
public function endTest(PHPUnit_Framework_Test $test, $time) {
@@ -131,6 +131,8 @@ public function hasField($name) {
* 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) {

0 comments on commit e60b1f4

Please sign in to comment.