Browse Source

Fix docblock CS errors.

ADmad 11 years ago
parent
commit
efe6c0501b

+ 2 - 2
src/Collection/Collection.php

@@ -31,8 +31,8 @@ class Collection extends IteratorIterator implements JsonSerializable {
 /**
  * Constructor. You can provide an array or any traversable object
  *
- * @param array|\Traversable $items
- * @throws InvalidArgumentException if passed incorrect type for items.
+ * @param array|\Traversable $items Items.
+ * @throws InvalidArgumentException If passed incorrect type for items.
  */
 	public function __construct($items) {
 		if (is_array($items)) {

+ 2 - 2
src/Collection/CollectionTrait.php

@@ -626,7 +626,7 @@ trait CollectionTrait {
  * Returns a new collection as the result of concatenating the list of elements
  * in this collection with the passed list of elements
  *
- * @param array|\Traversable $items
+ * @param array|\Traversable $items Items list.
  * @return \Cake\Collection\Collection
  */
 	public function append($items) {
@@ -790,7 +790,7 @@ trait CollectionTrait {
  *
  * @param string $path a dot separated string symbolizing the path to follow
  * inside the hierarchy of each value so that the value can be inserted
- * @param array|\Traversable The values to be inserted at the specified path,
+ * @param mixed $values The values to be inserted at the specified path,
  * values are matched with the elements in this collection by its positional index.
  * @return \Cake\Collection\Iterator\InsertIterator
  */

+ 2 - 1
src/Console/TaskRegistry.php

@@ -33,7 +33,7 @@ class TaskRegistry extends ObjectRegistry {
 /**
  * Constructor
  *
- * @param Shell $Shell
+ * @param Shell $Shell Shell instance
  */
 	public function __construct(Shell $Shell) {
 		$this->_Shell = $Shell;
@@ -58,6 +58,7 @@ class TaskRegistry extends ObjectRegistry {
  *
  * @param string $class The classname that is missing.
  * @param string $plugin The plugin the task is missing in.
+ * @return void
  * @throws \Cake\Console\Error\MissingTaskException
  */
 	protected function _throwMissingClassError($class, $plugin) {

+ 1 - 1
src/Controller/Component/Acl/AclInterface.php

@@ -66,7 +66,7 @@ interface AclInterface {
 /**
  * Initialization method for the Acl implementation
  *
- * @param Component $component
+ * @param Component $component Component instance.
  * @return void
  */
 	public function initialize(Component $component);

+ 1 - 1
src/Controller/Component/Acl/IniAcl.php

@@ -75,7 +75,7 @@ class IniAcl implements AclInterface {
 /**
  * Initialize method
  *
- * @param Component $component
+ * @param Component $component Component instance.
  * @return void
  */
 	public function initialize(Component $component) {

+ 3 - 4
src/Controller/Component/Auth/BaseAuthorize.php

@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *
@@ -87,7 +86,7 @@ abstract class BaseAuthorize {
  * Checks user authorization.
  *
  * @param array $user Active user data
- * @param \Cake\Network\Request $request
+ * @param \Cake\Network\Request $request Request instance.
  * @return bool
  */
 	abstract public function authorize($user, Request $request);
@@ -115,8 +114,8 @@ abstract class BaseAuthorize {
  * that need to get information about the plugin, controller, and action being invoked.
  *
  * @param \Cake\Network\Request $request The request a path is needed for.
- * @param string $path
- * @return string the action path for the given request.
+ * @param string $path Path
+ * @return string The action path for the given request.
  */
 	public function action(Request $request, $path = '/:plugin/:controller/:action') {
 		$plugin = empty($request['plugin']) ? null : Inflector::camelize($request['plugin']) . '/';

+ 1 - 1
src/Controller/Component/Auth/ControllerAuthorize.php

@@ -60,7 +60,7 @@ class ControllerAuthorize extends BaseAuthorize {
  * Checks user authorization using a controller callback.
  *
  * @param array $user Active user data
- * @param \Cake\Network\Request $request
+ * @param \Cake\Network\Request $request Request instance.
  * @return bool
  */
 	public function authorize($user, Request $request) {

+ 1 - 0
src/Controller/Component/AuthComponent.php

@@ -767,6 +767,7 @@ class AuthComponent extends Component {
  * Set a flash message. Uses the Session component, and values from `flash` config.
  *
  * @param string $message The message to set.
+ * @param string $type Message type. Defaults to 'error'.
  * @return void
  */
 	public function flash($message, $type = 'error') {

+ 2 - 1
src/Controller/Component/CsrfComponent.php

@@ -69,7 +69,7 @@ class CsrfComponent extends Component {
  * RequestAction requests do not get checked, nor will
  * they set a cookie should it be missing.
  *
- * @param \Cake\Event\Event $event
+ * @param \Cake\Event\Event $event Event instance.
  * @return void
  */
 	public function startup(Event $event) {
@@ -114,6 +114,7 @@ class CsrfComponent extends Component {
  *
  * @param \Cake\Network\Request $request The request object.
  * @param \Cake\Network\Response $response The response object.
+ * @return void
  */
 	protected function _setCookie(Request $request, Response $response) {
 		$value = Security::hash(String::uuid(), 'sha1', true);

+ 1 - 1
src/Controller/Component/RequestHandlerComponent.php

@@ -251,7 +251,7 @@ class RequestHandlerComponent extends Component {
  * Helper method to parse xml input data, due to lack of anonymous functions
  * this lives here.
  *
- * @param string $xml
+ * @param string $xml Xml string
  * @return array Xml array data
  */
 	public function convertXml($xml) {

+ 2 - 2
src/Controller/Component/SecurityComponent.php

@@ -144,7 +144,7 @@ class SecurityComponent extends Component {
 /**
  * Sets the actions that require a request that is SSL-secured, or empty for all actions
  *
- * @param string|array $actions
+ * @param string|array $actions Actions list
  * @return void
  * @link http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::requireSecure
  */
@@ -159,7 +159,7 @@ class SecurityComponent extends Component {
  * set in SecurityComponent::$allowedControllers and
  * SecurityComponent::$allowedActions.
  *
- * @param string|array $actions
+ * @param string|array $actions Actions list
  * @return void
  * @link http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#SecurityComponent::requireAuth
  */

+ 2 - 1
src/Controller/ComponentRegistry.php

@@ -36,7 +36,7 @@ class ComponentRegistry extends ObjectRegistry {
 /**
  * Constructor.
  *
- * @param \Cake\Controller\Controller $Controller
+ * @param \Cake\Controller\Controller $Controller Controller instance.
  */
 	public function __construct(Controller $Controller = null) {
 		if ($Controller) {
@@ -75,6 +75,7 @@ class ComponentRegistry extends ObjectRegistry {
  *
  * @param string $class The classname that is missing.
  * @param string $plugin The plugin the component is missing in.
+ * @return void
  * @throws \Cake\Controller\Error\MissingComponentException
  */
 	protected function _throwMissingClassError($class, $plugin) {

+ 4 - 4
src/Controller/Controller.php

@@ -297,7 +297,7 @@ class Controller implements EventListener {
 /**
  * Provides backwards compatibility to avoid problems with empty and isset to alias properties.
  *
- * @param string $name
+ * @param string $name Property name
  * @return bool
  */
 	public function __get($name) {
@@ -326,7 +326,7 @@ class Controller implements EventListener {
  * - View::$view - To the $request->params['action']
  * - View::$autoLayout - To the false if $request->params['bare']; is set.
  *
- * @param \Cake\Network\Request $request
+ * @param \Cake\Network\Request $request Request instance.
  * @return void
  */
 	public function setRequest(Request $request) {
@@ -487,10 +487,10 @@ class Controller implements EventListener {
  *
  * Useful for testing
  *
- * @param \Cake\Event\EventManager $eventManager
+ * @param \Cake\Event\EventManager $eventManager Event manager instance
  * @return void
  */
-	public function setEventManager($eventManager) {
+	public function setEventManager(EventManager $eventManager) {
 		$this->_eventManager = $eventManager;
 	}
 

+ 6 - 0
src/Controller/Error/MissingActionException.php

@@ -22,8 +22,14 @@ use Cake\Error\Exception;
  */
 class MissingActionException extends Exception {
 
+/**
+ * {@inheritDoc}
+ */
 	protected $_messageTemplate = 'Action %s::%s() could not be found.';
 
+/**
+ * {@inheritDoc}
+ */
 	public function __construct($message, $code = 404) {
 		parent::__construct($message, $code);
 	}

+ 6 - 0
src/Controller/Error/MissingControllerException.php

@@ -22,8 +22,14 @@ use Cake\Error\Exception;
  */
 class MissingControllerException extends Exception {
 
+/**
+ * {@inheritDoc}
+ */
 	protected $_messageTemplate = 'Controller class %s could not be found.';
 
+/**
+ * {@inheritDoc}
+ */
 	public function __construct($message, $code = 404) {
 		parent::__construct($message, $code);
 	}

+ 2 - 2
src/Controller/ErrorController.php

@@ -26,8 +26,8 @@ class ErrorController extends Controller {
 /**
  * Constructor
  *
- * @param \Cake\Network\Request $request
- * @param \Cake\Network\Response $response
+ * @param \Cake\Network\Request $request Request instance.
+ * @param \Cake\Network\Response $response Reponse instance.
  */
 	public function __construct($request = null, $response = null) {
 		parent::__construct($request, $response);

+ 4 - 4
src/Core/App.php

@@ -105,8 +105,8 @@ class App {
  *
  * Test isolation wrapper
  *
- * @param string $name
- * @param string $namespace
+ * @param string $name Class name.
+ * @param string $namespace Namespace.
  * @return bool
  */
 	protected static function _classExistsInBase($name, $namespace) {
@@ -171,8 +171,8 @@ class App {
  *
  * Will return the full path to the cache engines package.
  *
- * @param string $type
- * @return array full path to package
+ * @param string $type Package type.
+ * @return array Full path to package
  * @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::core
  */
 	public static function core($type) {

+ 5 - 5
src/Core/Configure.php

@@ -73,11 +73,11 @@ class Configure {
  * ]);
  * }}}
  *
- * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::write
  * @param string|array $config The key to write, can be a dot notation value.
  * Alternatively can be an array containing key(s) and value(s).
  * @param mixed $value Value to set for var
  * @return bool True if write was successful
+ * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::write
  */
 	public static function write($config, $value = null) {
 		if (!is_array($config)) {
@@ -109,9 +109,9 @@ class Configure {
  * Configure::read('Name.key'); will return only the value of Configure::Name[key]
  * }}}
  *
- * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::read
  * @param string $var Variable to obtain. Use '.' to access array elements.
  * @return mixed value stored in configure, or null.
+ * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::read
  */
 	public static function read($var = null) {
 		if ($var === null) {
@@ -142,9 +142,9 @@ class Configure {
  * Configure::delete('Name.key'); will delete only the Configure::Name[key]
  * }}}
  *
- * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::delete
  * @param string $var the var to be deleted
  * @return void
+ * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::delete
  */
 	public static function delete($var = null) {
 		static::$_values = Hash::remove(static::$_values, $var);
@@ -195,7 +195,7 @@ class Configure {
 /**
  * Gets the names of the configured Engine objects.
  *
- * @param string $name
+ * @param string $name Engine name.
  * @return array Array of the configured Engine objects.
  */
 	public static function configured($name = null) {
@@ -238,11 +238,11 @@ class Configure {
  * If using `default` config and no engine has been configured for it yet,
  * one will be automatically created using PhpConfig
  *
- * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::load
  * @param string $key name of configuration resource to load.
  * @param string $config Name of the configured engine to use to read the resource identified by $key.
  * @param bool $merge if config files should be merged instead of simply overridden
  * @return mixed false if file not found, void if load successful.
+ * @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::load
  */
 	public static function load($key, $config = 'default', $merge = true) {
 		$engine = static::_getEngine($config);

+ 7 - 7
src/Core/InstanceConfigTrait.php

@@ -88,7 +88,7 @@ trait InstanceConfigTrait {
 /**
  * Read a config variable
  *
- * @param string|null $key
+ * @param string|null $key Key to read.
  * @return mixed
  */
 	protected function _configRead($key) {
@@ -118,11 +118,11 @@ trait InstanceConfigTrait {
 /**
  * Write a config variable
  *
- * @throws Cake\Error\Exception if attempting to clobber existing config
- * @param string|array $key
- * @param mixed $value
- * @param bool $merge
+ * @param string|array $key Key to write to.
+ * @param mixed $value Value to write.
+ * @param bool $merge Whether to merge or overwrite value.
  * @return void
+ * @throws Cake\Error\Exception if attempting to clobber existing config
  */
 	protected function _configWrite($key, $value, $merge = null) {
 		if (is_string($key) && $value === null) {
@@ -172,9 +172,9 @@ trait InstanceConfigTrait {
 /**
  * Delete a single config key
  *
- * @throws Cake\Error\Exception if attempting to clobber existing config
- * @param string $key
+ * @param string $key Key to delete.
  * @return void
+ * @throws Cake\Error\Exception if attempting to clobber existing config
  */
 	protected function _configDelete($key) {
 		if (strpos($key, '.') === false) {

+ 3 - 3
src/Core/Plugin.php

@@ -172,7 +172,7 @@ class Plugin {
  *
  * If a plugin has been loaded already, it will not be reloaded by loadAll().
  *
- * @param array $options
+ * @param array $options Options.
  * @return void
  */
 	public static function loadAll(array $options = []) {
@@ -268,9 +268,9 @@ class Plugin {
  * Returns true if the plugin $plugin is already loaded
  * If plugin is null, it will return a list of all loaded plugins
  *
- * @param string $plugin
+ * @param string $plugin Plugin name.
  * @return mixed boolean true if $plugin is already loaded.
- * If $plugin is null, returns a list of plugins that have been loaded
+ *   If $plugin is null, returns a list of plugins that have been loaded
  */
 	public static function loaded($plugin = null) {
 		if ($plugin) {