Commit bf3c7514 by Carsten Brandt

reverted breaking PHPdoc codestyle changes

issue #2852
parent d1363d96
......@@ -118,10 +118,10 @@ class BaseYii
*
* Note, this method does not check if the returned path exists or not.
*
* @param string $alias the alias to be translated.
* @param boolean $throwException whether to throw an exception if the given alias is invalid.
* If this is false and an invalid alias is given, false will be returned by this method.
* @return string|boolean the path corresponding to the alias, false if the root alias is not previously registered.
* @param string $alias the alias to be translated.
* @param boolean $throwException whether to throw an exception if the given alias is invalid.
* If this is false and an invalid alias is given, false will be returned by this method.
* @return string|boolean the path corresponding to the alias, false if the root alias is not previously registered.
* @throws InvalidParamException if the alias is invalid while $throwException is true.
* @see setAlias()
*/
......@@ -158,7 +158,7 @@ class BaseYii
* Returns the root alias part of a given alias.
* A root alias is an alias that has been registered via [[setAlias()]] previously.
* If a given alias matches multiple root aliases, the longest one will be returned.
* @param string $alias the alias
* @param string $alias the alias
* @return string|boolean the root alias, or false if no root alias is found
*/
public static function getRootAlias($alias)
......@@ -196,10 +196,10 @@ class BaseYii
* Any trailing '/' and '\' characters in the given path will be trimmed.
*
* @param string $alias the alias name (e.g. "@yii"). It must start with a '@' character.
* It may contain the forward slash '/' which serves as boundary character when performing
* alias translation by [[getAlias()]].
* @param string $path the path corresponding to the alias. Trailing '/' and '\' characters
* will be trimmed. This can be
* It may contain the forward slash '/' which serves as boundary character when performing
* alias translation by [[getAlias()]].
* @param string $path the path corresponding to the alias. Trailing '/' and '\' characters
* will be trimmed. This can be
*
* - a directory or a file path (e.g. `/tmp`, `/tmp/main.txt`)
* - a URL (e.g. `http://www.yiiframework.com`)
......@@ -263,7 +263,7 @@ class BaseYii
* will be loaded using the `@yii/bootstrap` alias which points to the directory where bootstrap extension
* files are installed and all classes from other `yii` namespaces will be loaded from the yii framework directory.
*
* @param string $className the fully qualified class name without a leading backslash "\"
* @param string $className the fully qualified class name without a leading backslash "\"
* @throws UnknownClassException if the class does not exist in the class file
*/
public static function autoload($className)
......@@ -352,7 +352,7 @@ class BaseYii
* Logs a trace message.
* Trace messages are logged mainly for development purpose to see
* the execution work flow of some code.
* @param string $message the message to be logged.
* @param string $message the message to be logged.
* @param string $category the category of the message.
*/
public static function trace($message, $category = 'application')
......@@ -366,7 +366,7 @@ class BaseYii
* Logs an error message.
* An error message is typically logged when an unrecoverable error occurs
* during the execution of an application.
* @param string $message the message to be logged.
* @param string $message the message to be logged.
* @param string $category the category of the message.
*/
public static function error($message, $category = 'application')
......@@ -378,7 +378,7 @@ class BaseYii
* Logs a warning message.
* A warning message is typically logged when an error occurs while the execution
* can still continue.
* @param string $message the message to be logged.
* @param string $message the message to be logged.
* @param string $category the category of the message.
*/
public static function warning($message, $category = 'application')
......@@ -390,7 +390,7 @@ class BaseYii
* Logs an informative message.
* An informative message is typically logged by an application to keep record of
* something important (e.g. an administrator logs in).
* @param string $message the message to be logged.
* @param string $message the message to be logged.
* @param string $category the category of the message.
*/
public static function info($message, $category = 'application')
......@@ -411,7 +411,7 @@ class BaseYii
* \Yii::endProfile('block2');
* \Yii::endProfile('block1');
* ~~~
* @param string $token token for the code block
* @param string $token token for the code block
* @param string $category the category of this log message
* @see endProfile()
*/
......@@ -423,7 +423,7 @@ class BaseYii
/**
* Marks the end of a code block for profiling.
* This has to be matched with a previous call to [[beginProfile]] with the same category name.
* @param string $token token for the code block
* @param string $token token for the code block
* @param string $category the category of this log message
* @see beginProfile()
*/
......@@ -459,11 +459,11 @@ class BaseYii
* Further formatting of message parameters is supported using the [PHP intl extensions](http://www.php.net/manual/en/intro.intl.php)
* message formatter. See [[\yii\i18n\I18N::translate()]] for more details.
*
* @param string $category the message category.
* @param string $message the message to be translated.
* @param array $params the parameters that will be used to replace the corresponding placeholders in the message.
* @param string $language the language code (e.g. `en-US`, `en`). If this is null, the current
* [[\yii\base\Application::language|application language]] will be used.
* @param string $category the message category.
* @param string $message the message to be translated.
* @param array $params the parameters that will be used to replace the corresponding placeholders in the message.
* @param string $language the language code (e.g. `en-US`, `en`). If this is null, the current
* [[\yii\base\Application::language|application language]] will be used.
* @return string the translated message.
*/
public static function t($category, $message, $params = [], $language = null)
......@@ -482,8 +482,8 @@ class BaseYii
/**
* Configures an object with the initial property values.
* @param object $object the object to be configured
* @param array $properties the property initial values given in terms of name-value pairs.
* @param object $object the object to be configured
* @param array $properties the property initial values given in terms of name-value pairs.
* @return object the object itself
*/
public static function configure($object, $properties)
......@@ -500,8 +500,8 @@ class BaseYii
* This method is provided such that we can get the public member variables of an object.
* It is different from "get_object_vars()" because the latter will return private
* and protected variables if it is called within the object itself.
* @param object $object the object to be handled
* @return array the public member variables of the object
* @param object $object the object to be handled
* @return array the public member variables of the object
*/
public static function getObjectVars($object)
{
......
......@@ -48,9 +48,9 @@ class Action extends Component
/**
* Constructor.
*
* @param string $id the ID of this action
* @param string $id the ID of this action
* @param Controller $controller the controller that owns this action
* @param array $config name-value pairs that will be used to initialize the object properties
* @param array $config name-value pairs that will be used to initialize the object properties
*/
public function __construct($id, $controller, $config = [])
{
......@@ -74,8 +74,7 @@ class Action extends Component
* This method is mainly invoked by the controller.
*
* @param array $params the parameters to be bound to the action's run() method.
*
* @return mixed the result of the action
* @return mixed the result of the action
* @throws InvalidConfigException if the action class does not have a run() method
*/
public function runWithParams($params)
......
......@@ -35,7 +35,7 @@ class ActionEvent extends Event
/**
* Constructor.
* @param Action $action the action associated with this action event.
* @param array $config name-value pairs that will be used to initialize the object properties
* @param array $config name-value pairs that will be used to initialize the object properties
*/
public function __construct($action, $config = [])
{
......
......@@ -44,7 +44,7 @@ class ActionFilter extends Behavior
}
/**
* @param ActionEvent $event
* @param ActionEvent $event
* @return boolean
*/
public function beforeFilter($event)
......@@ -60,7 +60,7 @@ class ActionFilter extends Behavior
}
/**
* @param ActionEvent $event
* @param ActionEvent $event
* @return boolean
*/
public function afterFilter($event)
......@@ -73,7 +73,7 @@ class ActionFilter extends Behavior
/**
* This method is invoked right before an action is to be executed (after all possible filters.)
* You may override this method to do last-minute preparation for the action.
* @param Action $action the action to be executed.
* @param Action $action the action to be executed.
* @return boolean whether the action should continue to be executed.
*/
public function beforeAction($action)
......@@ -84,9 +84,9 @@ class ActionFilter extends Behavior
/**
* This method is invoked right after an action is executed.
* You may override this method to do some postprocessing for the action.
* @param Action $action the action just executed.
* @param mixed $result the action execution result
* @return mixed the processed action result.
* @param Action $action the action just executed.
* @param mixed $result the action execution result
* @return mixed the processed action result.
*/
public function afterAction($action, $result)
{
......@@ -95,7 +95,7 @@ class ActionFilter extends Behavior
/**
* Returns a value indicating whether the filer is active for the given action.
* @param Action $action the action being filtered
* @param Action $action the action being filtered
* @return boolean whether the filer is active for the given action.
*/
protected function isActive($action)
......
......@@ -151,8 +151,8 @@ abstract class Application extends Module
/**
* Constructor.
* @param array $config name-value pairs that will be used to initialize the object properties.
* Note that the configuration must contain both [[id]] and [[basePath]].
* @param array $config name-value pairs that will be used to initialize the object properties.
* Note that the configuration must contain both [[id]] and [[basePath]].
* @throws InvalidConfigException if either [[id]] or [[basePath]] configuration is missing.
*/
public function __construct($config = [])
......@@ -170,7 +170,7 @@ abstract class Application extends Module
* This method is called at the beginning of the application constructor.
* It initializes several important application properties.
* If you override this method, please make sure you call the parent implementation.
* @param array $config the application configuration
* @param array $config the application configuration
* @throws InvalidConfigException if either [[id]] or [[basePath]] configuration is missing.
*/
public function preInit(&$config)
......@@ -234,7 +234,7 @@ abstract class Application extends Module
/**
* Initializes the extensions.
* @param array $extensions the extensions to be initialized. Please refer to [[extensions]]
* for the structure of the extension array.
* for the structure of the extension array.
*/
protected function initExtensions($extensions)
{
......@@ -291,7 +291,7 @@ abstract class Application extends Module
/**
* Sets the root directory of the application and the @app alias.
* This method can only be invoked at the beginning of the constructor.
* @param string $path the root directory of the application.
* @param string $path the root directory of the application.
* @property string the root directory of the application.
* @throws InvalidParamException if the directory does not exist.
*/
......@@ -322,7 +322,7 @@ abstract class Application extends Module
* This method should return an instance of [[Response]] or its child class
* which represents the handling result of the request.
*
* @param Request $request the request to be handled
* @param Request $request the request to be handled
* @return Response the resulting response
*/
abstract public function handleRequest($request);
......@@ -332,7 +332,7 @@ abstract class Application extends Module
/**
* Returns the directory that stores runtime files.
* @return string the directory that stores runtime files.
* Defaults to the "runtime" subdirectory under [[basePath]].
* Defaults to the "runtime" subdirectory under [[basePath]].
*/
public function getRuntimePath()
{
......@@ -358,7 +358,7 @@ abstract class Application extends Module
/**
* Returns the directory that stores vendor files.
* @return string the directory that stores vendor files.
* Defaults to "vendor" directory under [[basePath]].
* Defaults to "vendor" directory under [[basePath]].
*/
public function getVendorPath()
{
......@@ -568,10 +568,10 @@ abstract class Application extends Module
*
* This method is used as a PHP error handler. It will simply raise an `ErrorException`.
*
* @param integer $code the level of the error raised
* @param string $message the error message
* @param string $file the filename that the error was raised in
* @param integer $line the line number the error was raised at
* @param integer $code the level of the error raised
* @param string $message the error message
* @param string $file the filename that the error was raised in
* @param integer $line the line number the error was raised at
*
* @throws ErrorException
*/
......@@ -638,8 +638,8 @@ abstract class Application extends Module
/**
* Renders an exception without using rich format.
* @param \Exception $exception the exception to be rendered.
* @return string the rendering result
* @param \Exception $exception the exception to be rendered.
* @return string the rendering result
*/
public function renderException($exception)
{
......
......@@ -41,7 +41,7 @@ trait ArrayAccessTrait
/**
* This method is required by the interface ArrayAccess.
* @param mixed $offset the offset to check on
* @param mixed $offset the offset to check on
* @return boolean
*/
public function offsetExists($offset)
......@@ -51,8 +51,8 @@ trait ArrayAccessTrait
/**
* This method is required by the interface ArrayAccess.
* @param integer $offset the offset to retrieve element.
* @return mixed the element at the offset, null if no element is found at the offset
* @param integer $offset the offset to retrieve element.
* @return mixed the element at the offset, null if no element is found at the offset
*/
public function offsetGet($offset)
{
......@@ -62,7 +62,7 @@ trait ArrayAccessTrait
/**
* This method is required by the interface ArrayAccess.
* @param integer $offset the offset to set element
* @param mixed $item the element value
* @param mixed $item the element value
*/
public function offsetSet($offset, $item)
{
......
......@@ -70,7 +70,7 @@ interface Arrayable
* is explicitly requested, will it be included in the result of [[toArray()]].
*
* @return array the list of expandable field names or field definitions. Please refer
* to [[fields()]] on the format of the return value.
* to [[fields()]] on the format of the return value.
* @see toArray()
* @see fields()
*/
......@@ -78,13 +78,13 @@ interface Arrayable
/**
* Converts the object into an array.
*
* @param array $fields the fields that the output array should contain. Fields not specified
* in [[fields()]] will be ignored. If this parameter is empty, all fields as specified in [[fields()]] will be returned.
* @param array $expand the additional fields that the output array should contain.
* Fields not specified in [[extraFields()]] will be ignored. If this parameter is empty, no extra fields
* will be returned.
* @param boolean $recursive whether to recursively return array representation of embedded objects.
* @return array the array representation of the object
* @param array $fields the fields that the output array should contain. Fields not specified
* in [[fields()]] will be ignored. If this parameter is empty, all fields as specified in [[fields()]] will be returned.
* @param array $expand the additional fields that the output array should contain.
* Fields not specified in [[extraFields()]] will be ignored. If this parameter is empty, no extra fields
* will be returned.
* @param boolean $recursive whether to recursively return array representation of embedded objects.
* @return array the array representation of the object
*/
public function toArray(array $fields = [], array $expand = [], $recursive = true);
}
......@@ -89,7 +89,7 @@ trait ArrayableTrait
* (e.g. the current application user).
*
* @return array the list of expandable field names or field definitions. Please refer
* to [[fields()]] on the format of the return value.
* to [[fields()]] on the format of the return value.
* @see toArray()
* @see fields()
*/
......@@ -108,11 +108,11 @@ trait ArrayableTrait
* If the model implements the [[Linkable]] interface, the resulting array will also have a `_link` element
* which refers to a list of links as specified by the interface.
*
* @param array $fields the fields being requested. If empty, all fields as specified by [[fields()]] will be returned.
* @param array $expand the additional fields being requested for exporting. Only fields declared in [[extraFields()]]
* will be considered.
* @param boolean $recursive whether to recursively return array representation of embedded objects.
* @return array the array representation of the object
* @param array $fields the fields being requested. If empty, all fields as specified by [[fields()]] will be returned.
* @param array $expand the additional fields being requested for exporting. Only fields declared in [[extraFields()]]
* will be considered.
* @param boolean $recursive whether to recursively return array representation of embedded objects.
* @return array the array representation of the object
*/
public function toArray(array $fields = [], array $expand = [], $recursive = true)
{
......@@ -132,10 +132,10 @@ trait ArrayableTrait
* Determines which fields can be returned by [[toArray()]].
* This method will check the requested fields against those declared in [[fields()]] and [[extraFields()]]
* to determine which fields can be returned.
* @param array $fields the fields being requested for exporting
* @param array $expand the additional fields being requested for exporting
* @param array $fields the fields being requested for exporting
* @param array $expand the additional fields being requested for exporting
* @return array the list of fields to be exported. The array keys are the field names, and the array values
* are the corresponding object property names or PHP callables returning the field values.
* are the corresponding object property names or PHP callables returning the field values.
*/
protected function resolveFields(array $fields, array $expand)
{
......
......@@ -65,9 +65,9 @@ class Controller extends Component implements ViewContextInterface
private $_view;
/**
* @param string $id the ID of this controller.
* @param string $id the ID of this controller.
* @param Module $module the module that this controller belongs to.
* @param array $config name-value pairs that will be used to initialize the object properties.
* @param array $config name-value pairs that will be used to initialize the object properties.
*/
public function __construct($id, $module, $config = [])
{
......@@ -104,9 +104,9 @@ class Controller extends Component implements ViewContextInterface
/**
* Runs an action within this controller with the specified action ID and parameters.
* If the action ID is empty, the method will use [[defaultAction]].
* @param string $id the ID of the action to be executed.
* @param array $params the parameters (name-value pairs) to be passed to the action.
* @return mixed the result of the action.
* @param string $id the ID of the action to be executed.
* @param array $params the parameters (name-value pairs) to be passed to the action.
* @return mixed the result of the action.
* @throws InvalidRouteException if the requested action ID cannot be resolved into an action successfully.
* @see createAction()
*/
......@@ -145,9 +145,9 @@ class Controller extends Component implements ViewContextInterface
* The route can be either an ID of an action within this controller or a complete route consisting
* of module IDs, controller ID and action ID. If the route starts with a slash '/', the parsing of
* the route will start from the application; otherwise, it will start from the parent module of this controller.
* @param string $route the route to be handled, e.g., 'view', 'comment/view', '/admin/comment/view'.
* @param array $params the parameters to be passed to the action.
* @return mixed the result of the action.
* @param string $route the route to be handled, e.g., 'view', 'comment/view', '/admin/comment/view'.
* @param array $params the parameters to be passed to the action.
* @return mixed the result of the action.
* @see runAction()
*/
public function run($route, $params = [])
......@@ -165,9 +165,9 @@ class Controller extends Component implements ViewContextInterface
/**
* Binds the parameters to the action.
* This method is invoked by [[Action]] when it begins to run with the given parameters.
* @param Action $action the action to be bound with parameters.
* @param array $params the parameters to be bound to the action.
* @return array the valid parameters that the action can run with.
* @param Action $action the action to be bound with parameters.
* @param array $params the parameters to be bound to the action.
* @return array the valid parameters that the action can run with.
*/
public function bindActionParams($action, $params)
{
......@@ -181,7 +181,7 @@ class Controller extends Component implements ViewContextInterface
* If not, it will look for a controller method whose name is in the format of `actionXyz`
* where `Xyz` stands for the action ID. If found, an [[InlineAction]] representing that
* method will be created and returned.
* @param string $id the action ID.
* @param string $id the action ID.
* @return Action the newly created action instance. Null if the ID doesn't resolve into any action.
*/
public function createAction($id)
......@@ -210,7 +210,7 @@ class Controller extends Component implements ViewContextInterface
* This method is invoked right before an action is to be executed (after all possible filters).
* You may override this method to do last-minute preparation for the action.
* If you override this method, please make sure you call the parent implementation first.
* @param Action $action the action to be executed.
* @param Action $action the action to be executed.
* @return boolean whether the action should continue to be executed.
*/
public function beforeAction($action)
......@@ -226,9 +226,9 @@ class Controller extends Component implements ViewContextInterface
* You may override this method to do some postprocessing for the action.
* If you override this method, please make sure you call the parent implementation first.
* Also make sure you return the action result, whether it is processed or not.
* @param Action $action the action just executed.
* @param mixed $result the action return result.
* @return mixed the processed action result.
* @param Action $action the action just executed.
* @param mixed $result the action return result.
* @return mixed the processed action result.
*/
public function afterAction($action, $result)
{
......@@ -289,10 +289,10 @@ class Controller extends Component implements ViewContextInterface
*
* If the layout name does not contain a file extension, it will use the default one `.php`.
*
* @param string $view the view name. Please refer to [[findViewFile()]] on how to specify a view name.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* These parameters will not be available in the layout.
* @return string the rendering result.
* @param string $view the view name. Please refer to [[findViewFile()]] on how to specify a view name.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* These parameters will not be available in the layout.
* @return string the rendering result.
* @throws InvalidParamException if the view file or the layout file does not exist.
*/
public function render($view, $params = [])
......@@ -309,9 +309,9 @@ class Controller extends Component implements ViewContextInterface
/**
* Renders a view.
* This method differs from [[render()]] in that it does not apply any layout.
* @param string $view the view name. Please refer to [[render()]] on how to specify a view name.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* @return string the rendering result.
* @param string $view the view name. Please refer to [[render()]] on how to specify a view name.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* @return string the rendering result.
* @throws InvalidParamException if the view file does not exist.
*/
public function renderPartial($view, $params = [])
......@@ -321,9 +321,9 @@ class Controller extends Component implements ViewContextInterface
/**
* Renders a view file.
* @param string $file the view file to be rendered. This can be either a file path or a path alias.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* @return string the rendering result.
* @param string $file the view file to be rendered. This can be either a file path or a path alias.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* @return string the rendering result.
* @throws InvalidParamException if the view file does not exist.
*/
public function renderFile($file, $params = [])
......@@ -369,8 +369,8 @@ class Controller extends Component implements ViewContextInterface
/**
* Finds the view file based on the given view name.
* @param string $view the view name or the path alias of the view file. Please refer to [[render()]]
* on how to specify this parameter.
* @param string $view the view name or the path alias of the view file. Please refer to [[render()]]
* on how to specify this parameter.
* @return string the view file path. Note that the file may not exist.
*/
public function findViewFile($view)
......@@ -380,9 +380,9 @@ class Controller extends Component implements ViewContextInterface
/**
* Finds the applicable layout file.
* @param View $view the view object to render the layout file.
* @return string|boolean the layout file path, or false if layout is not needed.
* Please refer to [[render()]] on how to specify this parameter.
* @param View $view the view object to render the layout file.
* @return string|boolean the layout file path, or false if layout is not needed.
* Please refer to [[render()]] on how to specify this parameter.
* @throws InvalidParamException if an invalid path alias is used to specify the layout.
*/
protected function findLayoutFile($view)
......
......@@ -60,7 +60,7 @@ class DynamicModel extends Model
/**
* Constructors.
* @param array $attributes the dynamic attributes (name-value pairs, or names) being defined
* @param array $config the configuration array to be applied to this object.
* @param array $config the configuration array to be applied to this object.
*/
public function __construct(array $attributes = [], $config = [])
{
......@@ -123,8 +123,8 @@ class DynamicModel extends Model
/**
* Defines an attribute.
* @param string $name the attribute name
* @param mixed $value the attribute value
* @param string $name the attribute name
* @param mixed $value the attribute value
*/
public function defineAttribute($name, $value = null)
{
......@@ -144,11 +144,11 @@ class DynamicModel extends Model
* Adds a validation rule to this model.
* You can also directly manipulate [[validators]] to add or remove validation rules.
* This method provides a shortcut.
* @param string|array $attributes the attribute(s) to be validated by the rule
* @param mixed $validator the validator for the rule.This can be a built-in validator name,
* a method name of the model class, an anonymous function, or a validator class name.
* @param array $options the options (name-value pairs) to be applied to the validator
* @return static the model itself
* @param string|array $attributes the attribute(s) to be validated by the rule
* @param mixed $validator the validator for the rule.This can be a built-in validator name,
* a method name of the model class, an anonymous function, or a validator class name.
* @param array $options the options (name-value pairs) to be applied to the validator
* @return static the model itself
*/
public function addRule($attributes, $validator, $options = [])
{
......@@ -162,9 +162,9 @@ class DynamicModel extends Model
* Validates the given data with the specified validation rules.
* This method will create a DynamicModel instance, populate it with the data to be validated,
* create the specified validation rules, and then validate the data using these rules.
* @param array $data the data (name-value pairs) to be validated
* @param array $rules the validation rules. Please refer to [[Model::rules()]] on the format of this parameter.
* @return static the model instance that contains the data being validated
* @param array $data the data (name-value pairs) to be validated
* @param array $rules the validation rules. Please refer to [[Model::rules()]] on the format of this parameter.
* @return static the model instance that contains the data being validated
* @throws InvalidConfigException if a validation rule is not specified correctly.
*/
public static function validateData(array $data, $rules = [])
......
......@@ -63,7 +63,7 @@ class ErrorException extends \ErrorException
/**
* Returns if error is one of fatal type.
*
* @param array $error error got from error_get_last()
* @param array $error error got from error_get_last()
* @return boolean if error is one of fatal type
*/
public static function isFatalError($error)
......
......@@ -134,8 +134,8 @@ class ErrorHandler extends Component
/**
* Converts an exception into an array.
* @param \Exception $exception the exception being converted
* @return array the array representation of the exception.
* @param \Exception $exception the exception being converted
* @return array the array representation of the exception.
*/
protected function convertExceptionToArray($exception)
{
......@@ -157,7 +157,7 @@ class ErrorHandler extends Component
/**
* Converts special characters to HTML entities.
* @param string $text to encode.
* @param string $text to encode.
* @return string encoded original text.
*/
public function htmlEncode($text)
......@@ -180,7 +180,7 @@ class ErrorHandler extends Component
/**
* Adds informational links to the given PHP type/class.
* @param string $code type/class name to be linkified.
* @param string $code type/class name to be linkified.
* @return string linkified with HTML type/class name.
*/
public function addTypeLinks($code)
......@@ -205,8 +205,8 @@ class ErrorHandler extends Component
/**
* Renders a view file as a PHP script.
* @param string $_file_ the view file.
* @param array $_params_ the parameters (name-value pairs) that will be extracted and made available in the view file.
* @param string $_file_ the view file.
* @param array $_params_ the parameters (name-value pairs) that will be extracted and made available in the view file.
* @return string the rendering result
*/
public function renderFile($_file_, $_params_)
......@@ -226,9 +226,9 @@ class ErrorHandler extends Component
/**
* Renders the previous exception stack for a given Exception.
* @param \Exception $exception the exception whose precursors should be rendered.
* @return string HTML content of the rendered previous exceptions.
* Empty string if there are none.
* @param \Exception $exception the exception whose precursors should be rendered.
* @return string HTML content of the rendered previous exceptions.
* Empty string if there are none.
*/
public function renderPreviousExceptions($exception)
{
......@@ -241,12 +241,12 @@ class ErrorHandler extends Component
/**
* Renders a single call stack element.
* @param string|null $file name where call has happened.
* @param integer|null $line number on which call has happened.
* @param string|null $class called class name.
* @param string|null $method called function/method name.
* @param integer $index number of the call stack element.
* @return string HTML content of the rendered call stack element.
* @param string|null $file name where call has happened.
* @param integer|null $line number on which call has happened.
* @param string|null $class called class name.
* @param string|null $method called function/method name.
* @param integer $index number of the call stack element.
* @return string HTML content of the rendered call stack element.
*/
public function renderCallStackItem($file, $line, $class, $method, $index)
{
......@@ -294,7 +294,7 @@ class ErrorHandler extends Component
/**
* Determines whether given name of the file belongs to the framework.
* @param string $file name to be checked.
* @param string $file name to be checked.
* @return boolean whether given name of the file belongs to the framework.
*/
public function isCoreFile($file)
......@@ -304,9 +304,9 @@ class ErrorHandler extends Component
/**
* Creates HTML containing link to the page with the information on given HTTP status code.
* @param integer $statusCode to be used to generate information link.
* @param string $statusDescription Description to display after the the status code.
* @return string generated HTML with HTTP status code information.
* @param integer $statusCode to be used to generate information link.
* @param string $statusDescription Description to display after the the status code.
* @return string generated HTML with HTTP status code information.
*/
public function createHttpStatusLink($statusCode, $statusDescription)
{
......
......@@ -69,11 +69,11 @@ class Event extends Object
*
* For more details about how to declare an event handler, please refer to [[Component::on()]].
*
* @param string $class the fully qualified class name to which the event handler needs to attach.
* @param string $name the event name.
* @param string $class the fully qualified class name to which the event handler needs to attach.
* @param string $name the event name.
* @param callable $handler the event handler.
* @param mixed $data the data to be passed to the event handler when the event is triggered.
* When the event handler is invoked, this data can be accessed via [[Event::data]].
* @param mixed $data the data to be passed to the event handler when the event is triggered.
* When the event handler is invoked, this data can be accessed via [[Event::data]].
* @see off()
*/
public static function on($class, $name, $handler, $data = null)
......@@ -86,11 +86,11 @@ class Event extends Object
*
* This method is the opposite of [[on()]].
*
* @param string $class the fully qualified class name from which the event handler needs to be detached.
* @param string $name the event name.
* @param callable $handler the event handler to be removed.
* If it is null, all handlers attached to the named event will be removed.
* @return boolean whether a handler is found and detached.
* @param string $class the fully qualified class name from which the event handler needs to be detached.
* @param string $name the event name.
* @param callable $handler the event handler to be removed.
* If it is null, all handlers attached to the named event will be removed.
* @return boolean whether a handler is found and detached.
* @see on()
*/
public static function off($class, $name, $handler = null)
......@@ -123,9 +123,9 @@ class Event extends Object
* Returns a value indicating whether there is any handler attached to the specified class-level event.
* Note that this method will also check all parent classes to see if there is any handler attached
* to the named event.
* @param string|object $class the object or the fully qualified class name specifying the class-level event.
* @param string $name the event name.
* @return boolean whether there is any handler attached to the event.
* @param string|object $class the object or the fully qualified class name specifying the class-level event.
* @param string $name the event name.
* @return boolean whether there is any handler attached to the event.
*/
public static function hasHandlers($class, $name)
{
......@@ -151,8 +151,8 @@ class Event extends Object
* This method will cause invocation of event handlers that are attached to the named event
* for the specified class and all its parent classes.
* @param string|object $class the object or the fully qualified class name specifying the class-level event.
* @param string $name the event name.
* @param Event $event the event parameter. If not set, a default [[Event]] object will be created.
* @param string $name the event name.
* @param Event $event the event parameter. If not set, a default [[Event]] object will be created.
*/
public static function trigger($class, $name, $event = null)
{
......
......@@ -26,10 +26,10 @@ class InlineAction extends Action
public $actionMethod;
/**
* @param string $id the ID of this action
* @param Controller $controller the controller that owns this action
* @param string $actionMethod the controller method that this inline action is associated with
* @param array $config name-value pairs that will be used to initialize the object properties
* @param string $id the ID of this action
* @param Controller $controller the controller that owns this action
* @param string $actionMethod the controller method that this inline action is associated with
* @param array $config name-value pairs that will be used to initialize the object properties
*/
public function __construct($id, $controller, $actionMethod, $config = [])
{
......@@ -40,7 +40,7 @@ class InlineAction extends Action
/**
* Runs this action with the specified parameters.
* This method is mainly invoked by the controller.
* @param array $params action parameters
* @param array $params action parameters
* @return mixed the result of the action
*/
public function runWithParams($params)
......
......@@ -120,10 +120,10 @@ class Object
*
* Do not call this method directly as it is a PHP magic method that
* will be implicitly called when executing `$value = $object->property;`.
* @param string $name the property name
* @return mixed the property value
* @param string $name the property name
* @return mixed the property value
* @throws UnknownPropertyException if the property is not defined
* @throws InvalidCallException if the property is write-only
* @throws InvalidCallException if the property is write-only
* @see __set()
*/
public function __get($name)
......@@ -143,10 +143,10 @@ class Object
*
* Do not call this method directly as it is a PHP magic method that
* will be implicitly called when executing `$object->property = $value;`.
* @param string $name the property name or the event name
* @param mixed $value the property value
* @param string $name the property name or the event name
* @param mixed $value the property value
* @throws UnknownPropertyException if the property is not defined
* @throws InvalidCallException if the property is read-only
* @throws InvalidCallException if the property is read-only
* @see __get()
*/
public function __set($name, $value)
......@@ -168,7 +168,7 @@ class Object
* will be implicitly called when executing `isset($object->property)`.
*
* Note that if the property is not defined, false will be returned.
* @param string $name the property name or the event name
* @param string $name the property name or the event name
* @return boolean whether the named property is set (not null).
*/
public function __isset($name)
......@@ -189,7 +189,7 @@ class Object
*
* Note that if the property is not defined, this method will do nothing.
* If the property is read-only, it will throw an exception.
* @param string $name the property name
* @param string $name the property name
* @throws InvalidCallException if the property is read only.
*/
public function __unset($name)
......@@ -207,10 +207,10 @@ class Object
*
* Do not call this method directly as it is a PHP magic method that
* will be implicitly called when an unknown method is being invoked.
* @param string $name the method name
* @param array $params method parameters
* @param string $name the method name
* @param array $params method parameters
* @throws UnknownMethodException when calling unknown method
* @return mixed the method return value
* @return mixed the method return value
*/
public function __call($name, $params)
{
......@@ -225,8 +225,8 @@ class Object
* (in this case, property name is case-insensitive);
* - the class has a member variable with the specified name (when `$checkVars` is true);
*
* @param string $name the property name
* @param boolean $checkVars whether to treat member variables as properties
* @param string $name the property name
* @param boolean $checkVars whether to treat member variables as properties
* @return boolean whether the property is defined
* @see canGetProperty()
* @see canSetProperty()
......@@ -244,8 +244,8 @@ class Object
* (in this case, property name is case-insensitive);
* - the class has a member variable with the specified name (when `$checkVars` is true);
*
* @param string $name the property name
* @param boolean $checkVars whether to treat member variables as properties
* @param string $name the property name
* @param boolean $checkVars whether to treat member variables as properties
* @return boolean whether the property can be read
* @see canSetProperty()
*/
......@@ -262,8 +262,8 @@ class Object
* (in this case, property name is case-insensitive);
* - the class has a member variable with the specified name (when `$checkVars` is true);
*
* @param string $name the property name
* @param boolean $checkVars whether to treat member variables as properties
* @param string $name the property name
* @param boolean $checkVars whether to treat member variables as properties
* @return boolean whether the property can be written
* @see canGetProperty()
*/
......@@ -277,7 +277,7 @@ class Object
*
* The default implementation is a call to php function `method_exists()`.
* You may override this method when you implemented the php magic method `__call()`.
* @param string $name the property name
* @param string $name the property name
* @return boolean whether the property is defined
*/
public function hasMethod($name)
......
......@@ -49,7 +49,7 @@ abstract class Request extends Component
/**
* Returns entry script file path.
* @return string entry script file path (processed w/ realpath())
* @return string entry script file path (processed w/ realpath())
* @throws InvalidConfigException if the entry script file path cannot be determined automatically.
*/
public function getScriptFile()
......@@ -70,7 +70,7 @@ abstract class Request extends Component
* The entry script file path can normally be determined based on the `SCRIPT_FILENAME` SERVER variable.
* However, for some server configurations, this may not be correct or feasible.
* This setter is provided so that the entry script file path can be manually specified.
* @param string $value the entry script file path. This can be either a file path or a path alias.
* @param string $value the entry script file path. This can be either a file path or a path alias.
* @throws InvalidConfigException if the provided entry script file path is invalid.
*/
public function setScriptFile($value)
......
......@@ -94,7 +94,7 @@ class Theme extends Component
/**
* @return string the base URL (without ending slash) for this theme. All resources of this theme are considered
* to be under this base URL.
* to be under this base URL.
*/
public function getBaseUrl()
{
......@@ -123,7 +123,7 @@ class Theme extends Component
/**
* @param string $path the root path or path alias of this theme. All resources of this theme are located
* under this directory.
* under this directory.
* @see pathMap
*/
public function setBasePath($path)
......@@ -134,7 +134,7 @@ class Theme extends Component
/**
* Converts a file to a themed file if possible.
* If there is no corresponding themed file, the original file will be returned.
* @param string $path the file to be themed
* @param string $path the file to be themed
* @return string the themed file, or the original file if the themed version is not available.
*/
public function applyTo($path)
......@@ -159,8 +159,8 @@ class Theme extends Component
/**
* Converts a relative URL into an absolute URL using [[baseUrl]].
* @param string $url the relative URL to be converted.
* @return string the absolute URL
* @param string $url the relative URL to be converted.
* @return string the absolute URL
* @throws InvalidConfigException if [[baseUrl]] is not set
*/
public function getUrl($url)
......@@ -172,7 +172,6 @@ class Theme extends Component
}
}
/**
* Converts a relative file path into an absolute one using [[basePath]].
* @param string $path the relative file path to be converted.
......
......@@ -129,12 +129,12 @@ class View extends Component
* The actual view file will be looked for under the [[Module::viewPath|view path]] of [[module]].
* - resolving any other format will be performed via [[ViewContext::findViewFile()]].
*
* @param string $view the view name. Please refer to [[Controller::findViewFile()]]
* and [[Widget::findViewFile()]] on how to specify this parameter.
* @param array $params the parameters (name-value pairs) that will be extracted and made available in the view file.
* @param object $context the context that the view should use for rendering the view. If null,
* existing [[context]] will be used.
* @return string the rendering result
* @param string $view the view name. Please refer to [[Controller::findViewFile()]]
* and [[Widget::findViewFile()]] on how to specify this parameter.
* @param array $params the parameters (name-value pairs) that will be extracted and made available in the view file.
* @param object $context the context that the view should use for rendering the view. If null,
* existing [[context]] will be used.
* @return string the rendering result
* @throws InvalidParamException if the view cannot be resolved or the view file does not exist.
* @see renderFile()
*/
......@@ -147,11 +147,11 @@ class View extends Component
/**
* Finds the view file based on the given view name.
* @param string $view the view name or the path alias of the view file. Please refer to [[render()]]
* on how to specify this parameter.
* @param object $context the context that the view should be used to search the view file. If null,
* existing [[context]] will be used.
* @return string the view file path. Note that the file may not exist.
* @param string $view the view name or the path alias of the view file. Please refer to [[render()]]
* on how to specify this parameter.
* @param object $context the context that the view should be used to search the view file. If null,
* existing [[context]] will be used.
* @return string the view file path. Note that the file may not exist.
* @throws InvalidCallException if [[context]] is required and invalid.
*/
protected function findViewFile($view, $context = null)
......@@ -204,11 +204,11 @@ class View extends Component
* Otherwise, it will simply include the view file as a normal PHP file, capture its output and
* return it as a string.
*
* @param string $viewFile the view file. This can be either a file path or a path alias.
* @param array $params the parameters (name-value pairs) that will be extracted and made available in the view file.
* @param object $context the context that the view should use for rendering the view. If null,
* existing [[context]] will be used.
* @return string the rendering result
* @param string $viewFile the view file. This can be either a file path or a path alias.
* @param array $params the parameters (name-value pairs) that will be extracted and made available in the view file.
* @param object $context the context that the view should use for rendering the view. If null,
* existing [[context]] will be used.
* @return string the rendering result
* @throws InvalidParamException if the view file does not exist
*/
public function renderFile($viewFile, $params = [], $context = null)
......@@ -279,7 +279,7 @@ class View extends Component
* The default implementation will trigger the [[EVENT_AFTER_RENDER]] event.
* If you override this method, make sure you call the parent implementation first.
* @param string $output the rendering result of the view file. Updates to this parameter
* will be passed back and returned by [[renderFile()]].
* will be passed back and returned by [[renderFile()]].
*/
public function afterRender(&$output)
{
......@@ -300,8 +300,8 @@ class View extends Component
*
* This method should mainly be called by view renderer or [[renderFile()]].
*
* @param string $_file_ the view file.
* @param array $_params_ the parameters (name-value pairs) that will be extracted and made available in the view file.
* @param string $_file_ the view file.
* @param array $_params_ the parameters (name-value pairs) that will be extracted and made available in the view file.
* @return string the rendering result
*/
public function renderPhpFile($_file_, $_params_ = [])
......@@ -319,9 +319,9 @@ class View extends Component
* This method is mainly used together with content caching (fragment caching and page caching)
* when some portions of the content (called *dynamic content*) should not be cached.
* The dynamic content must be returned by some PHP statements.
* @param string $statements the PHP statements for generating the dynamic content.
* @param string $statements the PHP statements for generating the dynamic content.
* @return string the placeholder of the dynamic content, or the dynamic content if there is no
* active content cache currently.
* active content cache currently.
*/
public function renderDynamic($statements)
{
......@@ -340,7 +340,7 @@ class View extends Component
* Adds a placeholder for dynamic content.
* This method is internally used.
* @param string $placeholder the placeholder name
* @param string $statements the PHP statements for generating the dynamic content
* @param string $statements the PHP statements for generating the dynamic content
*/
public function addDynamicPlaceholder($placeholder, $statements)
{
......@@ -353,8 +353,8 @@ class View extends Component
/**
* Evaluates the given PHP statements.
* This method is mainly used internally to implement dynamic content feature.
* @param string $statements the PHP statements to be evaluated.
* @return mixed the return value of the PHP statements.
* @param string $statements the PHP statements to be evaluated.
* @return mixed the return value of the PHP statements.
*/
public function evaluateDynamicContent($statements)
{
......@@ -364,10 +364,10 @@ class View extends Component
/**
* Begins recording a block.
* This method is a shortcut to beginning [[Block]]
* @param string $id the block ID.
* @param boolean $renderInPlace whether to render the block content in place.
* Defaults to false, meaning the captured block will not be displayed.
* @return Block the Block widget instance
* @param string $id the block ID.
* @param boolean $renderInPlace whether to render the block content in place.
* Defaults to false, meaning the captured block will not be displayed.
* @return Block the Block widget instance
*/
public function beginBlock($id, $renderInPlace = false)
{
......@@ -397,9 +397,9 @@ class View extends Component
* <?php $this->endContent(); ?>
* ~~~
*
* @param string $viewFile the view file that will be used to decorate the content enclosed by this widget.
* This can be specified as either the view file path or path alias.
* @param array $params the variables (name => value) to be extracted and made available in the decorative view.
* @param string $viewFile the view file that will be used to decorate the content enclosed by this widget.
* This can be specified as either the view file path or path alias.
* @param array $params the variables (name => value) to be extracted and made available in the decorative view.
* @return ContentDecorator the ContentDecorator widget instance
* @see ContentDecorator
*/
......@@ -434,10 +434,10 @@ class View extends Component
* }
* ~~~
*
* @param string $id a unique ID identifying the fragment to be cached.
* @param array $properties initial property values for [[FragmentCache]]
* @param string $id a unique ID identifying the fragment to be cached.
* @param array $properties initial property values for [[FragmentCache]]
* @return boolean whether you should generate the content for caching.
* False if the cached version is available.
* False if the cached version is available.
*/
public function beginCache($id, $properties = [])
{
......
......@@ -19,7 +19,7 @@ interface ViewContextInterface
{
/**
* Finds the view file corresponding to the specified relative view name.
* @param string $view a relative view name. The name does NOT start with a slash.
* @param string $view a relative view name. The name does NOT start with a slash.
* @return string the view file path. Note that the file may not exist.
*/
public function findViewFile($view);
......
......@@ -21,9 +21,9 @@ abstract class ViewRenderer extends Component
* This method is invoked by [[View]] whenever it tries to render a view.
* Child classes must implement this method to render the given view file.
*
* @param View $view the view object used for rendering the file.
* @param string $file the view file.
* @param array $params the parameters to be passed to the view file.
* @param View $view the view object used for rendering the file.
* @param string $file the view file.
* @param array $params the parameters to be passed to the view file.
* @return string the rendering result
*/
abstract public function render($view, $file, $params);
......
......@@ -46,7 +46,7 @@ class Widget extends Component implements ViewContextInterface
* Begins a widget.
* This method creates an instance of the calling class. It will apply the configuration
* to the created instance. A matching [[end()]] call should be called later.
* @param array $config name-value pairs that will be used to initialize the object properties
* @param array $config name-value pairs that will be used to initialize the object properties
* @return static the newly created widget instance
*/
public static function begin($config = [])
......@@ -62,7 +62,7 @@ class Widget extends Component implements ViewContextInterface
/**
* Ends a widget.
* Note that the rendering result of the widget is directly echoed out.
* @return static the widget instance that is ended.
* @return static the widget instance that is ended.
* @throws InvalidCallException if [[begin()]] and [[end()]] calls are not properly nested
*/
public static function end()
......@@ -84,7 +84,7 @@ class Widget extends Component implements ViewContextInterface
/**
* Creates a widget instance and runs it.
* The widget rendering result is returned by this method.
* @param array $config name-value pairs that will be used to initialize the object properties
* @param array $config name-value pairs that will be used to initialize the object properties
* @return string the rendering result of the widget.
*/
public static function widget($config = [])
......@@ -103,8 +103,8 @@ class Widget extends Component implements ViewContextInterface
/**
* Returns the ID of the widget.
* @param boolean $autoGenerate whether to generate an ID if it is not set previously
* @return string ID of the widget.
* @param boolean $autoGenerate whether to generate an ID if it is not set previously
* @return string ID of the widget.
*/
public function getId($autoGenerate = true)
{
......@@ -173,9 +173,9 @@ class Widget extends Component implements ViewContextInterface
*
* If the view name does not contain a file extension, it will use the default one `.php`.
* @param string $view the view name. Please refer to [[findViewFile()]] on how to specify a view name.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* @return string the rendering result.
* @param string $view the view name. Please refer to [[findViewFile()]] on how to specify a view name.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* @return string the rendering result.
* @throws InvalidParamException if the view file does not exist.
*/
public function render($view, $params = [])
......@@ -185,9 +185,9 @@ class Widget extends Component implements ViewContextInterface
/**
* Renders a view file.
* @param string $file the view file to be rendered. This can be either a file path or a path alias.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* @return string the rendering result.
* @param string $file the view file to be rendered. This can be either a file path or a path alias.
* @param array $params the parameters (name-value pairs) that should be made available in the view.
* @return string the rendering result.
* @throws InvalidParamException if the view file does not exist.
*/
public function renderFile($file, $params = [])
......@@ -210,7 +210,7 @@ class Widget extends Component implements ViewContextInterface
/**
* Finds the view file based on the given view name.
* File will be searched under [[viewPath]] directory.
* @param string $view the view name.
* @param string $view the view name.
* @return string the view file path. Note that the file may not exist.
*/
public function findViewFile($view)
......
......@@ -100,7 +100,7 @@ class AttributeBehavior extends Behavior
* Returns the value of the current attributes.
* This method is called by [[evaluateAttributes()]]. Its return value will be assigned
* to the attributes corresponding to the triggering event.
* @param Event $event the event that triggers the current attribute updating.
* @param Event $event the event that triggers the current attribute updating.
* @return mixed the attribute value
*/
protected function getValue($event)
......
......@@ -83,7 +83,7 @@ class BlameableBehavior extends AttributeBehavior
/**
* Evaluates the value of the user.
* The return result of this method will be assigned to the current attribute(s).
* @param Event $event
* @param Event $event
* @return mixed the value of the user.
*/
protected function getValue($event)
......
......@@ -26,8 +26,8 @@ class ApcCache extends Cache
* Note that this method does not check whether the dependency associated
* with the cached data, if there is any, has changed. So a call to [[get]]
* may return false while exists returns true.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
......@@ -40,7 +40,7 @@ class ApcCache extends Cache
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
* @param string $key a unique key identifying the cached value
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
......@@ -50,7 +50,7 @@ class ApcCache extends Cache
/**
* Retrieves multiple values from cache with the specified keys.
* @param array $keys a list of keys identifying the cached values
* @param array $keys a list of keys identifying the cached values
* @return array a list of cached values indexed by the keys
*/
protected function getValues($keys)
......@@ -62,9 +62,9 @@ class ApcCache extends Cache
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
......@@ -74,9 +74,9 @@ class ApcCache extends Cache
/**
* Stores multiple key-value pairs in cache.
* @param array $data array where key corresponds to cache key while value
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys
* @param array $data array where key corresponds to cache key while value
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys
*/
protected function setValues($data, $duration)
{
......@@ -86,9 +86,9 @@ class ApcCache extends Cache
/**
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
......@@ -98,9 +98,9 @@ class ApcCache extends Cache
/**
* Adds multiple key-value pairs to cache.
* @param array $data array where key corresponds to cache key while value is the value stored
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys
* @param array $data array where key corresponds to cache key while value is the value stored
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys
*/
protected function addValues($data, $duration)
{
......@@ -110,7 +110,7 @@ class ApcCache extends Cache
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string $key the key of the value to be deleted
* @param string $key the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
......
......@@ -46,7 +46,7 @@ class ChainedDependency extends Dependency
/**
* Generates the data needed to determine if dependency has been changed.
* This method does nothing in this class.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return mixed the data needed to determine if dependency has been changed.
*/
protected function generateDependencyData($cache)
......@@ -58,7 +58,7 @@ class ChainedDependency extends Dependency
* Performs the actual dependency checking.
* This method returns true if any of the dependency objects
* reports a dependency change.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return boolean whether the dependency is changed or not.
*/
public function getHasChanged($cache)
......
......@@ -89,8 +89,8 @@ class DbCache extends Cache
* Note that this method does not check whether the dependency associated
* with the cached data, if there is any, has changed. So a call to [[get]]
* may return false while exists returns true.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
......@@ -116,7 +116,7 @@ class DbCache extends Cache
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
* @param string $key a unique key identifying the cached value
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
......@@ -139,7 +139,7 @@ class DbCache extends Cache
/**
* Retrieves multiple values from cache with the specified keys.
* @param array $keys a list of keys identifying the cached values
* @param array $keys a list of keys identifying the cached values
* @return array a list of cached values indexed by the keys
*/
protected function getValues($keys)
......@@ -176,9 +176,9 @@ class DbCache extends Cache
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
......@@ -202,9 +202,9 @@ class DbCache extends Cache
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
......@@ -228,7 +228,7 @@ class DbCache extends Cache
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string $key the key of the value to be deleted
* @param string $key the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
......@@ -243,7 +243,7 @@ class DbCache extends Cache
/**
* Removes the expired data values.
* @param boolean $force whether to enforce the garbage collection regardless of [[gcProbability]].
* Defaults to false, meaning the actual deletion happens with the probability as specified by [[gcProbability]].
* Defaults to false, meaning the actual deletion happens with the probability as specified by [[gcProbability]].
*/
public function gc($force = false)
{
......
......@@ -40,8 +40,8 @@ class DbDependency extends Dependency
/**
* Generates the data needed to determine if dependency has been changed.
* This method returns the value of the global state.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return mixed the data needed to determine if dependency has been changed.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return mixed the data needed to determine if dependency has been changed.
* @throws InvalidConfigException if [[db]] is not a valid application component ID
*/
protected function generateDependencyData($cache)
......
......@@ -62,7 +62,7 @@ abstract class Dependency extends \yii\base\Object
/**
* Returns a value indicating whether the dependency has changed.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return boolean whether the dependency has changed.
*/
public function getHasChanged($cache)
......@@ -92,7 +92,7 @@ abstract class Dependency extends \yii\base\Object
/**
* Generates the data needed to determine if dependency has been changed.
* Derived classes should override this method to generate the actual dependency data.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return mixed the data needed to determine if dependency has been changed.
*/
abstract protected function generateDependencyData($cache);
......
......@@ -23,7 +23,7 @@ class DummyCache extends Cache
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
* @param string $key a unique key identifying the cached value
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
......@@ -35,9 +35,9 @@ class DummyCache extends Cache
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
......@@ -48,9 +48,9 @@ class DummyCache extends Cache
/**
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
......@@ -61,7 +61,7 @@ class DummyCache extends Cache
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string $key the key of the value to be deleted
* @param string $key the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
......
......@@ -37,7 +37,7 @@ class ExpressionDependency extends Dependency
/**
* Generates the data needed to determine if dependency has been changed.
* This method returns the result of the PHP expression.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return mixed the data needed to determine if dependency has been changed.
*/
protected function generateDependencyData($cache)
......
......@@ -86,8 +86,8 @@ class FileCache extends Cache
* Note that this method does not check whether the dependency associated
* with the cached data, if there is any, has changed. So a call to [[get]]
* may return false while exists returns true.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
......@@ -100,7 +100,7 @@ class FileCache extends Cache
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
* @param string $key a unique key identifying the cached value
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
......@@ -117,9 +117,9 @@ class FileCache extends Cache
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
......@@ -135,6 +135,7 @@ class FileCache extends Cache
if ($duration <= 0) {
$duration = 31536000; // 1 year
}
return @touch($cacheFile, $duration + time());
} else {
return false;
......@@ -145,9 +146,9 @@ class FileCache extends Cache
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
......@@ -163,7 +164,7 @@ class FileCache extends Cache
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string $key the key of the value to be deleted
* @param string $key the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
......@@ -175,7 +176,7 @@ class FileCache extends Cache
/**
* Returns the cache file path given the cache key.
* @param string $key cache key
* @param string $key cache key
* @return string the cache file path
*/
protected function getCacheFile($key)
......@@ -208,10 +209,10 @@ class FileCache extends Cache
/**
* Removes expired cache files.
* @param boolean $force whether to enforce the garbage collection regardless of [[gcProbability]].
* Defaults to false, meaning the actual deletion happens with the probability as specified by [[gcProbability]].
* @param boolean $force whether to enforce the garbage collection regardless of [[gcProbability]].
* Defaults to false, meaning the actual deletion happens with the probability as specified by [[gcProbability]].
* @param boolean $expiredOnly whether to removed expired cache files only.
* If true, all cache files under [[cachePath]] will be removed.
* If true, all cache files under [[cachePath]] will be removed.
*/
public function gc($force = false, $expiredOnly = true)
{
......@@ -223,9 +224,9 @@ class FileCache extends Cache
/**
* Recursively removing expired cache files under a directory.
* This method is mainly used by [[gc()]].
* @param string $path the directory under which expired cache files are removed.
* @param string $path the directory under which expired cache files are removed.
* @param boolean $durationdOnly whether to only remove expired cache files. If false, all files
* under `$path` will be removed.
* under `$path` will be removed.
*/
protected function gcRecursive($path, $durationdOnly)
{
......
......@@ -29,8 +29,8 @@ class FileDependency extends Dependency
/**
* Generates the data needed to determine if dependency has been changed.
* This method returns the file's last modification time.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return mixed the data needed to determine if dependency has been changed.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return mixed the data needed to determine if dependency has been changed.
* @throws InvalidConfigException if [[fileName]] is not set
*/
protected function generateDependencyData($cache)
......
......@@ -28,8 +28,8 @@ class GroupDependency extends Dependency
/**
* Generates the data needed to determine if dependency has been changed.
* This method does nothing in this class.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return mixed the data needed to determine if dependency has been changed.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return mixed the data needed to determine if dependency has been changed.
* @throws InvalidConfigException if [[group]] is not set.
*/
protected function generateDependencyData($cache)
......@@ -47,8 +47,8 @@ class GroupDependency extends Dependency
/**
* Performs the actual dependency checking.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return boolean whether the dependency is changed or not.
* @param Cache $cache the cache component that is currently evaluating this dependency
* @return boolean whether the dependency is changed or not.
* @throws InvalidConfigException if [[group]] is not set.
*/
public function getHasChanged($cache)
......@@ -63,8 +63,8 @@ class GroupDependency extends Dependency
/**
* Invalidates all of the cached data items that have the same [[group]].
* @param Cache $cache the cache component that caches the data items
* @param string $group the group name
* @param Cache $cache the cache component that caches the data items
* @param string $group the group name
* @return string the current version number
*/
public static function invalidate($cache, $group)
......
......@@ -124,7 +124,7 @@ class MemCache extends Cache
/**
* Returns the underlying memcache (or memcached) object.
* @return \Memcache|\Memcached the memcache (or memcached) object used by this cache component.
* @return \Memcache|\Memcached the memcache (or memcached) object used by this cache component.
* @throws InvalidConfigException if memcache or memcached extension is not loaded
*/
public function getMemcache()
......@@ -151,7 +151,7 @@ class MemCache extends Cache
/**
* @param array $config list of memcache server configurations. Each element must be an array
* with the following keys: host, port, persistent, weight, timeout, retryInterval, status.
* with the following keys: host, port, persistent, weight, timeout, retryInterval, status.
* @see http://www.php.net/manual/en/function.Memcache-addServer.php
*/
public function setServers($config)
......@@ -164,7 +164,7 @@ class MemCache extends Cache
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
* @param string $key a unique key identifying the cached value
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
......@@ -174,7 +174,7 @@ class MemCache extends Cache
/**
* Retrieves multiple values from cache with the specified keys.
* @param array $keys a list of keys identifying the cached values
* @param array $keys a list of keys identifying the cached values
* @return array a list of cached values indexed by the keys
*/
protected function getValues($keys)
......@@ -186,27 +186,29 @@ class MemCache extends Cache
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
{
$expire = $duration > 0 ? $duration + time() : 0;
return $this->useMemcached ? $this->_cache->set($key, $value, $expire) : $this->_cache->set($key, $value, 0, $expire);
}
/**
* Stores multiple key-value pairs in cache.
* @param array $data array where key corresponds to cache key while value is the value stored
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys. Always empty in case of using memcached.
* @param array $data array where key corresponds to cache key while value is the value stored
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys. Always empty in case of using memcached.
*/
protected function setValues($data, $duration)
{
if ($this->useMemcached) {
$this->_cache->setMulti($data, $duration > 0 ? $duration + time() : 0);
return [];
} else {
return parent::setValues($data, $duration);
......@@ -217,21 +219,22 @@ class MemCache extends Cache
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
{
$expire = $duration > 0 ? $duration + time() : 0;
return $this->useMemcached ? $this->_cache->add($key, $value, $expire) : $this->_cache->add($key, $value, 0, $expire);
}
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string $key the key of the value to be deleted
* @param string $key the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
......
......@@ -26,8 +26,8 @@ class WinCache extends Cache
* Note that this method does not check whether the dependency associated
* with the cached data, if there is any, has changed. So a call to [[get]]
* may return false while exists returns true.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
......@@ -40,7 +40,7 @@ class WinCache extends Cache
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
* @param string $key a unique key identifying the cached value
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
......@@ -50,7 +50,7 @@ class WinCache extends Cache
/**
* Retrieves multiple values from cache with the specified keys.
* @param array $keys a list of keys identifying the cached values
* @param array $keys a list of keys identifying the cached values
* @return array a list of cached values indexed by the keys
*/
protected function getValues($keys)
......@@ -62,9 +62,9 @@ class WinCache extends Cache
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
......@@ -74,9 +74,9 @@ class WinCache extends Cache
/**
* Stores multiple key-value pairs in cache.
* @param array $data array where key corresponds to cache key while value is the value stored
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys
* @param array $data array where key corresponds to cache key while value is the value stored
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys
*/
protected function setValues($data, $duration)
{
......@@ -87,9 +87,9 @@ class WinCache extends Cache
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
......@@ -101,9 +101,9 @@ class WinCache extends Cache
* Adds multiple key-value pairs to cache.
* The default implementation calls [[addValue()]] multiple times add values one by one. If the underlying cache
* storage supports multiadd, this method should be overridden to exploit that feature.
* @param array $data array where key corresponds to cache key while value is the value stored
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys
* @param array $data array where key corresponds to cache key while value is the value stored
* @param integer $duration the number of seconds in which the cached values will expire. 0 means never expire.
* @return array array of failed keys
*/
protected function addValues($data, $duration)
{
......@@ -113,7 +113,7 @@ class WinCache extends Cache
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string $key the key of the value to be deleted
* @param string $key the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
......
......@@ -27,8 +27,8 @@ class XCache extends Cache
* Note that this method does not check whether the dependency associated
* with the cached data, if there is any, has changed. So a call to [[get]]
* may return false while exists returns true.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @param mixed $key a key identifying the cached value. This can be a simple string or
* a complex data structure consisting of factors representing the key.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
......@@ -41,7 +41,7 @@ class XCache extends Cache
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
* @param string $key a unique key identifying the cached value
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
......@@ -53,9 +53,9 @@ class XCache extends Cache
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
......@@ -67,9 +67,9 @@ class XCache extends Cache
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
......@@ -80,7 +80,7 @@ class XCache extends Cache
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string $key the key of the value to be deleted
* @param string $key the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
......
......@@ -23,7 +23,7 @@ class ZendDataCache extends Cache
/**
* Retrieves a value from cache with a specified key.
* This is the implementation of the method declared in the parent class.
* @param string $key a unique key identifying the cached value
* @param string $key a unique key identifying the cached value
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
......@@ -37,9 +37,9 @@ class ZendDataCache extends Cache
* Stores a value identified by a key in cache.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
......@@ -51,9 +51,9 @@ class ZendDataCache extends Cache
* Stores a value identified by a key into cache if the cache does not contain this key.
* This is the implementation of the method declared in the parent class.
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached
* @param integer $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return boolean true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
......@@ -64,7 +64,7 @@ class ZendDataCache extends Cache
/**
* Deletes a value with the specified key from cache
* This is the implementation of the method declared in the parent class.
* @param string $key the key of the value to be deleted
* @param string $key the key of the value to be deleted
* @return boolean if no error happens during deletion
*/
protected function deleteValue($key)
......
......@@ -125,7 +125,7 @@ class Captcha extends InputWidget
/**
* Checks if there is graphic extension available to generate CAPTCHA images.
* This method will check the existence of ImageMagick and GD extensions.
* @return string the name of the graphic extension, either "imagick" or "gd".
* @return string the name of the graphic extension, either "imagick" or "gd".
* @throws InvalidConfigException if neither ImageMagick nor GD is installed.
*/
public static function checkRequirements()
......
......@@ -134,7 +134,7 @@ class CaptchaAction extends Action
/**
* Generates a hash code that can be used for client side validation.
* @param string $code the CAPTCHA code
* @param string $code the CAPTCHA code
* @return string a hash code generated from the CAPTCHA code
*/
public function generateValidationHash($code)
......@@ -148,8 +148,8 @@ class CaptchaAction extends Action
/**
* Gets the verification code.
* @param boolean $regenerate whether the verification code should be regenerated.
* @return string the verification code.
* @param boolean $regenerate whether the verification code should be regenerated.
* @return string the verification code.
*/
public function getVerifyCode($regenerate = false)
{
......@@ -170,8 +170,8 @@ class CaptchaAction extends Action
/**
* Validates the input to see if it matches the generated code.
* @param string $input user input
* @param boolean $caseSensitive whether the comparison should be case-sensitive
* @param string $input user input
* @param boolean $caseSensitive whether the comparison should be case-sensitive
* @return boolean whether the input is valid
*/
public function validate($input, $caseSensitive)
......@@ -231,7 +231,7 @@ class CaptchaAction extends Action
/**
* Renders the CAPTCHA image.
* @param string $code the verification code
* @param string $code the verification code
* @return string image contents
*/
protected function renderImage($code)
......@@ -245,7 +245,7 @@ class CaptchaAction extends Action
/**
* Renders the CAPTCHA image based on the code using GD library.
* @param string $code the verification code
* @param string $code the verification code
* @return string image contents
*/
protected function renderImageByGD($code)
......@@ -294,7 +294,7 @@ class CaptchaAction extends Action
/**
* Renders the CAPTCHA image based on the code using ImageMagick library.
* @param string $code the verification code
* @param string $code the verification code
* @return \Imagick image instance. Can be used as string. In this case it will contain image contents.
*/
protected function renderImageByImagick($code)
......
......@@ -87,7 +87,7 @@ class Application extends \yii\base\Application
* This method will check if the command line option [[OPTION_APPCONFIG]] is specified.
* If so, the corresponding file will be loaded as the application configuration.
* Otherwise, the configuration provided as the parameter will be returned back.
* @param array $config the configuration provided in the constructor.
* @param array $config the configuration provided in the constructor.
* @return array the actual configuration to be used by the application.
*/
protected function loadConfig($config)
......@@ -130,7 +130,7 @@ class Application extends \yii\base\Application
/**
* Handles the specified request.
* @param Request $request the request to be handled
* @param Request $request the request to be handled
* @return Response the resulting response
*/
public function handleRequest($request)
......@@ -162,9 +162,9 @@ class Application extends \yii\base\Application
* This method parses the specified route and creates the corresponding child module(s), controller and action
* instances. It then calls [[Controller::runAction()]] to run the action with the given parameters.
* If the route is empty, the method will use [[defaultRoute]].
* @param string $route the route that specifies the action.
* @param array $params the parameters to be passed to the action
* @return integer the status code returned by the action execution. 0 means normal, and other values mean abnormal.
* @param string $route the route that specifies the action.
* @param array $params the parameters to be passed to the action
* @return integer the status code returned by the action execution. 0 means normal, and other values mean abnormal.
* @throws Exception if the route is invalid
*/
public function runAction($route, $params = [])
......
......@@ -46,8 +46,8 @@ class Controller extends \yii\base\Controller
* ANSI color is enabled only if [[color]] is set true or is not set
* and the terminal supports ANSI color.
*
* @param resource $stream the stream to check.
* @return boolean Whether to enable ANSI style in output.
* @param resource $stream the stream to check.
* @return boolean Whether to enable ANSI style in output.
*/
public function isColorEnabled($stream = STDOUT)
{
......@@ -57,11 +57,11 @@ class Controller extends \yii\base\Controller
/**
* Runs an action with the specified action ID and parameters.
* If the action ID is empty, the method will use [[defaultAction]].
* @param string $id the ID of the action to be executed.
* @param array $params the parameters (name-value pairs) to be passed to the action.
* @return integer the status of the action execution. 0 means normal, other values mean abnormal.
* @param string $id the ID of the action to be executed.
* @param array $params the parameters (name-value pairs) to be passed to the action.
* @return integer the status of the action execution. 0 means normal, other values mean abnormal.
* @throws InvalidRouteException if the requested action ID cannot be resolved into an action successfully.
* @throws Exception if there are unknown options or missing arguments
* @throws Exception if there are unknown options or missing arguments
* @see createAction
*/
public function runAction($id, $params = [])
......@@ -88,9 +88,9 @@ class Controller extends \yii\base\Controller
* This method is invoked by [[Action]] when it begins to run with the given parameters.
* This method will first bind the parameters with the [[options()|options]]
* available to the action. It then validates the given arguments.
* @param Action $action the action to be bound with parameters
* @param array $params the parameters to be bound to the action
* @return array the valid parameters that the action can run with.
* @param Action $action the action to be bound with parameters
* @param array $params the parameters to be bound to the action
* @return array the valid parameters that the action can run with.
* @throws Exception if there are unknown options or missing arguments
*/
public function bindActionParams($action, $params)
......@@ -135,7 +135,7 @@ class Controller extends \yii\base\Controller
* echo $this->ansiFormat('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
* ~~~
*
* @param string $string the string to be formatted
* @param string $string the string to be formatted
* @return string
*/
public function ansiFormat($string)
......@@ -161,7 +161,7 @@ class Controller extends \yii\base\Controller
* $this->stdout('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
* ~~~
*
* @param string $string the string to print
* @param string $string the string to print
* @return int|boolean Number of bytes printed or false on error
*/
public function stdout($string)
......@@ -187,7 +187,7 @@ class Controller extends \yii\base\Controller
* $this->stderr('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
* ~~~
*
* @param string $string the string to print
* @param string $string the string to print
* @return int|boolean Number of bytes printed or false on error
*/
public function stderr($string)
......@@ -204,8 +204,8 @@ class Controller extends \yii\base\Controller
/**
* Prompts the user for input and validates it
*
* @param string $text prompt string
* @param array $options the options to validate the input:
* @param string $text prompt string
* @param array $options the options to validate the input:
*
* - required: whether it is required or not
* - default: default value if no input is inserted by the user
......@@ -227,10 +227,10 @@ class Controller extends \yii\base\Controller
/**
* Asks user to confirm by typing y or n.
*
* @param string $message to echo out before waiting for user input
* @param boolean $default this value is returned if no selection is made.
* @param string $message to echo out before waiting for user input
* @param boolean $default this value is returned if no selection is made.
* @return boolean whether user confirmed.
* Will return true if [[interactive]] is false.
* Will return true if [[interactive]] is false.
*/
public function confirm($message, $default = false)
{
......@@ -245,8 +245,8 @@ class Controller extends \yii\base\Controller
* Gives the user an option to choose from. Giving '?' as an input will show
* a list of options to choose from and their explanations.
*
* @param string $prompt the prompt message
* @param array $options Key-value array of options to choose from
* @param string $prompt the prompt message
* @param array $options Key-value array of options to choose from
*
* @return string An option character the user chose
*/
......@@ -264,8 +264,8 @@ class Controller extends \yii\base\Controller
* Note that the values setting via options are not available
* until [[beforeAction()]] is being called.
*
* @param string $id action name
* @return array the names of the options valid for the action
* @param string $id action name
* @return array the names of the options valid for the action
*/
public function options($id)
{
......
......@@ -91,7 +91,7 @@ class AssetController extends Controller
/**
* Returns the asset manager instance.
* @throws \yii\console\Exception on invalid configuration.
* @return \yii\web\AssetManager asset manager instance.
* @return \yii\web\AssetManager asset manager instance.
*/
public function getAssetManager()
{
......@@ -114,8 +114,8 @@ class AssetController extends Controller
/**
* Sets asset manager instance or configuration.
* @param \yii\web\AssetManager|array $assetManager asset manager instance or its array configuration.
* @throws \yii\console\Exception on invalid argument type.
* @param \yii\web\AssetManager|array $assetManager asset manager instance or its array configuration.
* @throws \yii\console\Exception on invalid argument type.
*/
public function setAssetManager($assetManager)
{
......@@ -155,7 +155,7 @@ class AssetController extends Controller
/**
* Applies configuration from the given file to self instance.
* @param string $configFile configuration file name.
* @param string $configFile configuration file name.
* @throws \yii\console\Exception on failure.
*/
protected function loadConfiguration($configFile)
......@@ -174,7 +174,7 @@ class AssetController extends Controller
/**
* Creates full list of source asset bundles.
* @param string[] $bundles list of asset bundle names
* @param string[] $bundles list of asset bundle names
* @return \yii\web\AssetBundle[] list of source asset bundles.
*/
protected function loadBundles($bundles)
......@@ -195,9 +195,9 @@ class AssetController extends Controller
/**
* Loads asset bundle dependencies recursively.
* @param \yii\web\AssetBundle $bundle bundle instance
* @param array $result already loaded bundles list.
* @throws Exception on failure.
* @param \yii\web\AssetBundle $bundle bundle instance
* @param array $result already loaded bundles list.
* @throws Exception on failure.
*/
protected function loadDependency($bundle, &$result)
{
......@@ -216,10 +216,10 @@ class AssetController extends Controller
/**
* Creates full list of output asset bundles.
* @param array $targets output asset bundles configuration.
* @param \yii\web\AssetBundle[] $bundles list of source asset bundles.
* @param array $targets output asset bundles configuration.
* @param \yii\web\AssetBundle[] $bundles list of source asset bundles.
* @return \yii\web\AssetBundle[] list of output asset bundles.
* @throws Exception on failure.
* @throws Exception on failure.
*/
protected function loadTargets($targets, $bundles)
{
......@@ -278,11 +278,11 @@ class AssetController extends Controller
/**
* Builds output asset bundle.
* @param \yii\web\AssetBundle $target output asset bundle
* @param string $type either 'js' or 'css'.
* @param \yii\web\AssetBundle[] $bundles source asset bundles.
* @param integer $timestamp current timestamp.
* @throws Exception on failure.
* @param \yii\web\AssetBundle $target output asset bundle
* @param string $type either 'js' or 'css'.
* @param \yii\web\AssetBundle[] $bundles source asset bundles.
* @param integer $timestamp current timestamp.
* @throws Exception on failure.
*/
protected function buildTarget($target, $type, $bundles, $timestamp)
{
......@@ -310,8 +310,8 @@ class AssetController extends Controller
/**
* Adjust dependencies between asset bundles in the way source bundles begin to depend on output ones.
* @param \yii\web\AssetBundle[] $targets output asset bundles.
* @param \yii\web\AssetBundle[] $bundles source asset bundles.
* @param \yii\web\AssetBundle[] $targets output asset bundles.
* @param \yii\web\AssetBundle[] $bundles source asset bundles.
* @return \yii\web\AssetBundle[] output asset bundles.
*/
protected function adjustDependency($targets, $bundles)
......@@ -354,10 +354,10 @@ class AssetController extends Controller
/**
* Registers asset bundles including their dependencies.
* @param \yii\web\AssetBundle[] $bundles asset bundles list.
* @param string $name bundle name.
* @param array $registered stores already registered names.
* @throws Exception if circular dependency is detected.
* @param \yii\web\AssetBundle[] $bundles asset bundles list.
* @param string $name bundle name.
* @param array $registered stores already registered names.
* @throws Exception if circular dependency is detected.
*/
protected function registerBundle($bundles, $name, &$registered)
{
......@@ -376,8 +376,8 @@ class AssetController extends Controller
/**
* Saves new asset bundles configuration.
* @param \yii\web\AssetBundle[] $targets list of asset bundles to be saved.
* @param string $bundleFile output file name.
* @param \yii\web\AssetBundle[] $targets list of asset bundles to be saved.
* @param string $bundleFile output file name.
* @throws \yii\console\Exception on failure.
*/
protected function saveTargets($targets, $bundleFile)
......@@ -411,8 +411,8 @@ EOD;
/**
* Compresses given JavaScript files and combines them into the single one.
* @param array $inputFiles list of source file names.
* @param string $outputFile output file name.
* @param array $inputFiles list of source file names.
* @param string $outputFile output file name.
* @throws \yii\console\Exception on failure
*/
protected function compressJsFiles($inputFiles, $outputFile)
......@@ -440,8 +440,8 @@ EOD;
/**
* Compresses given CSS files and combines them into the single one.
* @param array $inputFiles list of source file names.
* @param string $outputFile output file name.
* @param array $inputFiles list of source file names.
* @param string $outputFile output file name.
* @throws \yii\console\Exception on failure
*/
protected function compressCssFiles($inputFiles, $outputFile)
......@@ -469,8 +469,8 @@ EOD;
/**
* Combines JavaScript files into a single one.
* @param array $inputFiles source file names.
* @param string $outputFile output file name.
* @param array $inputFiles source file names.
* @param string $outputFile output file name.
* @throws \yii\console\Exception on failure.
*/
public function combineJsFiles($inputFiles, $outputFile)
......@@ -488,8 +488,8 @@ EOD;
/**
* Combines CSS files into a single one.
* @param array $inputFiles source file names.
* @param string $outputFile output file name.
* @param array $inputFiles source file names.
* @param string $outputFile output file name.
* @throws \yii\console\Exception on failure.
*/
public function combineCssFiles($inputFiles, $outputFile)
......@@ -507,9 +507,9 @@ EOD;
/**
* Adjusts CSS content allowing URL references pointing to the original resources.
* @param string $cssContent source CSS content.
* @param string $inputFilePath input CSS file name.
* @param string $outputFilePath output CSS file name.
* @param string $cssContent source CSS content.
* @param string $inputFilePath input CSS file name.
* @param string $outputFilePath output CSS file name.
* @return string adjusted CSS content.
*/
protected function adjustCssUrl($cssContent, $inputFilePath, $outputFilePath)
......@@ -568,7 +568,7 @@ EOD;
/**
* Creates template of configuration file for [[actionCompress]].
* @param string $configFile output file name.
* @param string $configFile output file name.
* @throws \yii\console\Exception on failure.
*/
public function actionTemplate($configFile)
......
......@@ -73,8 +73,8 @@ class FixtureController extends Controller
* their names separated with commas, like: User,UserProfile,MyCustom. Be sure there is no
* whitespace between names. Note that if you are loading fixtures to storage, for example: database or nosql,
* storage will not be cleared, data will be appended to already existed.
* @param array $fixtures
* @param array $except
* @param array $fixtures
* @param array $except
* @throws \yii\console\Exception
*/
public function actionLoad(array $fixtures, array $except = [])
......@@ -189,8 +189,8 @@ class FixtureController extends Controller
/**
* Prompts user with confirmation if fixtures should be loaded.
* @param array $fixtures
* @param array $except
* @param array $fixtures
* @param array $except
* @return boolean
*/
private function confirmLoad($fixtures, $except)
......@@ -216,8 +216,8 @@ class FixtureController extends Controller
/**
* Prompts user with confirmation for fixtures that should be unloaded.
* @param array $fixtures
* @param array $except
* @param array $fixtures
* @param array $except
* @return boolean
*/
private function confirmUnload($fixtures, $except)
......@@ -254,7 +254,7 @@ class FixtureController extends Controller
/**
* Checks if needed to apply all fixtures.
* @param string $fixture
* @param string $fixture
* @return bool
*/
public function needToApplyAll($fixture)
......@@ -263,7 +263,7 @@ class FixtureController extends Controller
}
/**
* @param array $fixtures
* @param array $fixtures
* @return array Array of found fixtures. These may differ from input parameter as not all fixtures may exists.
*/
private function findFixtures(array $fixtures)
......@@ -290,7 +290,7 @@ class FixtureController extends Controller
/**
* Returns valid fixtures config that can be used to load them.
* @param array $fixtures fixtures to configure
* @param array $fixtures fixtures to configure
* @return array
*/
private function getFixturesConfig($fixtures)
......
......@@ -42,9 +42,9 @@ class HelpController extends Controller
* Displays available commands or the detailed information
* about a particular command. For example,
*
* @param string $command The name of the command to show help about.
* If not provided, all available commands will be displayed.
* @return integer the exit status
* @param string $command The name of the command to show help about.
* If not provided, all available commands will be displayed.
* @return integer the exit status
* @throws Exception if the command for help is unknown
*/
public function actionIndex($command = null)
......@@ -111,8 +111,8 @@ class HelpController extends Controller
/**
* Returns all available actions of the specified controller.
* @param Controller $controller the controller instance
* @return array all available action IDs.
* @param Controller $controller the controller instance
* @return array all available action IDs.
*/
public function getActions($controller)
{
......@@ -131,8 +131,8 @@ class HelpController extends Controller
/**
* Returns available commands of a specified module.
* @param \yii\base\Module $module the module instance
* @return array the available command names
* @param \yii\base\Module $module the module instance
* @return array the available command names
*/
protected function getModuleCommands($module)
{
......@@ -234,9 +234,9 @@ class HelpController extends Controller
/**
* Returns the short summary of the action.
* @param Controller $controller the controller instance
* @param string $actionID action ID
* @return string the summary about the action
* @param Controller $controller the controller instance
* @param string $actionID action ID
* @return string the summary about the action
*/
protected function getActionSummary($controller, $actionID)
{
......@@ -272,9 +272,9 @@ class HelpController extends Controller
/**
* Displays the detailed information of a command action.
* @param Controller $controller the controller instance
* @param string $actionID action ID
* @throws Exception if the action does not exist
* @param Controller $controller the controller instance
* @param string $actionID action ID
* @throws Exception if the action does not exist
*/
protected function getActionHelp($controller, $actionID)
{
......@@ -329,9 +329,9 @@ class HelpController extends Controller
/**
* Returns the help information about arguments.
* @param \ReflectionMethod $method
* @param string $tags the parsed comment block related with arguments
* @return array the required and optional argument help information
* @param \ReflectionMethod $method
* @param string $tags the parsed comment block related with arguments
* @return array the required and optional argument help information
*/
protected function getArgHelps($method, $tags)
{
......@@ -362,9 +362,9 @@ class HelpController extends Controller
/**
* Returns the help information about the options available for a console controller.
* @param Controller $controller the console controller
* @param string $actionID name of the action, if set include local options for that action
* @return array the help information about the options
* @param Controller $controller the console controller
* @param string $actionID name of the action, if set include local options for that action
* @return array the help information about the options
*/
protected function getOptionHelps($controller, $actionID)
{
......@@ -406,8 +406,8 @@ class HelpController extends Controller
/**
* Parses the comment block into tags.
* @param string $comment the comment block
* @return array the parsed tags
* @param string $comment the comment block
* @return array the parsed tags
*/
protected function parseComment($comment)
{
......@@ -432,12 +432,12 @@ class HelpController extends Controller
/**
* Generates a well-formed string for an argument or option.
* @param string $name the name of the argument or option
* @param boolean $required whether the argument is required
* @param string $type the type of the option or argument
* @param mixed $defaultValue the default value of the option or argument
* @param string $comment comment about the option or argument
* @return string the formatted string for the argument or option
* @param string $name the name of the argument or option
* @param boolean $required whether the argument is required
* @param string $type the type of the option or argument
* @param mixed $defaultValue the default value of the option or argument
* @param string $comment comment about the option or argument
* @return string the formatted string for the argument or option
*/
protected function formatOptionHelp($name, $required, $type, $defaultValue, $comment)
{
......
......@@ -47,7 +47,7 @@ class MessageController extends Controller
* how to customize it to fit for your needs. After customization,
* you may use this configuration file with the "extract" command.
*
* @param string $filePath output file name or alias.
* @param string $filePath output file name or alias.
* @throws Exception on failure.
*/
public function actionConfig($filePath)
......@@ -68,9 +68,9 @@ class MessageController extends Controller
* This command will search through source code files and extract
* messages that need to be translated in different languages.
*
* @param string $configFile the path or alias of the configuration file.
* You may use the "yii message/config" command to generate
* this file and then customize it for your needs.
* @param string $configFile the path or alias of the configuration file.
* You may use the "yii message/config" command to generate
* this file and then customize it for your needs.
* @throws Exception on failure.
*/
public function actionExtract($configFile)
......@@ -149,12 +149,12 @@ class MessageController extends Controller
/**
* Saves messages to database
*
* @param array $messages
* @param array $messages
* @param \yii\db\Connection $db
* @param string $sourceMessageTable
* @param string $messageTable
* @param boolean $removeUnused
* @param array $languages
* @param string $sourceMessageTable
* @param string $messageTable
* @param boolean $removeUnused
* @param array $languages
*/
protected function saveMessagesToDb($messages, $db, $sourceMessageTable, $messageTable, $removeUnused, $languages)
{
......@@ -239,8 +239,8 @@ class MessageController extends Controller
/**
* Extracts messages from a file
*
* @param string $fileName name of the file to extract messages from
* @param string $translator name of the function used to translate messages
* @param string $fileName name of the file to extract messages from
* @param string $translator name of the function used to translate messages
* @return array
*/
protected function extractMessages($fileName, $translator)
......@@ -272,12 +272,12 @@ class MessageController extends Controller
/**
* Writes messages into file
*
* @param array $messages
* @param string $fileName name of the file to write to
* @param boolean $overwrite if existing file should be overwritten without backup
* @param array $messages
* @param string $fileName name of the file to write to
* @param boolean $overwrite if existing file should be overwritten without backup
* @param boolean $removeUnused if obsolete translations should be removed
* @param boolean $sort if translations should be sorted
* @param string $format output format
* @param boolean $sort if translations should be sorted
* @param string $format output format
*/
protected function generateMessageFile($messages, $fileName, $overwrite, $removeUnused, $sort, $format)
{
......
......@@ -106,9 +106,9 @@ class MigrateController extends Controller
/**
* This method is invoked right before an action is to be executed (after all possible filters.)
* It checks the existence of the [[migrationPath]].
* @param \yii\base\Action $action the action to be executed.
* @throws Exception if db component isn't configured
* @return boolean whether the action should continue to be executed.
* @param \yii\base\Action $action the action to be executed.
* @throws Exception if db component isn't configured
* @return boolean whether the action should continue to be executed.
*/
public function beforeAction($action)
{
......@@ -148,7 +148,7 @@ class MigrateController extends Controller
* ~~~
*
* @param integer $limit the number of new migrations to be applied. If 0, it means
* applying all available new migrations.
* applying all available new migrations.
*/
public function actionUp($limit = 0)
{
......@@ -198,8 +198,8 @@ class MigrateController extends Controller
* yii migrate/down 3 # revert the last 3 migrations
* ~~~
*
* @param integer $limit the number of migrations to be reverted. Defaults to 1,
* meaning the last applied migration will be reverted.
* @param integer $limit the number of migrations to be reverted. Defaults to 1,
* meaning the last applied migration will be reverted.
* @throws Exception if the number of the steps specified is less than 1.
*/
public function actionDown($limit = 1)
......@@ -247,8 +247,8 @@ class MigrateController extends Controller
* yii migrate/redo 3 # redo the last 3 applied migrations
* ~~~
*
* @param integer $limit the number of migrations to be redone. Defaults to 1,
* meaning the last applied migration will be redone.
* @param integer $limit the number of migrations to be redone. Defaults to 1,
* meaning the last applied migration will be redone.
* @throws Exception if the number of the steps specified is less than 1.
*/
public function actionRedo($limit = 1)
......@@ -309,10 +309,10 @@ class MigrateController extends Controller
* yii migrate/to "2014-02-15 13:00:50" # using strtotime() parseable string
* ~~~
*
* @param string $version either the version name or the certain time value in the past
* that the application should be migrated to. This can be either the timestamp,
* the full name of the migration, the UNIX timestamp, or the parseable datetime
* string.
* @param string $version either the version name or the certain time value in the past
* that the application should be migrated to. This can be either the timestamp,
* the full name of the migration, the UNIX timestamp, or the parseable datetime
* string.
* @throws Exception if the version argument is invalid.
*/
public function actionTo($version)
......@@ -338,8 +338,8 @@ class MigrateController extends Controller
* yii migrate/mark m101129_185401_create_user_table # using full name
* ~~~
*
* @param string $version the version at which the migration history should be marked.
* This can be either the timestamp or the full name of the migration.
* @param string $version the version at which the migration history should be marked.
* This can be either the timestamp or the full name of the migration.
* @throws Exception if the version argument is invalid or the version cannot be found.
*/
public function actionMark($version)
......@@ -408,7 +408,7 @@ class MigrateController extends Controller
* ~~~
*
* @param integer $limit the maximum number of migrations to be displayed.
* If it is 0, the whole migration history will be displayed.
* If it is 0, the whole migration history will be displayed.
*/
public function actionHistory($limit = 10)
{
......@@ -442,7 +442,7 @@ class MigrateController extends Controller
* ~~~
*
* @param integer $limit the maximum number of new migrations to be displayed.
* If it is 0, all available new migrations will be displayed.
* If it is 0, all available new migrations will be displayed.
*/
public function actionNew($limit = 10)
{
......@@ -476,8 +476,8 @@ class MigrateController extends Controller
* yii migrate/create create_user_table
* ~~~
*
* @param string $name the name of the new migration. This should only contain
* letters, digits and/or underscores.
* @param string $name the name of the new migration. This should only contain
* letters, digits and/or underscores.
* @throws Exception if the name argument is invalid.
*/
public function actionCreate($name)
......@@ -498,7 +498,7 @@ class MigrateController extends Controller
/**
* Upgrades with the specified migration class.
* @param string $class the migration class name
* @param string $class the migration class name
* @return boolean whether the migration is successful
*/
protected function migrateUp($class)
......@@ -529,7 +529,7 @@ class MigrateController extends Controller
/**
* Downgrades with the specified migration class.
* @param string $class the migration class name
* @param string $class the migration class name
* @return boolean whether the migration is successful
*/
protected function migrateDown($class)
......@@ -559,7 +559,7 @@ class MigrateController extends Controller
/**
* Creates a new migration instance.
* @param string $class the migration class name
* @param string $class the migration class name
* @return \yii\db\Migration the migration instance
*/
protected function createMigration($class)
......@@ -590,7 +590,7 @@ class MigrateController extends Controller
/**
* Migrates to the certain version.
* @param string $version name in the full format.
* @param string $version name in the full format.
* @throws Exception if the provided version cannot be found.
*/
protected function migrateToVersion($version)
......@@ -626,8 +626,8 @@ class MigrateController extends Controller
/**
* Returns the migration history.
* @param integer $limit the maximum number of records in the history to be returned
* @return array the migration history
* @param integer $limit the maximum number of records in the history to be returned
* @return array the migration history
*/
protected function getMigrationHistory($limit)
{
......
......@@ -116,8 +116,8 @@ class ArrayDataProvider extends BaseDataProvider
/**
* Sorts the data models according to the given sort definition
* @param array $models the models to be sorted
* @param Sort $sort the sort definition
* @param array $models the models to be sorted
* @param Sort $sort the sort definition
* @return array the sorted data models
*/
protected function sortModels($models, $sort)
......
......@@ -51,7 +51,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
/**
* Prepares the keys associated with the currently available data models.
* @param array $models the available data models
* @param array $models the available data models
* @return array the keys
*/
abstract protected function prepareKeys($models);
......@@ -105,7 +105,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
/**
* Returns the key values associated with the data models.
* @return array the list of key values corresponding to [[models]]. Each data model in [[models]]
* is uniquely identified by the corresponding key value in this array.
* is uniquely identified by the corresponding key value in this array.
*/
public function getKeys()
{
......@@ -176,7 +176,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
/**
* Sets the pagination for this data provider.
* @param array|Pagination|boolean $value the pagination to be used by this data provider.
* This can be one of the following:
* This can be one of the following:
*
* - a configuration array for creating the pagination object. The "class" element defaults
* to 'yii\data\Pagination'
......@@ -216,7 +216,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
/**
* Sets the sort definition for this data provider.
* @param array|Sort|boolean $value the sort definition to be used by this data provider.
* This can be one of the following:
* This can be one of the following:
*
* - a configuration array for creating the sort definition object. The "class" element defaults
* to 'yii\data\Sort'
......
......@@ -54,7 +54,7 @@ interface DataProviderInterface
/**
* Returns the key values associated with the data models.
* @return array the list of key values corresponding to [[getModels|models]]. Each data model in [[getModels|models]]
* is uniquely identified by the corresponding key value in this array.
* is uniquely identified by the corresponding key value in this array.
*/
public function getKeys();
......
......@@ -159,7 +159,7 @@ class Pagination extends Object implements Linkable
/**
* Returns the zero-based current page number.
* @param boolean $recalculate whether to recalculate the current page based on the page size and item count.
* @param boolean $recalculate whether to recalculate the current page based on the page size and item count.
* @return integer the zero-based current page number.
*/
public function getPage($recalculate = false)
......@@ -174,9 +174,9 @@ class Pagination extends Object implements Linkable
/**
* Sets the current page number.
* @param integer $value the zero-based index of the current page.
* @param integer $value the zero-based index of the current page.
* @param boolean $validatePage whether to validate the page number. Note that in order
* to validate the page number, both [[validatePage]] and this parameter must be true.
* to validate the page number, both [[validatePage]] and this parameter must be true.
*/
public function setPage($value, $validatePage = false)
{
......@@ -220,7 +220,7 @@ class Pagination extends Object implements Linkable
}
/**
* @param integer $value the number of items per page.
* @param integer $value the number of items per page.
* @param boolean $validatePageSize whether to validate page size.
*/
public function setPageSize($value, $validatePageSize = false)
......@@ -243,9 +243,9 @@ class Pagination extends Object implements Linkable
/**
* Creates the URL suitable for pagination with the specified page number.
* This method is mainly called by pagers when creating URLs used to perform pagination.
* @param integer $page the zero-based page number that the URL should point to.
* @param boolean $absolute whether to create an absolute URL. Defaults to `false`.
* @return string the created URL
* @param integer $page the zero-based page number that the URL should point to.
* @param boolean $absolute whether to create an absolute URL. Defaults to `false`.
* @return string the created URL
* @see params
* @see forcePageParam
*/
......@@ -277,7 +277,7 @@ class Pagination extends Object implements Linkable
/**
* @return integer the offset of the data. This may be used to set the
* OFFSET value for a SQL statement for fetching the current page of data.
* OFFSET value for a SQL statement for fetching the current page of data.
*/
public function getOffset()
{
......@@ -288,8 +288,8 @@ class Pagination extends Object implements Linkable
/**
* @return integer the limit of the data. This may be used to set the
* LIMIT value for a SQL statement for fetching the current page of data.
* Note that if the page size is infinite, a value -1 will be returned.
* LIMIT value for a SQL statement for fetching the current page of data.
* Note that if the page size is infinite, a value -1 will be returned.
*/
public function getLimit()
{
......@@ -300,9 +300,9 @@ class Pagination extends Object implements Linkable
/**
* Returns a whole set of links for navigating to the first, last, next and previous pages.
* @param boolean $absolute whether the generated URLs should be absolute.
* @return array the links for navigational purpose. The array keys specify the purpose of the links (e.g. [[LINK_FIRST]]),
* and the array values are the corresponding URLs.
* @param boolean $absolute whether the generated URLs should be absolute.
* @return array the links for navigational purpose. The array keys specify the purpose of the links (e.g. [[LINK_FIRST]]),
* and the array values are the corresponding URLs.
*/
public function getLinks($absolute = false)
{
......@@ -326,8 +326,8 @@ class Pagination extends Object implements Linkable
/**
* Returns the value of the specified query parameter.
* This method returns the named parameter value from [[params]]. Null is returned if the value does not exist.
* @param string $name the parameter name
* @param string $defaultValue the value to be returned when the specified parameter does not exist in [[params]].
* @param string $name the parameter name
* @param string $defaultValue the value to be returned when the specified parameter does not exist in [[params]].
* @return string the parameter value
*/
protected function getQueryParam($name, $defaultValue = null)
......
......@@ -201,9 +201,9 @@ class Sort extends Object
/**
* Returns the columns and their corresponding sort directions.
* @param boolean $recalculate whether to recalculate the sort directions
* @return array the columns (keys) and their corresponding sort directions (values).
* This can be passed to [[\yii\db\Query::orderBy()]] to construct a DB query.
* @param boolean $recalculate whether to recalculate the sort directions
* @return array the columns (keys) and their corresponding sort directions (values).
* This can be passed to [[\yii\db\Query::orderBy()]] to construct a DB query.
*/
public function getOrders($recalculate = false)
{
......@@ -227,10 +227,10 @@ class Sort extends Object
/**
* Returns the currently requested sort information.
* @param boolean $recalculate whether to recalculate the sort directions
* @return array sort directions indexed by attribute names.
* Sort direction can be either `SORT_ASC` for ascending order or
* `SORT_DESC` for descending order.
* @param boolean $recalculate whether to recalculate the sort directions
* @return array sort directions indexed by attribute names.
* Sort direction can be either `SORT_ASC` for ascending order or
* `SORT_DESC` for descending order.
*/
public function getAttributeOrders($recalculate = false)
{
......@@ -267,10 +267,10 @@ class Sort extends Object
/**
* Returns the sort direction of the specified attribute in the current request.
* @param string $attribute the attribute name
* @param string $attribute the attribute name
* @return boolean|null Sort direction of the attribute. Can be either `SORT_ASC`
* for ascending order or `SORT_DESC` for descending order. Null is returned
* if the attribute is invalid or does not need to be sorted.
* for ascending order or `SORT_DESC` for descending order. Null is returned
* if the attribute is invalid or does not need to be sorted.
*/
public function getAttributeOrder($attribute)
{
......@@ -283,13 +283,13 @@ class Sort extends Object
* Generates a hyperlink that links to the sort action to sort by the specified attribute.
* Based on the sort direction, the CSS class of the generated hyperlink will be appended
* with "asc" or "desc".
* @param string $attribute the attribute name by which the data should be sorted by.
* @param array $options additional HTML attributes for the hyperlink tag.
* There is one special attribute `label` which will be used as the label of the hyperlink.
* If this is not set, the label defined in [[attributes]] will be used.
* If no label is defined, [[\yii\helpers\Inflector::camel2words()]] will be called to get a label.
* Note that it will not be HTML-encoded.
* @return string the generated hyperlink
* @param string $attribute the attribute name by which the data should be sorted by.
* @param array $options additional HTML attributes for the hyperlink tag.
* There is one special attribute `label` which will be used as the label of the hyperlink.
* If this is not set, the label defined in [[attributes]] will be used.
* If no label is defined, [[\yii\helpers\Inflector::camel2words()]] will be called to get a label.
* Note that it will not be HTML-encoded.
* @return string the generated hyperlink
* @throws InvalidConfigException if the attribute is unknown
*/
public function link($attribute, $options = [])
......@@ -325,9 +325,9 @@ class Sort extends Object
* This method will consider the current sorting status given by [[attributeOrders]].
* For example, if the current page already sorts the data by the specified attribute in ascending order,
* then the URL created will lead to a page that sorts the data by the specified attribute in descending order.
* @param string $attribute the attribute name
* @param boolean $absolute whether to create an absolute URL. Defaults to `false`.
* @return string the URL for sorting. False if the attribute is invalid.
* @param string $attribute the attribute name
* @param boolean $absolute whether to create an absolute URL. Defaults to `false`.
* @return string the URL for sorting. False if the attribute is invalid.
* @throws InvalidConfigException if the attribute is unknown
* @see attributeOrders
* @see params
......@@ -352,8 +352,8 @@ class Sort extends Object
* Creates the sort variable for the specified attribute.
* The newly created sort variable can be used to create a URL that will lead to
* sorting by the specified attribute.
* @param string $attribute the attribute name
* @return string the value of the sort variable
* @param string $attribute the attribute name
* @return string the value of the sort variable
* @throws InvalidConfigException if the specified attribute is not defined in [[attributes]]
*/
public function createSortParam($attribute)
......@@ -386,7 +386,7 @@ class Sort extends Object
/**
* Returns a value indicating whether the sort definition supports sorting by the named attribute.
* @param string $name the attribute name
* @param string $name the attribute name
* @return boolean whether the sort definition supports sorting by the named attribute.
*/
public function hasAttribute($name)
......
......@@ -24,16 +24,16 @@ interface ActiveQueryInterface extends QueryInterface
{
/**
* Sets the [[asArray]] property.
* @param boolean $value whether to return the query results in terms of arrays instead of Active Records.
* @return static the query object itself
* @param boolean $value whether to return the query results in terms of arrays instead of Active Records.
* @return static the query object itself
*/
public function asArray($value = true);
/**
* Sets the [[indexBy]] property.
* @param string|callable $column the name of the column by which the query results should be indexed by.
* This can also be a callable (e.g. anonymous function) that returns the index value based on the given
* row or model data. The signature of the callable should be:
* This can also be a callable (e.g. anonymous function) that returns the index value based on the given
* row or model data. The signature of the callable should be:
*
* ~~~
* // $model is an AR instance when `asArray` is false,
......@@ -81,19 +81,19 @@ interface ActiveQueryInterface extends QueryInterface
/**
* Specifies the relation associated with the pivot table for use in relational query.
* @param string $relationName the relation name. This refers to a relation declared in the [[ActiveRelationTrait::primaryModel|primaryModel]] of the relation.
* @param callable $callable a PHP callback for customizing the relation associated with the pivot table.
* Its signature should be `function($query)`, where `$query` is the query to be customized.
* @return static the relation object itself.
* @param string $relationName the relation name. This refers to a relation declared in the [[ActiveRelationTrait::primaryModel|primaryModel]] of the relation.
* @param callable $callable a PHP callback for customizing the relation associated with the pivot table.
* Its signature should be `function($query)`, where `$query` is the query to be customized.
* @return static the relation object itself.
*/
public function via($relationName, $callable = null);
/**
* Finds the related records for the specified primary record.
* This method is invoked when a relation of an ActiveRecord is being accessed in a lazy fashion.
* @param string $name the relation name
* @param ActiveRecordInterface $model the primary model
* @return mixed the related record(s)
* @param string $name the relation name
* @param ActiveRecordInterface $model the primary model
* @return mixed the related record(s)
*/
public function findFor($name, $model);
}
......@@ -32,8 +32,8 @@ trait ActiveQueryTrait
/**
* Sets the [[asArray]] property.
* @param boolean $value whether to return the query results in terms of arrays instead of Active Records.
* @return static the query object itself
* @param boolean $value whether to return the query results in terms of arrays instead of Active Records.
* @return static the query object itself
*/
public function asArray($value = true)
{
......@@ -105,7 +105,7 @@ trait ActiveQueryTrait
/**
* Converts found rows into model instances
* @param array $rows
* @param array $rows
* @return array|ActiveRecord[]
*/
private function createModels($rows)
......@@ -151,8 +151,8 @@ trait ActiveQueryTrait
/**
* Finds records corresponding to one or multiple relations and populates them into the primary models.
* @param array $with a list of relations that this query should be performed with. Please
* refer to [[with()]] for details about specifying this parameter.
* @param array $with a list of relations that this query should be performed with. Please
* refer to [[with()]] for details about specifying this parameter.
* @param array|ActiveRecord[] $models the primary models (can be either AR instances or arrays)
*/
public function findWith($with, &$models)
......@@ -169,8 +169,8 @@ trait ActiveQueryTrait
}
/**
* @param ActiveRecord $model
* @param array $with
* @param ActiveRecord $model
* @param array $with
* @return ActiveQueryInterface[]
*/
private function normalizeRelations($model, $with)
......
......@@ -90,10 +90,10 @@ trait ActiveRelationTrait
* }
* ```
*
* @param string $relationName the relation name. This refers to a relation declared in [[primaryModel]].
* @param callable $callable a PHP callback for customizing the relation associated with the pivot table.
* Its signature should be `function($query)`, where `$query` is the query to be customized.
* @return static the relation object itself.
* @param string $relationName the relation name. This refers to a relation declared in [[primaryModel]].
* @param callable $callable a PHP callback for customizing the relation associated with the pivot table.
* Its signature should be `function($query)`, where `$query` is the query to be customized.
* @return static the relation object itself.
*/
public function via($relationName, $callable = null)
{
......@@ -123,7 +123,7 @@ trait ActiveRelationTrait
* }
* ```
*
* @param string $relationName the name of the relation that is the inverse of this relation.
* @param string $relationName the name of the relation that is the inverse of this relation.
* @return static the relation object itself.
*/
public function inverseOf($relationName)
......@@ -136,10 +136,10 @@ trait ActiveRelationTrait
/**
* Finds the related records for the specified primary record.
* This method is invoked when a relation of an ActiveRecord is being accessed in a lazy fashion.
* @param string $name the relation name
* @param ActiveRecordInterface|BaseActiveRecord $model the primary model
* @return mixed the related record(s)
* @throws InvalidParamException if the relation is invalid
* @param string $name the relation name
* @param ActiveRecordInterface|BaseActiveRecord $model the primary model
* @return mixed the related record(s)
* @throws InvalidParamException if the relation is invalid
*/
public function findFor($name, $model)
{
......@@ -180,9 +180,9 @@ trait ActiveRelationTrait
/**
* Finds the related records and populates them into the primary models.
* @param string $name the relation name
* @param array $primaryModels primary models
* @return array the related models
* @param string $name the relation name
* @param array $primaryModels primary models
* @return array the related models
* @throws InvalidConfigException if [[link]] is invalid
*/
public function populateRelation($name, &$primaryModels)
......@@ -300,11 +300,11 @@ trait ActiveRelationTrait
}
/**
* @param array $models
* @param array $link
* @param array $viaModels
* @param array $viaLink
* @param boolean $checkMultiple
* @param array $models
* @param array $link
* @param array $viaModels
* @param array $viaLink
* @param boolean $checkMultiple
* @return array
*/
private function buildBuckets($models, $link, $viaModels = null, $viaLink = null, $checkMultiple = true)
......@@ -385,8 +385,8 @@ trait ActiveRelationTrait
}
/**
* @param ActiveRecord|array $model
* @param array $attributes
* @param ActiveRecord|array $model
* @param array $attributes
* @return string
*/
private function getModelKey($model, $attributes)
......@@ -407,7 +407,7 @@ trait ActiveRelationTrait
}
/**
* @param array $primaryModels either array of AR instances or arrays
* @param array $primaryModels either array of AR instances or arrays
* @return array
*/
private function findPivotRows($primaryModels)
......
......@@ -81,7 +81,7 @@ class ColumnSchema extends Object
/**
* Converts the input value according to [[phpType]].
* If the value is null or an [[Expression]], it will not be converted.
* @param mixed $value input value
* @param mixed $value input value
* @return mixed converted value
*/
public function typecast($value)
......
......@@ -275,10 +275,10 @@ class Connection extends Component
* Turns on query caching.
* This method is provided as a shortcut to setting two properties that are related
* with query caching: [[queryCacheDuration]] and [[queryCacheDependency]].
* @param integer $duration the number of seconds that query results may remain valid in cache.
* If not set, it will use the value of [[queryCacheDuration]]. See [[queryCacheDuration]] for more details.
* @param integer $duration the number of seconds that query results may remain valid in cache.
* If not set, it will use the value of [[queryCacheDuration]]. See [[queryCacheDuration]] for more details.
* @param \yii\caching\Dependency $dependency the dependency for the cached query result.
* See [[queryCacheDependency]] for more details.
* See [[queryCacheDependency]] for more details.
*/
public function beginCache($duration = null, $dependency = null)
{
......@@ -380,8 +380,8 @@ class Connection extends Component
/**
* Creates a command for execution.
* @param string $sql the SQL statement to be executed
* @param array $params the parameters to be bound to the SQL statement
* @param string $sql the SQL statement to be executed
* @param array $params the parameters to be bound to the SQL statement
* @return Command the DB command
*/
public function createCommand($sql = null, $params = [])
......@@ -422,7 +422,7 @@ class Connection extends Component
/**
* Returns the schema information for the database opened by this connection.
* @return Schema the schema information for the database opened by this connection.
* @return Schema the schema information for the database opened by this connection.
* @throws NotSupportedException if there is no support for the current driver type
*/
public function getSchema()
......@@ -453,8 +453,8 @@ class Connection extends Component
/**
* Obtains the schema information for the named table.
* @param string $name table name.
* @param boolean $refresh whether to reload the table schema even if it is found in the cache.
* @param string $name table name.
* @param boolean $refresh whether to reload the table schema even if it is found in the cache.
* @return TableSchema table schema information. Null if the named table does not exist.
*/
public function getTableSchema($name, $refresh = false)
......@@ -464,7 +464,7 @@ class Connection extends Component
/**
* Returns the ID of the last inserted row or sequence value.
* @param string $sequenceName name of the sequence object (required by some DBMS)
* @param string $sequenceName name of the sequence object (required by some DBMS)
* @return string the row ID of the last row inserted, or the last value retrieved from the sequence object
* @see http://www.php.net/manual/en/function.PDO-lastInsertId.php
*/
......@@ -476,7 +476,7 @@ class Connection extends Component
/**
* Quotes a string value for use in a query.
* Note that if the parameter is not a string, it will be returned without change.
* @param string $str string to be quoted
* @param string $str string to be quoted
* @return string the properly quoted string
* @see http://www.php.net/manual/en/function.PDO-quote.php
*/
......@@ -490,7 +490,7 @@ class Connection extends Component
* If the table name contains schema prefix, the prefix will also be properly quoted.
* If the table name is already quoted or contains special characters including '(', '[[' and '{{',
* then this method will do nothing.
* @param string $name table name
* @param string $name table name
* @return string the properly quoted table name
*/
public function quoteTableName($name)
......@@ -503,7 +503,7 @@ class Connection extends Component
* If the column name contains prefix, the prefix will also be properly quoted.
* If the column name is already quoted or contains special characters including '(', '[[' and '{{',
* then this method will do nothing.
* @param string $name column name
* @param string $name column name
* @return string the properly quoted column name
*/
public function quoteColumnName($name)
......@@ -517,7 +517,7 @@ class Connection extends Component
* tokens enclosed within double square brackets are column names. They will be quoted accordingly.
* Also, the percentage character "%" at the beginning or ending of a table name will be replaced
* with [[tablePrefix]].
* @param string $sql the SQL to be quoted
* @param string $sql the SQL to be quoted
* @return string the quoted SQL
*/
public function quoteSql($sql)
......
......@@ -61,7 +61,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
/**
* Constructor.
* @param Command $command the command generating the query result
* @param array $config name-value pairs that will be used to initialize the object properties
* @param array $config name-value pairs that will be used to initialize the object properties
*/
public function __construct(Command $command, $config = [])
{
......@@ -74,11 +74,11 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
* Binds a column to a PHP variable.
* When rows of data are being fetched, the corresponding column value
* will be set in the variable. Note, the fetch mode must include PDO::FETCH_BOUND.
* @param integer|string $column Number of the column (1-indexed) or name of the column
* in the result set. If using the column name, be aware that the name
* should match the case of the column, as returned by the driver.
* @param mixed $value Name of the PHP variable to which the column will be bound.
* @param integer $dataType Data type of the parameter
* @param integer|string $column Number of the column (1-indexed) or name of the column
* in the result set. If using the column name, be aware that the name
* should match the case of the column, as returned by the driver.
* @param mixed $value Name of the PHP variable to which the column will be bound.
* @param integer $dataType Data type of the parameter
* @see http://www.php.net/manual/en/function.PDOStatement-bindColumn.php
*/
public function bindColumn($column, &$value, $dataType = null)
......@@ -112,8 +112,8 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
/**
* Returns a single column from the next row of a result set.
* @param integer $columnIndex zero-based column index
* @return mixed the column of the current row, false if no more rows available
* @param integer $columnIndex zero-based column index
* @return mixed the column of the current row, false if no more rows available
*/
public function readColumn($columnIndex)
{
......@@ -122,9 +122,9 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
/**
* Returns an object populated with the next row of data.
* @param string $className class name of the object to be created and populated
* @param array $fields Elements of this array are passed to the constructor
* @return mixed the populated object, false if no more row of data available
* @param string $className class name of the object to be created and populated
* @param array $fields Elements of this array are passed to the constructor
* @return mixed the populated object, false if no more row of data available
*/
public function readObject($className, $fields)
{
......@@ -134,7 +134,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
/**
* Reads the whole result set into an array.
* @return array the result set (each array element represents a row of data).
* An empty array will be returned if the result contains no row.
* An empty array will be returned if the result contains no row.
*/
public function readAll()
{
......
......@@ -23,10 +23,10 @@ class Exception extends \yii\base\Exception
/**
* Constructor.
* @param string $message PDO error message
* @param array $errorInfo PDO error info
* @param integer $code PDO error code
* @param \Exception $previous The previous exception used for the exception chaining.
* @param string $message PDO error message
* @param array $errorInfo PDO error info
* @param integer $code PDO error code
* @param \Exception $previous The previous exception used for the exception chaining.
*/
public function __construct($message, $errorInfo = [], $code = 0, \Exception $previous = null)
{
......
......@@ -39,8 +39,8 @@ class Expression extends \yii\base\Object
/**
* Constructor.
* @param string $expression the DB expression
* @param array $params parameters
* @param array $config name-value pairs that will be used to initialize the object properties
* @param array $params parameters
* @param array $config name-value pairs that will be used to initialize the object properties
*/
public function __construct($expression, $params = [], $config = [])
{
......
......@@ -24,43 +24,43 @@ interface QueryInterface
{
/**
* Executes the query and returns all results as an array.
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* @return array the query results. If the query results in nothing, an empty array will be returned.
*/
public function all($db = null);
/**
* Executes the query and returns a single row of result.
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* @return array|boolean the first row (in terms of an array) of the query result. False is returned if the query
* results in nothing.
* results in nothing.
*/
public function one($db = null);
/**
* Returns the number of records.
* @param string $q the COUNT expression. Defaults to '*'.
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* @return integer number of records
* @param string $q the COUNT expression. Defaults to '*'.
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* @return integer number of records
*/
public function count($q = '*', $db = null);
/**
* Returns a value indicating whether the query result contains any row of data.
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* @return boolean whether the query result contains any row of data.
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* @return boolean whether the query result contains any row of data.
*/
public function exists($db = null);
/**
* Sets the [[indexBy]] property.
* @param string|callable $column the name of the column by which the query results should be indexed by.
* This can also be a callable (e.g. anonymous function) that returns the index value based on the given
* row data. The signature of the callable should be:
* This can also be a callable (e.g. anonymous function) that returns the index value based on the given
* row data. The signature of the callable should be:
*
* ~~~
* function ($row)
......@@ -136,7 +136,7 @@ interface QueryInterface
* - `or not like`: similar to the `not like` operator except that `OR` is used to concatenate
* the `NOT LIKE` predicates.
*
* @param array $condition the conditions that should be put in the WHERE part.
* @param array $condition the conditions that should be put in the WHERE part.
* @return static the query object itself
* @see andWhere()
* @see orWhere()
......@@ -146,9 +146,9 @@ interface QueryInterface
/**
* Adds an additional WHERE condition to the existing one.
* The new condition and the existing one will be joined using the 'AND' operator.
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* @return static the query object itself
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* @return static the query object itself
* @see where()
* @see orWhere()
*/
......@@ -157,9 +157,9 @@ interface QueryInterface
/**
* Adds an additional WHERE condition to the existing one.
* The new condition and the existing one will be joined using the 'OR' operator.
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* @return static the query object itself
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* @return static the query object itself
* @see where()
* @see andWhere()
*/
......@@ -167,39 +167,39 @@ interface QueryInterface
/**
* Sets the ORDER BY part of the query.
* @param string|array $columns the columns (and the directions) to be ordered by.
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* @return static the query object itself
* @param string|array $columns the columns (and the directions) to be ordered by.
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* @return static the query object itself
* @see addOrderBy()
*/
public function orderBy($columns);
/**
* Adds additional ORDER BY columns to the query.
* @param string|array $columns the columns (and the directions) to be ordered by.
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* @return static the query object itself
* @param string|array $columns the columns (and the directions) to be ordered by.
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* @return static the query object itself
* @see orderBy()
*/
public function addOrderBy($columns);
/**
* Sets the LIMIT part of the query.
* @param integer $limit the limit. Use null or negative value to disable limit.
* @return static the query object itself
* @param integer $limit the limit. Use null or negative value to disable limit.
* @return static the query object itself
*/
public function limit($limit);
/**
* Sets the OFFSET part of the query.
* @param integer $offset the offset. Use null or negative value to disable offset.
* @return static the query object itself
* @param integer $offset the offset. Use null or negative value to disable offset.
* @return static the query object itself
*/
public function offset($offset);
}
......@@ -52,8 +52,8 @@ trait QueryTrait
/**
* Sets the [[indexBy]] property.
* @param string|callable $column the name of the column by which the query results should be indexed by.
* This can also be a callable (e.g. anonymous function) that returns the index value based on the given
* row data. The signature of the callable should be:
* This can also be a callable (e.g. anonymous function) that returns the index value based on the given
* row data. The signature of the callable should be:
*
* ~~~
* function ($row)
......@@ -76,7 +76,7 @@ trait QueryTrait
*
* See [[QueryInterface::where()]] for detailed documentation.
*
* @param array $condition the conditions that should be put in the WHERE part.
* @param array $condition the conditions that should be put in the WHERE part.
* @return static the query object itself
* @see andWhere()
* @see orWhere()
......@@ -91,9 +91,9 @@ trait QueryTrait
/**
* Adds an additional WHERE condition to the existing one.
* The new condition and the existing one will be joined using the 'AND' operator.
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* @return static the query object itself
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* @return static the query object itself
* @see where()
* @see orWhere()
*/
......@@ -111,9 +111,9 @@ trait QueryTrait
/**
* Adds an additional WHERE condition to the existing one.
* The new condition and the existing one will be joined using the 'OR' operator.
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* @return static the query object itself
* @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter.
* @return static the query object itself
* @see where()
* @see andWhere()
*/
......@@ -130,15 +130,15 @@ trait QueryTrait
/**
* Sets the ORDER BY part of the query.
* @param string|array $columns the columns (and the directions) to be ordered by.
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* Note that if your order-by is an expression containing commas, you should always use an array
* to represent the order-by information. Otherwise, the method will not be able to correctly determine
* the order-by columns.
* @return static the query object itself
* @param string|array $columns the columns (and the directions) to be ordered by.
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* Note that if your order-by is an expression containing commas, you should always use an array
* to represent the order-by information. Otherwise, the method will not be able to correctly determine
* the order-by columns.
* @return static the query object itself
* @see addOrderBy()
*/
public function orderBy($columns)
......@@ -150,12 +150,12 @@ trait QueryTrait
/**
* Adds additional ORDER BY columns to the query.
* @param string|array $columns the columns (and the directions) to be ordered by.
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* @return static the query object itself
* @param string|array $columns the columns (and the directions) to be ordered by.
* Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array
* (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`).
* The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression).
* @return static the query object itself
* @see orderBy()
*/
public function addOrderBy($columns)
......@@ -191,8 +191,8 @@ trait QueryTrait
/**
* Sets the LIMIT part of the query.
* @param integer $limit the limit. Use null or negative value to disable limit.
* @return static the query object itself
* @param integer $limit the limit. Use null or negative value to disable limit.
* @return static the query object itself
*/
public function limit($limit)
{
......@@ -203,8 +203,8 @@ trait QueryTrait
/**
* Sets the OFFSET part of the query.
* @param integer $offset the offset. Use null or negative value to disable offset.
* @return static the query object itself
* @param integer $offset the offset. Use null or negative value to disable offset.
* @return static the query object itself
*/
public function offset($offset)
{
......
......@@ -74,15 +74,15 @@ abstract class Schema extends Object
/**
* Loads the metadata for the specified table.
* @param string $name table name
* @param string $name table name
* @return TableSchema DBMS-dependent table metadata, null if the table does not exist.
*/
abstract protected function loadTableSchema($name);
/**
* Obtains the metadata for the named table.
* @param string $name table name. The table name may contain schema name if any. Do not quote the table name.
* @param boolean $refresh whether to reload the table schema even if it is found in the cache.
* @param string $name table name. The table name may contain schema name if any. Do not quote the table name.
* @param boolean $refresh whether to reload the table schema even if it is found in the cache.
* @return TableSchema table metadata. Null if the named table does not exist.
*/
public function getTableSchema($name, $refresh = false)
......@@ -117,8 +117,8 @@ abstract class Schema extends Object
/**
* Returns the cache key for the specified table name.
* @param string $name the table name
* @return mixed the cache key
* @param string $name the table name
* @return mixed the cache key
*/
protected function getCacheKey($name)
{
......@@ -146,11 +146,11 @@ abstract class Schema extends Object
/**
* Returns the metadata for all tables in the database.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema name.
* @param boolean $refresh whether to fetch the latest available table schemas. If this is false,
* cached data may be returned if available.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema name.
* @param boolean $refresh whether to fetch the latest available table schemas. If this is false,
* cached data may be returned if available.
* @return TableSchema[] the metadata for all tables in the database.
* Each array element is an instance of [[TableSchema]] or its child class.
* Each array element is an instance of [[TableSchema]] or its child class.
*/
public function getTableSchemas($schema = '', $refresh = false)
{
......@@ -169,10 +169,10 @@ abstract class Schema extends Object
/**
* Returns all table names in the database.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema name.
* If not empty, the returned table names will be prefixed with the schema name.
* @param boolean $refresh whether to fetch the latest available table names. If this is false,
* table names fetched previously (if available) will be returned.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema name.
* If not empty, the returned table names will be prefixed with the schema name.
* @param boolean $refresh whether to fetch the latest available table names. If this is false,
* table names fetched previously (if available) will be returned.
* @return string[] all table names in the database.
*/
public function getTableNames($schema = '', $refresh = false)
......@@ -198,7 +198,7 @@ abstract class Schema extends Object
/**
* Determines the PDO type for the given PHP data value.
* @param mixed $data the data whose PDO type is to be determined
* @param mixed $data the data whose PDO type is to be determined
* @return integer the PDO type
* @see http://www.php.net/manual/en/pdo.constants.php
*/
......@@ -247,8 +247,8 @@ abstract class Schema extends Object
* Returns all table names in the database.
* This method should be overridden by child classes in order to support this feature
* because the default implementation simply throws an exception.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @return array all table names in the database. The names have NO schema name prefix.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @return array all table names in the database. The names have NO schema name prefix.
* @throws NotSupportedException if this method is called
*/
protected function findTableNames($schema = '')
......@@ -269,8 +269,8 @@ abstract class Schema extends Object
*
* This method should be overridden by child classes in order to support this feature
* because the default implementation simply throws an exception
* @param TableSchema $table the table metadata
* @return array all unique indexes for the given table.
* @param TableSchema $table the table metadata
* @return array all unique indexes for the given table.
* @throws NotSupportedException if this method is called
*/
public function findUniqueIndexes($table)
......@@ -280,8 +280,8 @@ abstract class Schema extends Object
/**
* Returns the ID of the last inserted row or sequence value.
* @param string $sequenceName name of the sequence object (required by some DBMS)
* @return string the row ID of the last row inserted, or the last value retrieved from the sequence object
* @param string $sequenceName name of the sequence object (required by some DBMS)
* @return string the row ID of the last row inserted, or the last value retrieved from the sequence object
* @throws InvalidCallException if the DB connection is not active
* @see http://www.php.net/manual/en/function.PDO-lastInsertId.php
*/
......@@ -332,7 +332,7 @@ abstract class Schema extends Object
/**
* Quotes a string value for use in a query.
* Note that if the parameter is not a string, it will be returned without change.
* @param string $str string to be quoted
* @param string $str string to be quoted
* @return string the properly quoted string
* @see http://www.php.net/manual/en/function.PDO-quote.php
*/
......@@ -356,7 +356,7 @@ abstract class Schema extends Object
* If the table name contains schema prefix, the prefix will also be properly quoted.
* If the table name is already quoted or contains '(' or '{{',
* then this method will do nothing.
* @param string $name table name
* @param string $name table name
* @return string the properly quoted table name
* @see quoteSimpleTableName()
*/
......@@ -382,7 +382,7 @@ abstract class Schema extends Object
* If the column name contains prefix, the prefix will also be properly quoted.
* If the column name is already quoted or contains '(', '[[' or '{{',
* then this method will do nothing.
* @param string $name column name
* @param string $name column name
* @return string the properly quoted column name
* @see quoteSimpleColumnName()
*/
......@@ -405,7 +405,7 @@ abstract class Schema extends Object
* Quotes a simple table name for use in a query.
* A simple table name should contain the table name only without any schema prefix.
* If the table name is already quoted, this method will do nothing.
* @param string $name table name
* @param string $name table name
* @return string the properly quoted table name
*/
public function quoteSimpleTableName($name)
......@@ -417,7 +417,7 @@ abstract class Schema extends Object
* Quotes a simple column name for use in a query.
* A simple column name should contain the column name only without any prefix.
* If the column name is already quoted or is the asterisk character '*', this method will do nothing.
* @param string $name column name
* @param string $name column name
* @return string the properly quoted column name
*/
public function quoteSimpleColumnName($name)
......@@ -429,7 +429,7 @@ abstract class Schema extends Object
* Returns the actual name of a given table name.
* This method will strip off curly brackets from the given table name
* and replace the percentage character '%' with [[Connection::tablePrefix]].
* @param string $name the table name to be converted
* @param string $name the table name to be converted
* @return string the real name of the given table name
*/
public function getRawTableName($name)
......@@ -445,8 +445,8 @@ abstract class Schema extends Object
/**
* Extracts the PHP type from abstract DB type.
* @param ColumnSchema $column the column schema information
* @return string PHP type name
* @param ColumnSchema $column the column schema information
* @return string PHP type name
*/
protected function getColumnPhpType($column)
{
......
......@@ -62,7 +62,7 @@ class TableSchema extends Object
/**
* Gets the named column metadata.
* This is a convenient method for retrieving a named column even if it does not exist.
* @param string $name column name
* @param string $name column name
* @return ColumnSchema metadata of the named column. Null if the named column does not exist.
*/
public function getColumn($name)
......@@ -81,7 +81,7 @@ class TableSchema extends Object
/**
* Manually specifies the primary key for this table.
* @param string|array $keys the primary key (can be composite)
* @param string|array $keys the primary key (can be composite)
* @throws InvalidParamException if the specified key cannot be found in the table.
*/
public function fixPrimaryKey($keys)
......
......@@ -50,7 +50,7 @@ class Transaction extends \yii\base\Object
/**
* Returns a value indicating whether this transaction is active.
* @return boolean whether this transaction is active. Only an active transaction
* can [[commit()]] or [[rollBack()]].
* can [[commit()]] or [[rollBack()]].
*/
public function getIsActive()
{
......
......@@ -43,10 +43,10 @@ class QueryBuilder extends \yii\db\QueryBuilder
* Creates a SQL statement for resetting the sequence value of a table's primary key.
* The sequence will be reset such that the primary key of the next new row inserted
* will have the specified value or 1.
* @param string $tableName the name of the table whose primary key sequence will be reset
* @param mixed $value the value for the primary key of the next new row inserted. If this is not set,
* the next new row's primary key will have a value 1.
* @return string the SQL statement for resetting sequence
* @param string $tableName the name of the table whose primary key sequence will be reset
* @param mixed $value the value for the primary key of the next new row inserted. If this is not set,
* the next new row's primary key will have a value 1.
* @return string the SQL statement for resetting sequence
* @throws InvalidParamException if the table does not exist or there is no sequence associated with the table.
*/
public function resetSequence($tableName, $value = null)
......
......@@ -75,7 +75,7 @@ class Schema extends \yii\db\Schema
/**
* Quotes a table name for use in a query.
* A simple table name has no schema prefix.
* @param string $name table name
* @param string $name table name
* @return string the properly quoted table name
*/
public function quoteSimpleTableName($name)
......@@ -86,7 +86,7 @@ class Schema extends \yii\db\Schema
/**
* Quotes a column name for use in a query.
* A simple column name has no prefix.
* @param string $name column name
* @param string $name column name
* @return string the properly quoted column name
*/
public function quoteSimpleColumnName($name)
......@@ -97,7 +97,7 @@ class Schema extends \yii\db\Schema
/**
* Quotes a string value for use in a query.
* Note that if the parameter is not a string, it will be returned without change.
* @param string $str string to be quoted
* @param string $str string to be quoted
* @return string the properly quoted string
* @see http://www.php.net/manual/en/function.PDO-quote.php
*/
......@@ -128,7 +128,7 @@ class Schema extends \yii\db\Schema
/**
* Loads the metadata for the specified table.
* @param string $name table name
* @param string $name table name
* @return TableSchema driver dependent table metadata. Null if the table does not exist.
*/
protected function loadTableSchema($name)
......@@ -179,7 +179,7 @@ class Schema extends \yii\db\Schema
/**
* Loads the column information into a [[ColumnSchema]] object.
* @param array $info column information
* @param array $info column information
* @return ColumnSchema the column schema object
*/
protected function loadColumnSchema($info)
......@@ -234,8 +234,8 @@ class Schema extends \yii\db\Schema
/**
* Returns all table names in the database.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @return array all table names in the database. The names have NO schema name prefix.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @return array all table names in the database. The names have NO schema name prefix.
*/
protected function findTableNames($schema = '')
{
......@@ -254,7 +254,7 @@ class Schema extends \yii\db\Schema
/**
* Determines the PDO type for the given PHP data value.
* @param mixed $data the data whose PDO type is to be determined
* @param mixed $data the data whose PDO type is to be determined
* @return integer the PDO type
* @see http://www.php.net/manual/en/pdo.constants.php
*/
......
......@@ -18,8 +18,8 @@ class PDO extends \PDO
{
/**
* Returns value of the last inserted ID.
* @param string|null $sequence the sequence name. Defaults to null.
* @return integer last inserted ID value.
* @param string|null $sequence the sequence name. Defaults to null.
* @return integer last inserted ID value.
*/
public function lastInsertId($sequence = null)
{
......
......@@ -50,9 +50,9 @@ class QueryBuilder extends \yii\db\QueryBuilder
// }
/**
* @param integer $limit
* @param integer $offset
* @return string the LIMIT and OFFSET clauses built from [[\yii\db\Query::$limit]].
* @param integer $limit
* @param integer $offset
* @return string the LIMIT and OFFSET clauses built from [[\yii\db\Query::$limit]].
*/
public function buildLimit($limit, $offset = 0)
{
......@@ -78,8 +78,8 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for renaming a DB table.
* @param string $table the table to be renamed. The name will be properly quoted by the method.
* @param string $newName the new table name. The name will be properly quoted by the method.
* @param string $table the table to be renamed. The name will be properly quoted by the method.
* @param string $newName the new table name. The name will be properly quoted by the method.
* @return string the SQL statement for renaming a DB table.
*/
public function renameTable($table, $newName)
......@@ -89,9 +89,9 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for renaming a column.
* @param string $table the table whose column is to be renamed. The name will be properly quoted by the method.
* @param string $name the old name of the column. The name will be properly quoted by the method.
* @param string $newName the new name of the column. The name will be properly quoted by the method.
* @param string $table the table whose column is to be renamed. The name will be properly quoted by the method.
* @param string $name the old name of the column. The name will be properly quoted by the method.
* @param string $newName the new name of the column. The name will be properly quoted by the method.
* @return string the SQL statement for renaming a DB column.
*/
public function renameColumn($table, $name, $newName)
......@@ -101,11 +101,11 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for changing the definition of a column.
* @param string $table the table whose column is to be changed. The table name will be properly quoted by the method.
* @param string $column the name of the column to be changed. The name will be properly quoted by the method.
* @param string $type the new column type. The {@link getColumnType} method will be invoked to convert abstract column type (if any)
* into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL.
* For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.
* @param string $table the table whose column is to be changed. The table name will be properly quoted by the method.
* @param string $column the name of the column to be changed. The name will be properly quoted by the method.
* @param string $type the new column type. The {@link getColumnType} method will be invoked to convert abstract column type (if any)
* into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL.
* For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.
* @return string the SQL statement for changing the definition of a column.
*/
public function alterColumn($table, $column, $type)
......@@ -120,10 +120,10 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for enabling or disabling integrity check.
* @param boolean $check whether to turn on or off the integrity check.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @param string $table the table name. Defaults to empty string, meaning that no table will be changed.
* @return string the SQL statement for checking integrity
* @param boolean $check whether to turn on or off the integrity check.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @param string $table the table name. Defaults to empty string, meaning that no table will be changed.
* @return string the SQL statement for checking integrity
* @throws InvalidParamException if the table does not exist or there is no sequence associated with the table.
*/
public function checkIntegrity($check = true, $schema = '', $table = '')
......
......@@ -100,7 +100,7 @@ class Schema extends \yii\db\Schema
/**
* Quotes a table name for use in a query.
* A simple table name has no schema prefix.
* @param string $name table name.
* @param string $name table name.
* @return string the properly quoted table name.
*/
public function quoteSimpleTableName($name)
......@@ -111,7 +111,7 @@ class Schema extends \yii\db\Schema
/**
* Quotes a column name for use in a query.
* A simple column name has no prefix.
* @param string $name column name.
* @param string $name column name.
* @return string the properly quoted column name.
*/
public function quoteSimpleColumnName($name)
......@@ -130,7 +130,7 @@ class Schema extends \yii\db\Schema
/**
* Loads the metadata for the specified table.
* @param string $name table name
* @param string $name table name
* @return TableSchema|null driver dependent table metadata. Null if the table does not exist.
*/
public function loadTableSchema($name)
......@@ -150,7 +150,7 @@ class Schema extends \yii\db\Schema
/**
* Resolves the table name and schema name (if any).
* @param TableSchema $table the table metadata object
* @param string $name the table name
* @param string $name the table name
*/
protected function resolveTableNames($table, $name)
{
......@@ -176,7 +176,7 @@ class Schema extends \yii\db\Schema
/**
* Loads the column information into a [[ColumnSchema]] object.
* @param array $info column information
* @param array $info column information
* @return ColumnSchema the column schema object
*/
protected function loadColumnSchema($info)
......@@ -230,8 +230,8 @@ class Schema extends \yii\db\Schema
/**
* Collects the metadata of table columns.
* @param TableSchema $table the table metadata
* @return boolean whether the table exists in the database
* @param TableSchema $table the table metadata
* @return boolean whether the table exists in the database
*/
protected function findColumns($table)
{
......@@ -360,8 +360,8 @@ SQL;
/**
* Returns all table names in the database.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @return array all table names in the database. The names have NO schema name prefix.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @return array all table names in the database. The names have NO schema name prefix.
*/
protected function findTableNames($schema = '')
{
......
......@@ -23,8 +23,8 @@ class SqlsrvPDO extends \PDO
* when `$sequence` value is a null or an empty string it returns an empty string.
* But when parameter is not specified it works as expected and returns actual
* last inserted ID (like the other PDO drivers).
* @param string|null $sequence the sequence name. Defaults to null.
* @return integer last inserted ID value.
* @param string|null $sequence the sequence name. Defaults to null.
* @return integer last inserted ID value.
*/
public function lastInsertId($sequence = null)
{
......
......@@ -42,10 +42,10 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for renaming a column.
* @param string $table the table whose column is to be renamed. The name will be properly quoted by the method.
* @param string $oldName the old name of the column. The name will be properly quoted by the method.
* @param string $newName the new name of the column. The name will be properly quoted by the method.
* @return string the SQL statement for renaming a DB column.
* @param string $table the table whose column is to be renamed. The name will be properly quoted by the method.
* @param string $oldName the old name of the column. The name will be properly quoted by the method.
* @param string $newName the new name of the column. The name will be properly quoted by the method.
* @return string the SQL statement for renaming a DB column.
* @throws Exception
*/
public function renameColumn($table, $oldName, $newName)
......@@ -79,8 +79,8 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for dropping a foreign key constraint.
* @param string $name the name of the foreign key constraint to be dropped. The name will be properly quoted by the method.
* @param string $table the table whose foreign is to be dropped. The name will be properly quoted by the method.
* @param string $name the name of the foreign key constraint to be dropped. The name will be properly quoted by the method.
* @param string $table the table whose foreign is to be dropped. The name will be properly quoted by the method.
* @return string the SQL statement for dropping a foreign key constraint.
*/
public function dropForeignKey($name, $table)
......@@ -91,8 +91,8 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for removing a primary key constraint to an existing table.
* @param string $name the name of the primary key constraint to be removed.
* @param string $table the table that the primary key constraint will be removed from.
* @param string $name the name of the primary key constraint to be removed.
* @param string $table the table that the primary key constraint will be removed from.
* @return string the SQL statement for removing a primary key constraint from an existing table.
*/
public function dropPrimaryKey($name, $table)
......@@ -104,10 +104,10 @@ class QueryBuilder extends \yii\db\QueryBuilder
* Creates a SQL statement for resetting the sequence value of a table's primary key.
* The sequence will be reset such that the primary key of the next new row inserted
* will have the specified value or 1.
* @param string $tableName the name of the table whose primary key sequence will be reset
* @param mixed $value the value for the primary key of the next new row inserted. If this is not set,
* the next new row's primary key will have a value 1.
* @return string the SQL statement for resetting sequence
* @param string $tableName the name of the table whose primary key sequence will be reset
* @param mixed $value the value for the primary key of the next new row inserted. If this is not set,
* the next new row's primary key will have a value 1.
* @return string the SQL statement for resetting sequence
* @throws InvalidParamException if the table does not exist or there is no sequence associated with the table.
*/
public function resetSequence($tableName, $value = null)
......@@ -132,10 +132,10 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for enabling or disabling integrity check.
* @param boolean $check whether to turn on or off the integrity check.
* @param string $table the table name. Meaningless for MySQL.
* @param string $schema the schema of the tables. Meaningless for MySQL.
* @return string the SQL statement for checking integrity
* @param boolean $check whether to turn on or off the integrity check.
* @param string $table the table name. Meaningless for MySQL.
* @param string $schema the schema of the tables. Meaningless for MySQL.
* @return string the SQL statement for checking integrity
*/
public function checkIntegrity($check = true, $schema = '', $table = '')
{
......
......@@ -52,7 +52,7 @@ class Schema extends \yii\db\Schema
/**
* Quotes a table name for use in a query.
* A simple table name has no schema prefix.
* @param string $name table name
* @param string $name table name
* @return string the properly quoted table name
*/
public function quoteSimpleTableName($name)
......@@ -63,7 +63,7 @@ class Schema extends \yii\db\Schema
/**
* Quotes a column name for use in a query.
* A simple column name has no prefix.
* @param string $name column name
* @param string $name column name
* @return string the properly quoted column name
*/
public function quoteSimpleColumnName($name)
......@@ -82,7 +82,7 @@ class Schema extends \yii\db\Schema
/**
* Loads the metadata for the specified table.
* @param string $name table name
* @param string $name table name
* @return TableSchema driver dependent table metadata. Null if the table does not exist.
*/
protected function loadTableSchema($name)
......@@ -102,7 +102,7 @@ class Schema extends \yii\db\Schema
/**
* Resolves the table name and schema name (if any).
* @param TableSchema $table the table metadata object
* @param string $name the table name
* @param string $name the table name
*/
protected function resolveTableNames($table, $name)
{
......@@ -118,7 +118,7 @@ class Schema extends \yii\db\Schema
/**
* Loads the column information into a [[ColumnSchema]] object.
* @param array $info column information
* @param array $info column information
* @return ColumnSchema the column schema object
*/
protected function loadColumnSchema($info)
......@@ -177,9 +177,9 @@ class Schema extends \yii\db\Schema
/**
* Collects the metadata of table columns.
* @param TableSchema $table the table metadata
* @return boolean whether the table exists in the database
* @throws \Exception if DB query fails
* @param TableSchema $table the table metadata
* @return boolean whether the table exists in the database
* @throws \Exception if DB query fails
*/
protected function findColumns($table)
{
......@@ -210,8 +210,8 @@ class Schema extends \yii\db\Schema
/**
* Gets the CREATE TABLE sql string.
* @param TableSchema $table the table metadata
* @return string $sql the result of 'SHOW CREATE TABLE'
* @param TableSchema $table the table metadata
* @return string $sql the result of 'SHOW CREATE TABLE'
*/
protected function getCreateTableSql($table)
{
......@@ -259,8 +259,8 @@ class Schema extends \yii\db\Schema
* ]
* ~~~
*
* @param TableSchema $table the table metadata
* @return array all unique indexes for the given table.
* @param TableSchema $table the table metadata
* @return array all unique indexes for the given table.
*/
public function findUniqueIndexes($table)
{
......@@ -281,8 +281,8 @@ class Schema extends \yii\db\Schema
/**
* Returns all table names in the database.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @return array all table names in the database. The names have NO schema name prefix.
* @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
* @return array all table names in the database. The names have NO schema name prefix.
*/
protected function findTableNames($schema = '')
{
......
......@@ -77,8 +77,8 @@ EOD;
/**
* Builds a SQL statement for renaming a DB table.
*
* @param string $table the table to be renamed. The name will be properly quoted by the method.
* @param string $newName the new table name. The name will be properly quoted by the method.
* @param string $table the table to be renamed. The name will be properly quoted by the method.
* @param string $newName the new table name. The name will be properly quoted by the method.
* @return string the SQL statement for renaming a DB table.
*/
public function renameTable($table, $newName)
......@@ -89,11 +89,11 @@ EOD;
/**
* Builds a SQL statement for changing the definition of a column.
*
* @param string $table the table whose column is to be changed. The table name will be properly quoted by the method.
* @param string $column the name of the column to be changed. The name will be properly quoted by the method.
* @param string $type the new column type. The {@link getColumnType} method will be invoked to convert abstract column type (if any)
* into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL.
* For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.
* @param string $table the table whose column is to be changed. The table name will be properly quoted by the method.
* @param string $column the name of the column to be changed. The name will be properly quoted by the method.
* @param string $type the new column type. The {@link getColumnType} method will be invoked to convert abstract column type (if any)
* into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL.
* For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.
* @return string the SQL statement for changing the definition of a column.
*/
public function alterColumn($table, $column, $type)
......@@ -106,8 +106,8 @@ EOD;
/**
* Builds a SQL statement for dropping an index.
*
* @param string $name the name of the index to be dropped. The name will be properly quoted by the method.
* @param string $table the table whose index is to be dropped. The name will be properly quoted by the method.
* @param string $name the name of the index to be dropped. The name will be properly quoted by the method.
* @param string $table the table whose index is to be dropped. The name will be properly quoted by the method.
* @return string the SQL statement for dropping an index.
*/
public function dropIndex($name, $table)
......
......@@ -84,7 +84,7 @@ class Schema extends \yii\db\Schema
* Resolves the table name and schema name (if any).
*
* @param TableSchema $table the table metadata object
* @param string $name the table name
* @param string $name the table name
*/
protected function resolveTableNames($table, $name)
{
......@@ -102,8 +102,8 @@ class Schema extends \yii\db\Schema
/**
* Collects the table column metadata.
* @param TableSchema $table the table schema
* @return boolean whether the table exists
* @param TableSchema $table the table schema
* @return boolean whether the table exists
*/
protected function findColumns($table)
{
......@@ -234,7 +234,7 @@ EOD;
/**
* Extracts the data types for the given column
* @param ColumnSchema $column
* @param string $dbType DB type
* @param string $dbType DB type
*/
protected function extractColumnType($column, $dbType)
{
......@@ -261,7 +261,7 @@ EOD;
/**
* Extracts size, precision and scale information from column's DB type.
* @param ColumnSchema $column
* @param string $dbType the column's DB type
* @param string $dbType the column's DB type
*/
protected function extractColumnSize($column, $dbType)
{
......
......@@ -43,8 +43,8 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for dropping an index.
* @param string $name the name of the index to be dropped. The name will be properly quoted by the method.
* @param string $table the table whose index is to be dropped. The name will be properly quoted by the method.
* @param string $name the name of the index to be dropped. The name will be properly quoted by the method.
* @param string $table the table whose index is to be dropped. The name will be properly quoted by the method.
* @return string the SQL statement for dropping an index.
*/
public function dropIndex($name, $table)
......@@ -54,8 +54,8 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for renaming a DB table.
* @param string $oldName the table to be renamed. The name will be properly quoted by the method.
* @param string $newName the new table name. The name will be properly quoted by the method.
* @param string $oldName the table to be renamed. The name will be properly quoted by the method.
* @param string $newName the new table name. The name will be properly quoted by the method.
* @return string the SQL statement for renaming a DB table.
*/
public function renameTable($oldName, $newName)
......@@ -67,10 +67,10 @@ class QueryBuilder extends \yii\db\QueryBuilder
* Creates a SQL statement for resetting the sequence value of a table's primary key.
* The sequence will be reset such that the primary key of the next new row inserted
* will have the specified value or 1.
* @param string $tableName the name of the table whose primary key sequence will be reset
* @param mixed $value the value for the primary key of the next new row inserted. If this is not set,
* the next new row's primary key will have a value 1.
* @return string the SQL statement for resetting sequence
* @param string $tableName the name of the table whose primary key sequence will be reset
* @param mixed $value the value for the primary key of the next new row inserted. If this is not set,
* the next new row's primary key will have a value 1.
* @return string the SQL statement for resetting sequence
* @throws InvalidParamException if the table does not exist or there is no sequence associated with the table.
*/
public function resetSequence($tableName, $value = null)
......@@ -101,10 +101,10 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for enabling or disabling integrity check.
* @param boolean $check whether to turn on or off the integrity check.
* @param string $schema the schema of the tables.
* @param string $table the table name.
* @return string the SQL statement for checking integrity
* @param boolean $check whether to turn on or off the integrity check.
* @param string $schema the schema of the tables.
* @param string $table the table name.
* @return string the SQL statement for checking integrity
*/
public function checkIntegrity($check = true, $schema = '', $table = '')
{
......@@ -126,12 +126,12 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for changing the definition of a column.
* @param string $table the table whose column is to be changed. The table name will be properly quoted by the method.
* @param string $column the name of the column to be changed. The name will be properly quoted by the method.
* @param string $type the new column type. The [[getColumnType()]] method will be invoked to convert abstract
* column type (if any) into the physical one. Anything that is not recognized as abstract type will be kept
* in the generated SQL. For example, 'string' will be turned into 'varchar(255)', while 'string not null'
* will become 'varchar(255) not null'.
* @param string $table the table whose column is to be changed. The table name will be properly quoted by the method.
* @param string $column the name of the column to be changed. The name will be properly quoted by the method.
* @param string $type the new column type. The [[getColumnType()]] method will be invoked to convert abstract
* column type (if any) into the physical one. Anything that is not recognized as abstract type will be kept
* in the generated SQL. For example, 'string' will be turned into 'varchar(255)', while 'string not null'
* will become 'varchar(255) not null'.
* @return string the SQL statement for changing the definition of a column.
*/
public function alterColumn($table, $column, $type)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment