Skip to content

Commit

Permalink
Fix API docblock CS errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jun 4, 2014
1 parent 55672b6 commit 1d40f3e
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 92 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/Model/BehaviorCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
/**
* Attaches a model object and loads a list of behaviors
*
* @param string $modelName
* @param array $behaviors
* @param string $modelName Model name.
* @param array $behaviors Behaviors list.
* @return void
*/
public function init($modelName, $behaviors = array()) {
Expand All @@ -71,8 +71,8 @@ public function init($modelName, $behaviors = array()) {
/**
* Backwards compatible alias for load()
*
* @param string $behavior
* @param array $config
* @param string $behavior Behavior name.
* @param array $config Configuration options.
* @return void
* @deprecated Will be removed in 3.0. Replaced with load().
*/
Expand Down
7 changes: 4 additions & 3 deletions lib/Cake/Model/Datasource/CakeSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public static function delete($name) {
/**
* Used to write new data to _SESSION, since PHP doesn't like us setting the _SESSION var itself.
*
* @param array $old Set of old variables => values
* @param array &$old Set of old variables => values
* @param array $new New set of variable => value
* @return void
*/
Expand Down Expand Up @@ -547,6 +547,7 @@ protected static function _cookieName() {

/**
* Returns whether a session exists
*
* @return boolean
*/
protected static function _hasSession() {
Expand All @@ -556,7 +557,7 @@ protected static function _hasSession() {
/**
* Find the handler class and make sure it implements the correct interface.
*
* @param string $handler
* @param string $handler Handler name.
* @return void
* @throws CakeSessionException
*/
Expand All @@ -576,7 +577,7 @@ protected static function _getHandler($handler) {
/**
* Get one of the prebaked default session configurations.
*
* @param string $name
* @param string $name Config name.
* @return boolean|array
*/
protected static function _defaultConfig($name) {
Expand Down
53 changes: 28 additions & 25 deletions lib/Cake/Model/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ protected function _constructLinkedModel($assoc, $className = null, $plugin = nu
* Build an array-based association from string.
*
* @param string $type 'belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'
* @param string $assocKey
* @param string $assocKey Association key.
* @return void
*/
protected function _generateAssociation($type, $assocKey) {
Expand Down Expand Up @@ -1214,7 +1214,7 @@ public function set($one, $two = null) {
/**
* Move values to alias
*
* @param array $data
* @param array $data Data.
* @return array
*/
protected function _setAliasData($data) {
Expand Down Expand Up @@ -1892,7 +1892,7 @@ protected function _isUUIDField($field) {
*
* @param array $joined Data to save
* @param integer|string $id ID of record in this model
* @param DataSource $db
* @param DataSource $db Datasource instance.
* @return void
*/
protected function _saveMulti($joined, $id, $db) {
Expand Down Expand Up @@ -2285,7 +2285,7 @@ public function saveMany($data = null, $options = array()) {
* If you do not want this to happen, make a copy of `$data` before passing it
* to this method
*
* @param array $data Record data to validate. This should be a numerically-indexed array
* @param array &$data Record data to validate. This should be a numerically-indexed array
* @param array $options Options to use when validating record data (see above), See also $options of validates().
* @return boolean|array If atomic: True on success, or false on failure.
* Otherwise: array similar to the $data array passed, but values are set to true/false
Expand Down Expand Up @@ -2485,7 +2485,7 @@ public function saveAssociated($data = null, $options = array()) {
* Helper method for saveAll() and friends, to add foreign key to fieldlist
*
* @param string $key fieldname to be added to list
* @param array $options
* @param array $options Options list
* @return array $options
*/
protected function _addToWhiteList($key, $options) {
Expand Down Expand Up @@ -2520,7 +2520,7 @@ protected function _addToWhiteList($key, $options) {
* If you do not want this to happen, make a copy of `$data` before passing it
* to this method
*
* @param array $data Record data to validate. This should be an array indexed by association name.
* @param array &$data Record data to validate. This should be an array indexed by association name.
* @param array $options Options to use when validating record data (see above), See also $options of validates().
* @return array|boolean If atomic: True on success, or false on failure.
* Otherwise: array similar to the $data array passed, but values are set to true/false
Expand Down Expand Up @@ -2744,7 +2744,7 @@ public function deleteAll($conditions, $cascade = true, $callbacks = false) {
/**
* Collects foreign keys from associations.
*
* @param string $type
* @param string $type Association type.
* @return array
*/
protected function _collectForeignKeys($type = 'belongsTo') {
Expand Down Expand Up @@ -2970,8 +2970,8 @@ public function buildQuery($type = 'first', $query = array()) {
* Handles the before/after filter logic for find('all') operations. Only called by Model::find().
*
* @param string $state Either "before" or "after"
* @param array $query
* @param array $results
* @param array $query Query.
* @param array $results Results.
* @return array
* @see Model::find()
*/
Expand All @@ -2987,8 +2987,8 @@ protected function _findAll($state, $query, $results = array()) {
* Handles the before/after filter logic for find('first') operations. Only called by Model::find().
*
* @param string $state Either "before" or "after"
* @param array $query
* @param array $results
* @param array $query Query.
* @param array $results Results.
* @return array
* @see Model::find()
*/
Expand All @@ -3009,8 +3009,8 @@ protected function _findFirst($state, $query, $results = array()) {
* Handles the before/after filter logic for find('count') operations. Only called by Model::find().
*
* @param string $state Either "before" or "after"
* @param array $query
* @param array $results
* @param array $query Query.
* @param array $results Results.
* @return integer The number of records found, or false
* @see Model::find()
*/
Expand Down Expand Up @@ -3061,8 +3061,8 @@ protected function _findCount($state, $query, $results = array()) {
* Handles the before/after filter logic for find('list') operations. Only called by Model::find().
*
* @param string $state Either "before" or "after"
* @param array $query
* @param array $results
* @param array $query Query.
* @param array $results Results.
* @return array Key/value pairs of primary keys/display field values of all records found
* @see Model::find()
*/
Expand Down Expand Up @@ -3122,8 +3122,8 @@ protected function _findList($state, $query, $results = array()) {
* rows and return them.
*
* @param string $state Either "before" or "after"
* @param array $query
* @param array $results
* @param array $query Query.
* @param array $results Results.
* @return array
*/
protected function _findNeighbors($state, $query, $results = array()) {
Expand Down Expand Up @@ -3183,9 +3183,9 @@ protected function _findNeighbors($state, $query, $results = array()) {
* In the event of ambiguous results returned (multiple top level results, with different parent_ids)
* top level results with different parent_ids to the first result will be dropped
*
* @param string $state
* @param mixed $query
* @param array $results
* @param string $state Either "before" or "after".
* @param array $query Query.
* @param array $results Results.
* @return array Threaded results
*/
protected function _findThreaded($state, $query, $results = array()) {
Expand Down Expand Up @@ -3295,11 +3295,14 @@ public function isUnique($fields, $or = true) {
/**
* Returns a resultset for a given SQL statement. Custom SQL queries should be performed with this method.
*
* @param string $sql SQL statement
* @param boolean|array $params Either a boolean to control query caching or an array of parameters
* The method can options 2nd and 3rd parameters.
*
* - 2nd param: Either a boolean to control query caching or an array of parameters
* for use with prepared statement placeholders.
* @param boolean $cache If $params is provided, a boolean flag for enabling/disabled
* query caching.
* - 3rd param: If 2nd argument is provided, a boolean flag for enabling/disabled
* query caching.
*
* @param string $sql SQL statement
* @return mixed Resultset array or boolean indicating success / failure depending on the query executed
* @link http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#model-query
*/
Expand Down Expand Up @@ -3723,7 +3726,7 @@ protected function _clearCache($type = null) {
/**
* Returns an instance of a model validator for this class
*
* @param ModelValidator Model validator instance.
* @param ModelValidator $instance Model validator instance.
* If null a new ModelValidator instance will be made using current model object
* @return ModelValidator
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Network/Email/AbstractTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ abstract class AbstractTransport {
/**
* Send mail
*
* @param CakeEmail $email
* @param CakeEmail $email CakeEmail instance.
* @return array
*/
abstract public function send(CakeEmail $email);

/**
* Set the config
*
* @param array $config
* @param array $config Configuration options.
* @return array Returns configs
*/
public function config($config = null) {
Expand All @@ -55,7 +55,7 @@ public function config($config = null) {
* Help to convert headers in string
*
* @param array $headers Headers in format key => value
* @param string $eol
* @param string $eol End of line string.
* @return string
*/
protected function _headersToString($headers, $eol = "\r\n") {
Expand Down
Loading

0 comments on commit 1d40f3e

Please sign in to comment.