diff --git a/framework/BaseYii.php b/framework/BaseYii.php index c6fc6827a7..5a1e8174d6 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -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) { diff --git a/framework/base/Action.php b/framework/base/Action.php index 6339338b7d..ae7c2c3d3a 100644 --- a/framework/base/Action.php +++ b/framework/base/Action.php @@ -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) diff --git a/framework/base/ActionEvent.php b/framework/base/ActionEvent.php index 7c76b918c9..06e2bd6af4 100644 --- a/framework/base/ActionEvent.php +++ b/framework/base/ActionEvent.php @@ -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 = []) { diff --git a/framework/base/ActionFilter.php b/framework/base/ActionFilter.php index 4bb2cf441c..637d24be87 100644 --- a/framework/base/ActionFilter.php +++ b/framework/base/ActionFilter.php @@ -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) diff --git a/framework/base/Application.php b/framework/base/Application.php index d279e66847..13bd72769f 100644 --- a/framework/base/Application.php +++ b/framework/base/Application.php @@ -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) { diff --git a/framework/base/ArrayAccessTrait.php b/framework/base/ArrayAccessTrait.php index 43b7fff173..14016e8c94 100644 --- a/framework/base/ArrayAccessTrait.php +++ b/framework/base/ArrayAccessTrait.php @@ -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) { diff --git a/framework/base/Arrayable.php b/framework/base/Arrayable.php index 4a8fd45d8e..3acc41f5b1 100644 --- a/framework/base/Arrayable.php +++ b/framework/base/Arrayable.php @@ -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); } diff --git a/framework/base/ArrayableTrait.php b/framework/base/ArrayableTrait.php index b30722b998..4ce567965d 100644 --- a/framework/base/ArrayableTrait.php +++ b/framework/base/ArrayableTrait.php @@ -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) { diff --git a/framework/base/Component.php b/framework/base/Component.php index ad629a41dd..74143d4530 100644 --- a/framework/base/Component.php +++ b/framework/base/Component.php @@ -115,10 +115,10 @@ class Component extends Object * * Do not call this method directly as it is a PHP magic method that * will be implicitly called when executing `$value = $component->property;`. - * @param string $name the property name - * @return mixed the property value or the value of a behavior's property + * @param string $name the property name + * @return mixed the property value or the value of a behavior's property * @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) @@ -154,10 +154,10 @@ class Component extends Object * * Do not call this method directly as it is a PHP magic method that * will be implicitly called when executing `$component->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) @@ -206,7 +206,7 @@ class Component extends Object * * Do not call this method directly as it is a PHP magic method that * will be implicitly called when executing `isset($component->property)`. - * @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 null */ public function __isset($name) @@ -236,7 +236,7 @@ class Component extends Object * * Do not call this method directly as it is a PHP magic method that * will be implicitly called when executing `unset($component->property)`. - * @param string $name the property name + * @param string $name the property name * @throws InvalidCallException if the property is read only. */ public function __unset($name) @@ -268,9 +268,9 @@ class Component extends 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 - * @return mixed the method return value + * @param string $name the method name + * @param array $params method parameters + * @return mixed the method return value * @throws UnknownMethodException when calling unknown method */ public function __call($name, $params) @@ -304,9 +304,9 @@ class Component extends Object * - the class has a member variable with the specified name (when `$checkVars` is true); * - an attached behavior has a property of the given name (when `$checkBehaviors` is true). * - * @param string $name the property name - * @param boolean $checkVars whether to treat member variables as properties - * @param boolean $checkBehaviors whether to treat behaviors' properties as properties of this component + * @param string $name the property name + * @param boolean $checkVars whether to treat member variables as properties + * @param boolean $checkBehaviors whether to treat behaviors' properties as properties of this component * @return boolean whether the property is defined * @see canGetProperty() * @see canSetProperty() @@ -325,9 +325,9 @@ class Component extends Object * - the class has a member variable with the specified name (when `$checkVars` is true); * - an attached behavior has a readable property of the given name (when `$checkBehaviors` is true). * - * @param string $name the property name - * @param boolean $checkVars whether to treat member variables as properties - * @param boolean $checkBehaviors whether to treat behaviors' properties as properties of this component + * @param string $name the property name + * @param boolean $checkVars whether to treat member variables as properties + * @param boolean $checkBehaviors whether to treat behaviors' properties as properties of this component * @return boolean whether the property can be read * @see canSetProperty() */ @@ -356,9 +356,9 @@ class Component extends Object * - the class has a member variable with the specified name (when `$checkVars` is true); * - an attached behavior has a writable property of the given name (when `$checkBehaviors` is true). * - * @param string $name the property name - * @param boolean $checkVars whether to treat member variables as properties - * @param boolean $checkBehaviors whether to treat behaviors' properties as properties of this component + * @param string $name the property name + * @param boolean $checkVars whether to treat member variables as properties + * @param boolean $checkBehaviors whether to treat behaviors' properties as properties of this component * @return boolean whether the property can be written * @see canGetProperty() */ @@ -385,8 +385,8 @@ class Component extends Object * - the class has a method with the specified name * - an attached behavior has a method with the given name (when `$checkBehaviors` is true). * - * @param string $name the property name - * @param boolean $checkBehaviors whether to treat behaviors' methods as methods of this component + * @param string $name the property name + * @param boolean $checkBehaviors whether to treat behaviors' methods as methods of this component * @return boolean whether the property is defined */ public function hasMethod($name, $checkBehaviors = true) @@ -438,7 +438,7 @@ class Component extends Object /** * Returns a value indicating whether there is any handler attached to the named event. - * @param string $name the event name + * @param string $name the event name * @return boolean whether there is any handler attached to the event. */ public function hasEventHandlers($name) @@ -469,10 +469,10 @@ class Component extends Object * * where `$event` is an [[Event]] object which includes parameters associated with the event. * - * @param string $name the event name + * @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 function on($name, $handler, $data = null) @@ -484,10 +484,10 @@ class Component extends Object /** * Detaches an existing event handler from this component. * This method is the opposite of [[on()]]. - * @param string $name 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 if a handler is found and detached + * @param string $name 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 if a handler is found and detached * @see on() */ public function off($name, $handler = null) @@ -520,8 +520,8 @@ class Component extends Object * Triggers an event. * This method represents the happening of an event. It invokes * all attached handlers for the event including class-level handlers. - * @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 function trigger($name, Event $event = null) { @@ -550,7 +550,7 @@ class Component extends Object /** * Returns the named behavior object. - * @param string $name the behavior name + * @param string $name the behavior name * @return Behavior the behavior object, or null if the behavior does not exist */ public function getBehavior($name) @@ -576,7 +576,7 @@ class Component extends Object * This method will create the behavior object based on the given * configuration. After that, the behavior object will be attached to * this component by calling the [[Behavior::attach()]] method. - * @param string $name the name of the behavior. + * @param string $name the name of the behavior. * @param string|array|Behavior $behavior the behavior configuration. This can be one of the following: * * - a [[Behavior]] object @@ -611,7 +611,7 @@ class Component extends Object /** * Detaches a behavior from the component. * The behavior's [[Behavior::detach()]] method will be invoked. - * @param string $name the behavior's name. + * @param string $name the behavior's name. * @return Behavior the detached behavior. Null if the behavior does not exist. */ public function detachBehavior($name) @@ -654,9 +654,9 @@ class Component extends Object /** * Attaches a behavior to this component. - * @param string $name the name of the behavior. - * @param string|array|Behavior $behavior the behavior to be attached - * @return Behavior the attached behavior. + * @param string $name the name of the behavior. + * @param string|array|Behavior $behavior the behavior to be attached + * @return Behavior the attached behavior. */ private function attachBehaviorInternal($name, $behavior) { diff --git a/framework/base/Controller.php b/framework/base/Controller.php index 222d24f035..1b1cdd889f 100644 --- a/framework/base/Controller.php +++ b/framework/base/Controller.php @@ -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) diff --git a/framework/base/DynamicModel.php b/framework/base/DynamicModel.php index afe94f4c06..ed2bb22c70 100644 --- a/framework/base/DynamicModel.php +++ b/framework/base/DynamicModel.php @@ -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 = []) diff --git a/framework/base/ErrorException.php b/framework/base/ErrorException.php index 67e825567f..529fd37171 100644 --- a/framework/base/ErrorException.php +++ b/framework/base/ErrorException.php @@ -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) diff --git a/framework/base/ErrorHandler.php b/framework/base/ErrorHandler.php index fce20b61d5..619d547301 100644 --- a/framework/base/ErrorHandler.php +++ b/framework/base/ErrorHandler.php @@ -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) { diff --git a/framework/base/Event.php b/framework/base/Event.php index def9681854..80bb39129f 100644 --- a/framework/base/Event.php +++ b/framework/base/Event.php @@ -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) { diff --git a/framework/base/Formatter.php b/framework/base/Formatter.php index 1cc22f4406..cd0189a87e 100644 --- a/framework/base/Formatter.php +++ b/framework/base/Formatter.php @@ -99,12 +99,12 @@ class Formatter extends Component * This method will call one of the "as" methods available in this class to do the formatting. * For type "xyz", the method "asXyz" will be used. For example, if the format is "html", * then [[asHtml()]] will be used. Format names are case insensitive. - * @param mixed $value the value to be formatted - * @param string|array $format the format of the value, e.g., "html", "text". To specify additional - * parameters of the formatting method, you may use an array. The first element of the array - * specifies the format name, while the rest of the elements will be used as the parameters to the formatting - * method. For example, a format of `['date', 'Y-m-d']` will cause the invocation of `asDate($value, 'Y-m-d')`. - * @return string the formatting result + * @param mixed $value the value to be formatted + * @param string|array $format the format of the value, e.g., "html", "text". To specify additional + * parameters of the formatting method, you may use an array. The first element of the array + * specifies the format name, while the rest of the elements will be used as the parameters to the formatting + * method. For example, a format of `['date', 'Y-m-d']` will cause the invocation of `asDate($value, 'Y-m-d')`. + * @return string the formatting result * @throws InvalidParamException if the type is not supported by this class. */ public function format($value, $format) @@ -131,7 +131,7 @@ class Formatter extends Component /** * Formats the value as is without any formatting. * This method simply returns back the parameter without any format. - * @param mixed $value the value to be formatted + * @param mixed $value the value to be formatted * @return string the formatted result */ public function asRaw($value) @@ -145,7 +145,7 @@ class Formatter extends Component /** * Formats the value as an HTML-encoded plain text. - * @param mixed $value the value to be formatted + * @param mixed $value the value to be formatted * @return string the formatted result */ public function asText($value) @@ -159,7 +159,7 @@ class Formatter extends Component /** * Formats the value as an HTML-encoded plain text with newlines converted into breaks. - * @param mixed $value the value to be formatted + * @param mixed $value the value to be formatted * @return string the formatted result */ public function asNtext($value) @@ -175,7 +175,7 @@ class Formatter extends Component * Formats the value as HTML-encoded text paragraphs. * Each text paragraph is enclosed within a `
` tag.
* One or multiple consecutive empty lines divide two paragraphs.
- * @param mixed $value the value to be formatted
+ * @param mixed $value the value to be formatted
* @return string the formatted result
*/
public function asParagraphs($value)
@@ -193,9 +193,9 @@ class Formatter extends Component
* Formats the value as HTML text.
* The value will be purified using [[HtmlPurifier]] to avoid XSS attacks.
* Use [[asRaw()]] if you do not want any purification of the value.
- * @param mixed $value the value to be formatted
- * @param array|null $config the configuration for the HTMLPurifier class.
- * @return string the formatted result
+ * @param mixed $value the value to be formatted
+ * @param array|null $config the configuration for the HTMLPurifier class.
+ * @return string the formatted result
*/
public function asHtml($value, $config = null)
{
@@ -208,7 +208,7 @@ class Formatter extends Component
/**
* Formats the value as a mailto link.
- * @param mixed $value the value to be formatted
+ * @param mixed $value the value to be formatted
* @return string the formatted result
*/
public function asEmail($value)
@@ -222,7 +222,7 @@ class Formatter extends Component
/**
* Formats the value as an image tag.
- * @param mixed $value the value to be formatted
+ * @param mixed $value the value to be formatted
* @return string the formatted result
*/
public function asImage($value)
@@ -236,7 +236,7 @@ class Formatter extends Component
/**
* Formats the value as a hyperlink.
- * @param mixed $value the value to be formatted
+ * @param mixed $value the value to be formatted
* @return string the formatted result
*/
public function asUrl($value)
@@ -254,7 +254,7 @@ class Formatter extends Component
/**
* Formats the value as a boolean.
- * @param mixed $value the value to be formatted
+ * @param mixed $value the value to be formatted
* @return string the formatted result
* @see booleanFormat
*/
@@ -270,15 +270,15 @@ class Formatter extends Component
/**
* Formats the value as a date.
* @param integer|string|DateTime $value the value to be formatted. The following
- * types of value are supported:
+ * types of value are supported:
*
* - an integer representing a UNIX timestamp
* - a string that can be parsed into a UNIX timestamp via `strtotime()`
* - a PHP DateTime object
*
- * @param string $format the format used to convert the value into a date string.
- * If null, [[dateFormat]] will be used. The format string should be one
- * that can be recognized by the PHP `date()` function.
+ * @param string $format the format used to convert the value into a date string.
+ * If null, [[dateFormat]] will be used. The format string should be one
+ * that can be recognized by the PHP `date()` function.
* @return string the formatted result
* @see dateFormat
*/
@@ -295,15 +295,15 @@ class Formatter extends Component
/**
* Formats the value as a time.
* @param integer|string|DateTime $value the value to be formatted. The following
- * types of value are supported:
+ * types of value are supported:
*
* - an integer representing a UNIX timestamp
* - a string that can be parsed into a UNIX timestamp via `strtotime()`
* - a PHP DateTime object
*
- * @param string $format the format used to convert the value into a date string.
- * If null, [[timeFormat]] will be used. The format string should be one
- * that can be recognized by the PHP `date()` function.
+ * @param string $format the format used to convert the value into a date string.
+ * If null, [[timeFormat]] will be used. The format string should be one
+ * that can be recognized by the PHP `date()` function.
* @return string the formatted result
* @see timeFormat
*/
@@ -320,15 +320,15 @@ class Formatter extends Component
/**
* Formats the value as a datetime.
* @param integer|string|DateTime $value the value to be formatted. The following
- * types of value are supported:
+ * types of value are supported:
*
* - an integer representing a UNIX timestamp
* - a string that can be parsed into a UNIX timestamp via `strtotime()`
* - a PHP DateTime object
*
- * @param string $format the format used to convert the value into a date string.
- * If null, [[datetimeFormat]] will be used. The format string should be one
- * that can be recognized by the PHP `date()` function.
+ * @param string $format the format used to convert the value into a date string.
+ * If null, [[datetimeFormat]] will be used. The format string should be one
+ * that can be recognized by the PHP `date()` function.
* @return string the formatted result
* @see datetimeFormat
*/
@@ -344,7 +344,7 @@ class Formatter extends Component
/**
* Normalizes the given datetime value as one that can be taken by various date/time formatting methods.
- * @param mixed $value the datetime value to be normalized.
+ * @param mixed $value the datetime value to be normalized.
* @return integer the normalized datetime value
*/
protected function normalizeDatetimeValue($value)
@@ -359,9 +359,9 @@ class Formatter extends Component
}
/**
- * @param integer $value normalized datetime value
- * @param string $format the format used to convert the value into a date string.
- * @return string the formatted result
+ * @param integer $value normalized datetime value
+ * @param string $format the format used to convert the value into a date string.
+ * @return string the formatted result
*/
protected function formatTimestamp($value, $format)
{
@@ -373,7 +373,7 @@ class Formatter extends Component
/**
* Formats the value as an integer.
- * @param mixed $value the value to be formatted
+ * @param mixed $value the value to be formatted
* @return string the formatting result.
*/
public function asInteger($value)
@@ -393,9 +393,9 @@ class Formatter extends Component
/**
* Formats the value as a double number.
* Property [[decimalSeparator]] will be used to represent the decimal point.
- * @param mixed $value the value to be formatted
- * @param integer $decimals the number of digits after the decimal point
- * @return string the formatting result.
+ * @param mixed $value the value to be formatted
+ * @param integer $decimals the number of digits after the decimal point
+ * @return string the formatting result.
* @see decimalSeparator
*/
public function asDouble($value, $decimals = 2)
@@ -413,9 +413,9 @@ class Formatter extends Component
/**
* Formats the value as a number with decimal and thousand separators.
* This method calls the PHP number_format() function to do the formatting.
- * @param mixed $value the value to be formatted
- * @param integer $decimals the number of digits after the decimal point
- * @return string the formatted result
+ * @param mixed $value the value to be formatted
+ * @param integer $decimals the number of digits after the decimal point
+ * @return string the formatted result
* @see decimalSeparator
* @see thousandSeparator
*/
@@ -432,10 +432,10 @@ class Formatter extends Component
/**
* Formats the value in bytes as a size in human readable form.
- * @param integer $value value in bytes to be formatted
- * @param boolean $verbose if full names should be used (e.g. bytes, kilobytes, ...).
- * Defaults to false meaning that short names will be used (e.g. B, KB, ...).
- * @return string the formatted result
+ * @param integer $value value in bytes to be formatted
+ * @param boolean $verbose if full names should be used (e.g. bytes, kilobytes, ...).
+ * Defaults to false meaning that short names will be used (e.g. B, KB, ...).
+ * @return string the formatted result
* @see sizeFormat
*/
public function asSize($value, $verbose = false)
@@ -505,7 +505,7 @@ class Formatter extends Component
}
} else {
$timezone = new \DateTimeZone($this->timeZone);
-
+
if ($referenceTime === null) {
$dateNow = new DateTime('now', $timezone);
} else {
diff --git a/framework/base/InlineAction.php b/framework/base/InlineAction.php
index a3ef32af60..140d79526a 100644
--- a/framework/base/InlineAction.php
+++ b/framework/base/InlineAction.php
@@ -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)
diff --git a/framework/base/Model.php b/framework/base/Model.php
index 8a4e93df11..9bbb7d86e0 100644
--- a/framework/base/Model.php
+++ b/framework/base/Model.php
@@ -302,11 +302,11 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* Errors found during the validation can be retrieved via [[getErrors()]],
* [[getFirstErrors()]] and [[getFirstError()]].
*
- * @param array $attributes list of attributes that should be validated.
- * If this parameter is empty, it means any attribute listed in the applicable
- * validation rules should be validated.
- * @param boolean $clearErrors whether to call [[clearErrors()]] before performing validation
- * @return boolean whether the validation is successful without any error.
+ * @param array $attributes list of attributes that should be validated.
+ * If this parameter is empty, it means any attribute listed in the applicable
+ * validation rules should be validated.
+ * @param boolean $clearErrors whether to call [[clearErrors()]] before performing validation
+ * @return boolean whether the validation is successful without any error.
* @throws InvalidParamException if the current scenario is unknown.
*/
public function validate($attributes = null, $clearErrors = true)
@@ -341,7 +341,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* You may override this method to do preliminary checks before validation.
* Make sure the parent implementation is invoked so that the event can be raised.
* @return boolean whether the validation should be executed. Defaults to true.
- * If false is returned, the validation will stop and the model is considered invalid.
+ * If false is returned, the validation will stop and the model is considered invalid.
*/
public function beforeValidate()
{
@@ -389,8 +389,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Returns the validators applicable to the current [[scenario]].
- * @param string $attribute the name of the attribute whose applicable validators should be returned.
- * If this is null, the validators for ALL attributes in the model will be returned.
+ * @param string $attribute the name of the attribute whose applicable validators should be returned.
+ * If this is null, the validators for ALL attributes in the model will be returned.
* @return \yii\validators\Validator[] the validators applicable to the current [[scenario]].
*/
public function getActiveValidators($attribute = null)
@@ -409,7 +409,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Creates validator objects based on the validation rules specified in [[rules()]].
* Unlike [[getValidators()]], each time this method is called, a new list of validators will be returned.
- * @return ArrayObject validators
+ * @return ArrayObject validators
* @throws InvalidConfigException if any validation rule configuration is invalid
*/
public function createValidators()
@@ -434,7 +434,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* This is determined by checking if the attribute is associated with a
* [[\yii\validators\RequiredValidator|required]] validation rule in the
* current [[scenario]].
- * @param string $attribute attribute name
+ * @param string $attribute attribute name
* @return boolean whether the attribute is required
*/
public function isAttributeRequired($attribute)
@@ -450,7 +450,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Returns a value indicating whether the attribute is safe for massive assignments.
- * @param string $attribute attribute name
+ * @param string $attribute attribute name
* @return boolean whether the attribute is safe for massive assignments
* @see safeAttributes()
*/
@@ -461,7 +461,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Returns a value indicating whether the attribute is active in the current scenario.
- * @param string $attribute attribute name
+ * @param string $attribute attribute name
* @return boolean whether the attribute is active in the current scenario
* @see activeAttributes()
*/
@@ -472,7 +472,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Returns the text label for the specified attribute.
- * @param string $attribute the attribute name
+ * @param string $attribute the attribute name
* @return string the attribute label
* @see generateAttributeLabel()
* @see attributeLabels()
@@ -486,8 +486,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Returns a value indicating whether there is any validation error.
- * @param string|null $attribute attribute name. Use null to check all attributes.
- * @return boolean whether there is any error.
+ * @param string|null $attribute attribute name. Use null to check all attributes.
+ * @return boolean whether there is any error.
*/
public function hasErrors($attribute = null)
{
@@ -496,11 +496,11 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Returns the errors for all attribute or a single attribute.
- * @param string $attribute attribute name. Use null to retrieve errors for all attributes.
+ * @param string $attribute attribute name. Use null to retrieve errors for all attributes.
* @property array An array of errors for all attributes. Empty array is returned if no error.
- * The result is a two-dimensional array. See [[getErrors()]] for detailed description.
- * @return array errors for all attributes or the specified attribute. Empty array is returned if no error.
- * Note that when returning errors for all attributes, the result is a two-dimensional array, like the following:
+ * The result is a two-dimensional array. See [[getErrors()]] for detailed description.
+ * @return array errors for all attributes or the specified attribute. Empty array is returned if no error.
+ * Note that when returning errors for all attributes, the result is a two-dimensional array, like the following:
*
* ~~~
* [
@@ -529,7 +529,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Returns the first error of every attribute in the model.
* @return array the first errors. The array keys are the attribute names, and the array
- * values are the corresponding error messages. An empty array will be returned if there is no error.
+ * values are the corresponding error messages. An empty array will be returned if there is no error.
* @see getErrors()
* @see getFirstError()
*/
@@ -551,7 +551,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Returns the first error of the specified attribute.
- * @param string $attribute attribute name.
+ * @param string $attribute attribute name.
* @return string the error message. Null is returned if no error.
* @see getErrors()
* @see getFirstErrors()
@@ -564,7 +564,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Adds a new error to the specified attribute.
* @param string $attribute attribute name
- * @param string $error new error message
+ * @param string $error new error message
*/
public function addError($attribute, $error = '')
{
@@ -589,7 +589,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* This is done by replacing underscores, dashes and dots with blanks and
* changing the first letter of each word to upper case.
* For example, 'department_name' or 'DepartmentName' will generate 'Department Name'.
- * @param string $name the column name
+ * @param string $name the column name
* @return string the attribute label
*/
public function generateAttributeLabel($name)
@@ -599,10 +599,10 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Returns attribute values.
- * @param array $names list of attributes whose value needs to be returned.
- * Defaults to null, meaning all attributes listed in [[attributes()]] will be returned.
- * If it is an array, only the attributes in the array will be returned.
- * @param array $except list of attributes whose value should NOT be returned.
+ * @param array $names list of attributes whose value needs to be returned.
+ * Defaults to null, meaning all attributes listed in [[attributes()]] will be returned.
+ * If it is an array, only the attributes in the array will be returned.
+ * @param array $except list of attributes whose value should NOT be returned.
* @return array attribute values (name => value).
*/
public function getAttributes($names = null, $except = [])
@@ -623,9 +623,9 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
/**
* Sets the attribute values in a massive way.
- * @param array $values attribute values (name => value) to be assigned to the model.
+ * @param array $values attribute values (name => value) to be assigned to the model.
* @param boolean $safeOnly whether the assignments should only be done to the safe attributes.
- * A safe attribute is one that is associated with a validation rule in the current [[scenario]].
+ * A safe attribute is one that is associated with a validation rule in the current [[scenario]].
* @see safeAttributes()
* @see attributes()
*/
@@ -647,8 +647,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* This method is invoked when an unsafe attribute is being massively assigned.
* The default implementation will log a warning message if YII_DEBUG is on.
* It does nothing otherwise.
- * @param string $name the unsafe attribute name
- * @param mixed $value the attribute value
+ * @param string $name the unsafe attribute name
+ * @param mixed $value the attribute value
*/
public function onUnsafeAttribute($name, $value)
{
@@ -728,10 +728,10 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* The data to be loaded is `$data[formName]`, where `formName` refers to the value of [[formName()]].
* If [[formName()]] is empty, the whole `$data` array will be used to populate the model.
* The data being populated is subject to the safety check by [[setAttributes()]].
- * @param array $data the data array. This is usually `$_POST` or `$_GET`, but can also be any valid array
- * supplied by end user.
- * @param string $formName the form name to be used for loading the data into the model.
- * If not set, [[formName()]] will be used.
+ * @param array $data the data array. This is usually `$_POST` or `$_GET`, but can also be any valid array
+ * supplied by end user.
+ * @param string $formName the form name to be used for loading the data into the model.
+ * If not set, [[formName()]] will be used.
* @return boolean whether the model is successfully populated with some data.
*/
public function load($data, $formName = null)
@@ -757,9 +757,9 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* refers to the value of [[formName()]], and `index` the index of the model in the `$models` array.
* If [[formName()]] is empty, `$data[index]` will be used to populate each model.
* The data being populated to each model is subject to the safety check by [[setAttributes()]].
- * @param array $models the models to be populated. Note that all models should have the same class.
- * @param array $data the data array. This is usually `$_POST` or `$_GET`, but can also be any valid array
- * supplied by end user.
+ * @param array $models the models to be populated. Note that all models should have the same class.
+ * @param array $data the data array. This is usually `$_POST` or `$_GET`, but can also be any valid array
+ * supplied by end user.
* @return boolean whether the model is successfully populated with some data.
*/
public static function loadMultiple($models, $data)
@@ -790,12 +790,12 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* Validates multiple models.
* This method will validate every model. The models being validated may
* be of the same or different types.
- * @param array $models the models to be validated
- * @param array $attributes list of attributes that should be validated.
- * If this parameter is empty, it means any attribute listed in the applicable
- * validation rules should be validated.
+ * @param array $models the models to be validated
+ * @param array $attributes list of attributes that should be validated.
+ * If this parameter is empty, it means any attribute listed in the applicable
+ * validation rules should be validated.
* @return boolean whether all models are valid. False will be returned if one
- * or multiple models have validation error.
+ * or multiple models have validation error.
*/
public static function validateMultiple($models, $attributes = null)
{
@@ -864,10 +864,10 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* 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)
{
@@ -914,7 +914,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* Returns whether there is an element at the specified offset.
* This method is required by the SPL interface `ArrayAccess`.
* It is implicitly called when you use something like `isset($model[$offset])`.
- * @param mixed $offset the offset to check on
+ * @param mixed $offset the offset to check on
* @return boolean
*/
public function offsetExists($offset)
@@ -926,7 +926,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* Returns the element at the specified offset.
* This method is required by the SPL interface `ArrayAccess`.
* It is implicitly called when you use something like `$value = $model[$offset];`.
- * @param mixed $offset the offset to retrieve element.
+ * @param mixed $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)
@@ -939,7 +939,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* This method is required by the SPL interface `ArrayAccess`.
* It is implicitly called when you use something like `$model[$offset] = $item;`.
* @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)
{
diff --git a/framework/base/Module.php b/framework/base/Module.php
index 365809d1af..d5153b4b82 100644
--- a/framework/base/Module.php
+++ b/framework/base/Module.php
@@ -89,10 +89,10 @@ class Module extends ServiceLocator
public $controllerNamespace;
/**
* @return string the default route of this module. Defaults to 'default'.
- * The route may consist of child module ID, controller ID, and/or action ID.
- * For example, `help`, `post/create`, `admin/post/create`.
- * If action ID is not given, it will take the default value as specified in
- * [[Controller::defaultAction]].
+ * The route may consist of child module ID, controller ID, and/or action ID.
+ * For example, `help`, `post/create`, `admin/post/create`.
+ * If action ID is not given, it will take the default value as specified in
+ * [[Controller::defaultAction]].
*/
public $defaultRoute = 'default';
/**
@@ -115,9 +115,9 @@ class Module extends ServiceLocator
/**
* Constructor.
- * @param string $id the ID of this module
+ * @param string $id the ID of this module
* @param Module $parent the parent module (if any)
- * @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, $parent = null, $config = [])
{
@@ -173,7 +173,7 @@ class Module extends ServiceLocator
/**
* Sets the root directory of the module.
* This method can only be invoked at the beginning of the constructor.
- * @param string $path the root directory of the module. This can be either a directory name or a path alias.
+ * @param string $path the root directory of the module. This can be either a directory name or a path alias.
* @throws InvalidParamException if the directory does not exist.
*/
public function setBasePath($path)
@@ -191,7 +191,7 @@ class Module extends ServiceLocator
* Returns the directory that contains the controller classes according to [[controllerNamespace]].
* Note that in order for this method to return a value, you must define
* an alias for the root namespace of [[controllerNamespace]].
- * @return string the directory that contains the controller classes.
+ * @return string the directory that contains the controller classes.
* @throws InvalidParamException if there is no alias defined for the root namespace of [[controllerNamespace]].
*/
public function getControllerPath()
@@ -214,7 +214,7 @@ class Module extends ServiceLocator
/**
* Sets the directory that contains the view files.
- * @param string $path the root directory of view files.
+ * @param string $path the root directory of view files.
* @throws InvalidParamException if the directory is invalid
*/
public function setViewPath($path)
@@ -237,7 +237,7 @@ class Module extends ServiceLocator
/**
* Sets the directory that contains the layout files.
- * @param string $path the root directory of layout files.
+ * @param string $path the root directory of layout files.
* @throws InvalidParamException if the directory is invalid
*/
public function setLayoutPath($path)
@@ -253,8 +253,8 @@ class Module extends ServiceLocator
* (must start with '@') and the array values are the corresponding paths or aliases.
* See [[setAliases()]] for an example.
* @param array $aliases list of path aliases to be defined. The array keys are alias names
- * (must start with '@') and the array values are the corresponding paths or aliases.
- * For example,
+ * (must start with '@') and the array values are the corresponding paths or aliases.
+ * For example,
*
* ~~~
* [
@@ -273,9 +273,9 @@ class Module extends ServiceLocator
/**
* Checks whether the child module of the specified ID exists.
* This method supports checking the existence of both child and grand child modules.
- * @param string $id module ID. For grand child modules, use ID path relative to this module (e.g. `admin/content`).
+ * @param string $id module ID. For grand child modules, use ID path relative to this module (e.g. `admin/content`).
* @return boolean whether the named module exists. Both loaded and unloaded modules
- * are considered.
+ * are considered.
*/
public function hasModule($id)
{
@@ -292,9 +292,9 @@ class Module extends ServiceLocator
/**
* Retrieves the child module of the specified ID.
* This method supports retrieving both child modules and grand child modules.
- * @param string $id module ID (case-sensitive). To retrieve grand child modules,
- * use ID path relative to this module (e.g. `admin/content`).
- * @param boolean $load whether to load the module if it is not yet loaded.
+ * @param string $id module ID (case-sensitive). To retrieve grand child modules,
+ * use ID path relative to this module (e.g. `admin/content`).
+ * @param boolean $load whether to load the module if it is not yet loaded.
* @return Module|null the module instance, null if the module does not exist.
* @see hasModule()
*/
@@ -325,9 +325,9 @@ class Module extends ServiceLocator
/**
* Adds a sub-module to this module.
- * @param string $id module ID
+ * @param string $id module ID
* @param Module|array|null $module the sub-module to be added to this module. This can
- * be one of the followings:
+ * be one of the followings:
*
* - a [[Module]] object
* - a configuration array: when [[getModule()]] is called initially, the array
@@ -345,10 +345,10 @@ class Module extends ServiceLocator
/**
* Returns the sub-modules in this module.
- * @param boolean $loadedOnly whether to return the loaded sub-modules only. If this is set false,
- * then all sub-modules registered in this module will be returned, whether they are loaded or not.
- * Loaded modules will be returned as objects, while unloaded modules as configuration arrays.
- * @return array the modules (indexed by their IDs)
+ * @param boolean $loadedOnly whether to return the loaded sub-modules only. If this is set false,
+ * then all sub-modules registered in this module will be returned, whether they are loaded or not.
+ * Loaded modules will be returned as objects, while unloaded modules as configuration arrays.
+ * @return array the modules (indexed by their IDs)
*/
public function getModules($loadedOnly = false)
{
@@ -419,9 +419,9 @@ class Module extends ServiceLocator
* 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 mixed the result of the action.
+ * @param string $route the route that specifies the action.
+ * @param array $params the parameters to be passed to the action
+ * @return mixed the result of the action.
* @throws InvalidRouteException if the requested route cannot be resolved into an action successfully
*/
public function runAction($route, $params = [])
@@ -459,9 +459,9 @@ class Module extends ServiceLocator
* If any of the above steps resolves into a controller, it is returned together with the rest
* part of the route which will be treated as the action ID. Otherwise, false will be returned.
*
- * @param string $route the route consisting of module, controller and action IDs.
- * @return array|boolean If the controller is created successfully, it will be returned together
- * with the requested action ID. Otherwise false will be returned.
+ * @param string $route the route consisting of module, controller and action IDs.
+ * @return array|boolean If the controller is created successfully, it will be returned together
+ * with the requested action ID. Otherwise false will be returned.
* @throws InvalidConfigException if the controller class and its file do not match.
*/
public function createController($route)
@@ -516,10 +516,10 @@ class Module extends ServiceLocator
*
* Note that this method does not check [[modules]] or [[controllerMap]].
*
- * @param string $id the controller ID
- * @return Controller the newly created controller instance, or null if the controller ID is invalid.
+ * @param string $id the controller ID
+ * @return Controller the newly created controller instance, or null if the controller ID is invalid.
* @throws InvalidConfigException if the controller class and its file name do not match.
- * This exception is only thrown when in debug mode.
+ * This exception is only thrown when in debug mode.
*/
public function createControllerByID($id)
{
@@ -555,7 +555,7 @@ class Module extends ServiceLocator
* This method is invoked right before an action of this module is to be executed (after all possible filters.)
* You may override this method to do last-minute preparation for the action.
* Make sure you call the parent implementation so that the relevant event is triggered.
- * @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)
@@ -568,9 +568,9 @@ class Module extends ServiceLocator
* You may override this method to do some postprocessing for the action.
* Make sure you call the parent implementation so that the relevant event is triggered.
* 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)
{
diff --git a/framework/base/Object.php b/framework/base/Object.php
index f6bfb4c18f..b8f6247208 100644
--- a/framework/base/Object.php
+++ b/framework/base/Object.php
@@ -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)
diff --git a/framework/base/Request.php b/framework/base/Request.php
index 8f8531daba..4166e86317 100644
--- a/framework/base/Request.php
+++ b/framework/base/Request.php
@@ -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)
diff --git a/framework/base/Theme.php b/framework/base/Theme.php
index cfa355d07b..deb706842b 100644
--- a/framework/base/Theme.php
+++ b/framework/base/Theme.php
@@ -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.
diff --git a/framework/base/View.php b/framework/base/View.php
index e0015314f7..c52da26951 100644
--- a/framework/base/View.php
+++ b/framework/base/View.php
@@ -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
* 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 = [])
{
diff --git a/framework/base/ViewContextInterface.php b/framework/base/ViewContextInterface.php
index 12cf348fdf..04561cc522 100644
--- a/framework/base/ViewContextInterface.php
+++ b/framework/base/ViewContextInterface.php
@@ -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);
diff --git a/framework/base/ViewRenderer.php b/framework/base/ViewRenderer.php
index 1ce152e52f..dcee8022ad 100644
--- a/framework/base/ViewRenderer.php
+++ b/framework/base/ViewRenderer.php
@@ -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);
diff --git a/framework/base/Widget.php b/framework/base/Widget.php
index 7effec161c..b93af8e9c3 100644
--- a/framework/base/Widget.php
+++ b/framework/base/Widget.php
@@ -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)
diff --git a/framework/behaviors/AttributeBehavior.php b/framework/behaviors/AttributeBehavior.php
index eaf2320031..1f1cd97968 100644
--- a/framework/behaviors/AttributeBehavior.php
+++ b/framework/behaviors/AttributeBehavior.php
@@ -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)
diff --git a/framework/behaviors/BlameableBehavior.php b/framework/behaviors/BlameableBehavior.php
index 8584d9d4c1..87aab3759b 100644
--- a/framework/behaviors/BlameableBehavior.php
+++ b/framework/behaviors/BlameableBehavior.php
@@ -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)
diff --git a/framework/caching/ApcCache.php b/framework/caching/ApcCache.php
index 5efe1656ca..e9b7f0308f 100644
--- a/framework/caching/ApcCache.php
+++ b/framework/caching/ApcCache.php
@@ -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)
diff --git a/framework/caching/Cache.php b/framework/caching/Cache.php
index e24305e7a2..8be2b9dd10 100644
--- a/framework/caching/Cache.php
+++ b/framework/caching/Cache.php
@@ -90,7 +90,7 @@ abstract class Cache extends Component implements \ArrayAccess
* then the key will be returned back prefixed with [[keyPrefix]]. Otherwise, a normalized key
* is generated by serializing the given key, applying MD5 hashing, and prefixing with [[keyPrefix]].
*
- * @param mixed $key the key to be normalized
+ * @param mixed $key the key to be normalized
* @return string the generated cache key
*/
protected function buildKey($key)
@@ -106,10 +106,10 @@ abstract class Cache extends Component implements \ArrayAccess
/**
* Retrieves a value from cache with a specified 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.
+ * @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 mixed the value stored in cache, false if the value is not in the cache, expired,
- * or the dependency associated with the cached data has changed.
+ * or the dependency associated with the cached data has changed.
*/
public function get($key)
{
@@ -137,8 +137,8 @@ abstract class Cache extends Component implements \ArrayAccess
* 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)
@@ -154,10 +154,10 @@ abstract class Cache extends Component implements \ArrayAccess
* Some caches (such as memcache, apc) allow retrieving multiple cached values at the same time,
* which may improve the performance. In case a cache does not support this feature natively,
* this method will try to simulate it.
- * @param array $keys list of keys identifying the cached values
+ * @param array $keys list of keys identifying the cached values
* @return array list of cached values corresponding to the specified keys. The array
- * is returned in terms of (key, value) pairs.
- * If a value is not cached or expired, the corresponding array value will be false.
+ * is returned in terms of (key, value) pairs.
+ * If a value is not cached or expired, the corresponding array value will be false.
*/
public function mget($keys)
{
@@ -191,14 +191,14 @@ abstract class Cache extends Component implements \ArrayAccess
* If the cache already contains such a key, the existing value and
* expiration time will be replaced with the new ones, respectively.
*
- * @param mixed $key a key identifying the value to be cached. This can be a simple string or
- * a complex data structure consisting of factors representing the key.
- * @param mixed $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 Dependency $dependency dependency of the cached item. If the dependency changes,
- * the corresponding value in the cache will be invalidated when it is fetched via [[get()]].
- * This parameter is ignored if [[serializer]] is false.
- * @return boolean whether the value is successfully stored into cache
+ * @param mixed $key a key identifying the value to be cached. This can be a simple string or
+ * a complex data structure consisting of factors representing the key.
+ * @param mixed $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 Dependency $dependency dependency of the cached item. If the dependency changes,
+ * the corresponding value in the cache will be invalidated when it is fetched via [[get()]].
+ * This parameter is ignored if [[serializer]] is false.
+ * @return boolean whether the value is successfully stored into cache
*/
public function set($key, $value, $duration = 0, $dependency = null)
{
@@ -220,12 +220,12 @@ abstract class Cache extends Component implements \ArrayAccess
* If the cache already contains such a key, the existing value and
* expiration time will be replaced with the new ones, respectively.
*
- * @param array $items the items to be cached, as key-value pairs.
- * @param integer $duration default number of seconds in which the cached values will expire. 0 means never expire.
- * @param Dependency $dependency dependency of the cached items. If the dependency changes,
- * the corresponding values in the cache will be invalidated when it is fetched via [[get()]].
- * This parameter is ignored if [[serializer]] is false.
- * @return boolean whether the items are successfully stored into cache
+ * @param array $items the items to be cached, as key-value pairs.
+ * @param integer $duration default number of seconds in which the cached values will expire. 0 means never expire.
+ * @param Dependency $dependency dependency of the cached items. If the dependency changes,
+ * the corresponding values in the cache will be invalidated when it is fetched via [[get()]].
+ * This parameter is ignored if [[serializer]] is false.
+ * @return boolean whether the items are successfully stored into cache
*/
public function mset($items, $duration = 0, $dependency = null)
{
@@ -252,12 +252,12 @@ abstract class Cache extends Component implements \ArrayAccess
* Stores multiple items in cache. Each item contains a value identified by a key.
* If the cache already contains such a key, the existing value and expiration time will be preserved.
*
- * @param array $items the items to be cached, as key-value pairs.
- * @param integer $duration default number of seconds in which the cached values will expire. 0 means never expire.
- * @param Dependency $dependency dependency of the cached items. If the dependency changes,
- * the corresponding values in the cache will be invalidated when it is fetched via [[get()]].
- * This parameter is ignored if [[serializer]] is false.
- * @return boolean whether the items are successfully stored into cache
+ * @param array $items the items to be cached, as key-value pairs.
+ * @param integer $duration default number of seconds in which the cached values will expire. 0 means never expire.
+ * @param Dependency $dependency dependency of the cached items. If the dependency changes,
+ * the corresponding values in the cache will be invalidated when it is fetched via [[get()]].
+ * This parameter is ignored if [[serializer]] is false.
+ * @return boolean whether the items are successfully stored into cache
*/
public function madd($items, $duration = 0, $dependency = null)
{
@@ -283,14 +283,14 @@ abstract class Cache extends Component implements \ArrayAccess
/**
* Stores a value identified by a key into cache if the cache does not contain this key.
* Nothing will be done if the cache already contains the key.
- * @param mixed $key a key identifying the value to be cached. This can be a simple string or
- * a complex data structure consisting of factors representing the key.
- * @param mixed $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 Dependency $dependency dependency of the cached item. If the dependency changes,
- * the corresponding value in the cache will be invalidated when it is fetched via [[get()]].
- * This parameter is ignored if [[serializer]] is false.
- * @return boolean whether the value is successfully stored into cache
+ * @param mixed $key a key identifying the value to be cached. This can be a simple string or
+ * a complex data structure consisting of factors representing the key.
+ * @param mixed $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 Dependency $dependency dependency of the cached item. If the dependency changes,
+ * the corresponding value in the cache will be invalidated when it is fetched via [[get()]].
+ * This parameter is ignored if [[serializer]] is false.
+ * @return boolean whether the value is successfully stored into cache
*/
public function add($key, $value, $duration = 0, $dependency = null)
{
@@ -309,8 +309,8 @@ abstract class Cache extends Component implements \ArrayAccess
/**
* Deletes a value with the specified key from cache
- * @param mixed $key a key identifying the value to be deleted from cache. This can be a simple string or
- * a complex data structure consisting of factors representing the key.
+ * @param mixed $key a key identifying the value to be deleted from cache. This can be a simple string or
+ * a complex data structure consisting of factors representing the key.
* @return boolean if no error happens during deletion
*/
public function delete($key)
@@ -334,7 +334,7 @@ abstract class Cache extends Component implements \ArrayAccess
* Retrieves a value from cache with a specified key.
* This method should be implemented by child classes to retrieve the data
* from specific cache storage.
- * @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.
*/
abstract protected function getValue($key);
@@ -343,9 +343,9 @@ abstract class Cache extends Component implements \ArrayAccess
* Stores a value identified by a key in cache.
* This method should be implemented by child classes to store the data
* in specific cache storage.
- * @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
*/
abstract protected function setValue($key, $value, $duration);
@@ -354,9 +354,9 @@ abstract class Cache extends Component implements \ArrayAccess
* Stores a value identified by a key into cache if the cache does not contain this key.
* This method should be implemented by child classes to store the data
* in specific cache storage.
- * @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
*/
abstract protected function addValue($key, $value, $duration);
@@ -364,7 +364,7 @@ abstract class Cache extends Component implements \ArrayAccess
/**
* Deletes a value with the specified key from cache
* This method should be implemented by child classes to delete the data from actual cache storage.
- * @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
*/
abstract protected function deleteValue($key);
@@ -381,7 +381,7 @@ abstract class Cache extends Component implements \ArrayAccess
* The default implementation calls [[getValue()]] multiple times to retrieve
* the cached values one by one. If the underlying cache storage supports multiget,
* this method should be overridden to exploit that feature.
- * @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)
@@ -398,9 +398,9 @@ abstract class Cache extends Component implements \ArrayAccess
* Stores multiple key-value pairs in cache.
* The default implementation calls [[setValue()]] multiple times store values one by one. If the underlying cache
* storage supports multi-set, 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 setValues($data, $duration)
{
@@ -418,9 +418,9 @@ abstract class Cache extends Component implements \ArrayAccess
* 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 multi-add, 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)
{
@@ -437,7 +437,7 @@ abstract class Cache extends Component implements \ArrayAccess
/**
* Returns whether there is a cache entry with a specified key.
* This method is required by the interface ArrayAccess.
- * @param string $key a key identifying the cached value
+ * @param string $key a key identifying the cached value
* @return boolean
*/
public function offsetExists($key)
@@ -448,8 +448,8 @@ abstract class Cache extends Component implements \ArrayAccess
/**
* Retrieves the value from cache with a specified key.
* This method is required by the interface ArrayAccess.
- * @param string $key a key identifying the cached value
- * @return mixed the value stored in cache, false if the value is not in the cache or expired.
+ * @param string $key a key identifying the cached value
+ * @return mixed the value stored in cache, false if the value is not in the cache or expired.
*/
public function offsetGet($key)
{
@@ -461,8 +461,8 @@ abstract class Cache extends Component implements \ArrayAccess
* If the cache already contains such a key, the existing value will be
* replaced with the new ones. To add expiration and dependencies, use the [[set()]] method.
* This method is required by the interface ArrayAccess.
- * @param string $key the key identifying the value to be cached
- * @param mixed $value the value to be cached
+ * @param string $key the key identifying the value to be cached
+ * @param mixed $value the value to be cached
*/
public function offsetSet($key, $value)
{
diff --git a/framework/caching/ChainedDependency.php b/framework/caching/ChainedDependency.php
index 46e014e0ac..7f238d020d 100644
--- a/framework/caching/ChainedDependency.php
+++ b/framework/caching/ChainedDependency.php
@@ -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)
diff --git a/framework/caching/DbCache.php b/framework/caching/DbCache.php
index 9a4500a961..723e6a0336 100644
--- a/framework/caching/DbCache.php
+++ b/framework/caching/DbCache.php
@@ -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)
{
diff --git a/framework/caching/DbDependency.php b/framework/caching/DbDependency.php
index 7b23f13b24..28fa6fd73c 100644
--- a/framework/caching/DbDependency.php
+++ b/framework/caching/DbDependency.php
@@ -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)
diff --git a/framework/caching/Dependency.php b/framework/caching/Dependency.php
index 9946955d31..b1ee407404 100644
--- a/framework/caching/Dependency.php
+++ b/framework/caching/Dependency.php
@@ -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);
diff --git a/framework/caching/DummyCache.php b/framework/caching/DummyCache.php
index 7f2f4da9c2..82bfac3491 100644
--- a/framework/caching/DummyCache.php
+++ b/framework/caching/DummyCache.php
@@ -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)
diff --git a/framework/caching/ExpressionDependency.php b/framework/caching/ExpressionDependency.php
index e886483bc2..da45c00e5a 100644
--- a/framework/caching/ExpressionDependency.php
+++ b/framework/caching/ExpressionDependency.php
@@ -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)
diff --git a/framework/caching/FileCache.php b/framework/caching/FileCache.php
index d0ff716787..eacf8c402c 100644
--- a/framework/caching/FileCache.php
+++ b/framework/caching/FileCache.php
@@ -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)
{
diff --git a/framework/caching/FileDependency.php b/framework/caching/FileDependency.php
index bd48e0a04a..477b6cbfb3 100644
--- a/framework/caching/FileDependency.php
+++ b/framework/caching/FileDependency.php
@@ -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)
diff --git a/framework/caching/GroupDependency.php b/framework/caching/GroupDependency.php
index 5129ac18cc..33c9fb132c 100644
--- a/framework/caching/GroupDependency.php
+++ b/framework/caching/GroupDependency.php
@@ -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)
diff --git a/framework/caching/MemCache.php b/framework/caching/MemCache.php
index b341699b87..8dd57554a0 100644
--- a/framework/caching/MemCache.php
+++ b/framework/caching/MemCache.php
@@ -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)
diff --git a/framework/caching/WinCache.php b/framework/caching/WinCache.php
index 516590beed..481d661f90 100644
--- a/framework/caching/WinCache.php
+++ b/framework/caching/WinCache.php
@@ -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)
diff --git a/framework/caching/XCache.php b/framework/caching/XCache.php
index fd8debba06..97cd0a92d0 100644
--- a/framework/caching/XCache.php
+++ b/framework/caching/XCache.php
@@ -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)
diff --git a/framework/caching/ZendDataCache.php b/framework/caching/ZendDataCache.php
index 0f4bb341e5..ed799eaeee 100644
--- a/framework/caching/ZendDataCache.php
+++ b/framework/caching/ZendDataCache.php
@@ -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)
diff --git a/framework/captcha/Captcha.php b/framework/captcha/Captcha.php
index 6f2a440db6..2c46d5bd7d 100644
--- a/framework/captcha/Captcha.php
+++ b/framework/captcha/Captcha.php
@@ -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()
diff --git a/framework/captcha/CaptchaAction.php b/framework/captcha/CaptchaAction.php
index ba2255371e..588c290a04 100644
--- a/framework/captcha/CaptchaAction.php
+++ b/framework/captcha/CaptchaAction.php
@@ -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)
diff --git a/framework/console/Application.php b/framework/console/Application.php
index c015d94617..d6f3e8c62b 100644
--- a/framework/console/Application.php
+++ b/framework/console/Application.php
@@ -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 = [])
diff --git a/framework/console/Controller.php b/framework/console/Controller.php
index e3c82dba66..aa54a62094 100644
--- a/framework/console/Controller.php
+++ b/framework/console/Controller.php
@@ -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)
{
diff --git a/framework/console/controllers/AssetController.php b/framework/console/controllers/AssetController.php
index 6f71365d1d..e44dee9c8f 100644
--- a/framework/console/controllers/AssetController.php
+++ b/framework/console/controllers/AssetController.php
@@ -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)
diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php
index 4a21054b17..f727bbd3a4 100644
--- a/framework/console/controllers/FixtureController.php
+++ b/framework/console/controllers/FixtureController.php
@@ -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)
diff --git a/framework/console/controllers/HelpController.php b/framework/console/controllers/HelpController.php
index 694113c864..b6990a5b57 100644
--- a/framework/console/controllers/HelpController.php
+++ b/framework/console/controllers/HelpController.php
@@ -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)
{
diff --git a/framework/console/controllers/MessageController.php b/framework/console/controllers/MessageController.php
index aeb828af5d..ff448c22ea 100644
--- a/framework/console/controllers/MessageController.php
+++ b/framework/console/controllers/MessageController.php
@@ -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)
{
diff --git a/framework/console/controllers/MigrateController.php b/framework/console/controllers/MigrateController.php
index 0392ea8510..4ed14351bb 100644
--- a/framework/console/controllers/MigrateController.php
+++ b/framework/console/controllers/MigrateController.php
@@ -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)
{
diff --git a/framework/data/ArrayDataProvider.php b/framework/data/ArrayDataProvider.php
index 4ec2d11704..bc5a5bc2fb 100644
--- a/framework/data/ArrayDataProvider.php
+++ b/framework/data/ArrayDataProvider.php
@@ -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)
diff --git a/framework/data/BaseDataProvider.php b/framework/data/BaseDataProvider.php
index 6c9c395322..b3fbb905b4 100644
--- a/framework/data/BaseDataProvider.php
+++ b/framework/data/BaseDataProvider.php
@@ -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'
diff --git a/framework/data/DataProviderInterface.php b/framework/data/DataProviderInterface.php
index 400bba0509..b17202668a 100644
--- a/framework/data/DataProviderInterface.php
+++ b/framework/data/DataProviderInterface.php
@@ -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();
diff --git a/framework/data/Pagination.php b/framework/data/Pagination.php
index 5bbb5159c4..db18c30aca 100644
--- a/framework/data/Pagination.php
+++ b/framework/data/Pagination.php
@@ -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)
diff --git a/framework/data/Sort.php b/framework/data/Sort.php
index dec5dedb98..e244ca168f 100644
--- a/framework/data/Sort.php
+++ b/framework/data/Sort.php
@@ -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)
diff --git a/framework/db/ActiveQuery.php b/framework/db/ActiveQuery.php
index 3c53e6d192..137777c38d 100644
--- a/framework/db/ActiveQuery.php
+++ b/framework/db/ActiveQuery.php
@@ -93,8 +93,8 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns all results as an array.
- * @param Connection $db the DB connection used to create the DB command.
- * If null, the DB connection returned by [[modelClass]] will be used.
+ * @param Connection $db the DB connection used to create the DB command.
+ * If null, the DB connection returned by [[modelClass]] will be used.
* @return array|ActiveRecord[] the query results. If the query results in nothing, an empty array will be returned.
*/
public function all($db = null)
@@ -130,7 +130,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Removes duplicated models by checking their primary key values.
* This method is mainly called when a join query is performed, which may cause duplicated rows being returned.
- * @param array $models the models to be checked
+ * @param array $models the models to be checked
* @return array the distinctive models
*/
private function removeDuplicatedModels($models)
@@ -170,11 +170,11 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Executes query and returns a single row of result.
- * @param Connection $db the DB connection used to create the DB command.
- * If null, the DB connection returned by [[modelClass]] will be used.
+ * @param Connection $db the DB connection used to create the DB command.
+ * If null, the DB connection returned by [[modelClass]] will be used.
* @return ActiveRecord|array|null a single row of query result. Depending on the setting of [[asArray]],
- * the query result may be either an array or an ActiveRecord object. Null will be returned
- * if the query results in nothing.
+ * the query result may be either an array or an ActiveRecord object. Null will be returned
+ * if the query results in nothing.
*/
public function one($db = null)
{
@@ -206,9 +206,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Creates a DB command that can be used to execute this query.
- * @param Connection $db the DB connection used to create the DB command.
- * If null, the DB connection returned by [[modelClass]] will be used.
- * @return Command the created DB command instance.
+ * @param Connection $db the DB connection used to create the DB command.
+ * If null, the DB connection returned by [[modelClass]] will be used.
+ * @return Command the created DB command instance.
*/
public function createCommand($db = null)
{
@@ -232,9 +232,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Creates a DB command that can be used to execute this query.
- * @param Connection $db the DB connection used to create the DB command.
- * If null, the DB connection returned by [[modelClass]] will be used.
- * @return Command the created DB command instance.
+ * @param Connection $db the DB connection used to create the DB command.
+ * If null, the DB connection returned by [[modelClass]] will be used.
+ * @return Command the created DB command instance.
*/
protected function createCommandInternal($db)
{
@@ -260,8 +260,8 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Creates a command for lazy loading of a relation.
- * @param Connection $db the DB connection used to create the DB command.
- * @return Command the created DB command instance.
+ * @param Connection $db the DB connection used to create the DB command.
+ * @return Command the created DB command instance.
*/
private function createRelationalCommand($db = null)
{
@@ -315,10 +315,10 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* for the primary table. And when `$eagerLoading` is true, it will call [[with()]] in addition with the specified relations.
*
* @param array $with the relations to be joined. Each array element represents a single relation.
- * The array keys are relation names, and the array values are the corresponding anonymous functions that
- * can be used to modify the relation queries on-the-fly. If a relation query does not need modification,
- * you may use the relation name as the array value. Sub-relations can also be specified (see [[with()]]).
- * For example,
+ * The array keys are relation names, and the array values are the corresponding anonymous functions that
+ * can be used to modify the relation queries on-the-fly. If a relation query does not need modification,
+ * you may use the relation name as the array value. Sub-relations can also be specified (see [[with()]]).
+ * For example,
*
* ```php
* // find all orders that contain books, and eager loading "books"
@@ -331,13 +331,13 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* ])->all();
* ```
*
- * @param boolean|array $eagerLoading whether to eager load the relations specified in `$with`.
- * When this is a boolean, it applies to all relations specified in `$with`. Use an array
- * to explicitly list which relations in `$with` need to be eagerly loaded.
- * @param string|array $joinType the join type of the relations specified in `$with`.
- * When this is a string, it applies to all relations specified in `$with`. Use an array
- * in the format of `relationName => joinType` to specify different join types for different relations.
- * @return static the query object itself
+ * @param boolean|array $eagerLoading whether to eager load the relations specified in `$with`.
+ * When this is a boolean, it applies to all relations specified in `$with`. Use an array
+ * to explicitly list which relations in `$with` need to be eagerly loaded.
+ * @param string|array $joinType the join type of the relations specified in `$with`.
+ * When this is a string, it applies to all relations specified in `$with`. Use an array
+ * in the format of `relationName => joinType` to specify different join types for different relations.
+ * @return static the query object itself
*/
public function joinWith($with, $eagerLoading = true, $joinType = 'LEFT JOIN')
{
@@ -374,9 +374,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* Inner joins with the specified relations.
* This is a shortcut method to [[joinWith()]] with the join type set as "INNER JOIN".
* Please refer to [[joinWith()]] for detailed usage of this method.
- * @param array $with the relations to be joined with
- * @param boolean|array $eagerLoading whether to eager loading the relations
- * @return static the query object itself
+ * @param array $with the relations to be joined with
+ * @param boolean|array $eagerLoading whether to eager loading the relations
+ * @return static the query object itself
* @see joinWith()
*/
public function innerJoinWith($with, $eagerLoading = true)
@@ -386,8 +386,8 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Modifies the current query by adding join fragments based on the given relations.
- * @param ActiveRecord $model the primary model
- * @param array $with the relations to be joined
+ * @param ActiveRecord $model the primary model
+ * @param array $with the relations to be joined
* @param string|array $joinType the join type
*/
private function joinWithRelations($model, $with, $joinType)
@@ -432,9 +432,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Returns the join type based on the given join type parameter and the relation name.
- * @param string|array $joinType the given join type(s)
- * @param string $name relation name
- * @return string the real join type
+ * @param string|array $joinType the given join type(s)
+ * @param string $name relation name
+ * @return string the real join type
*/
private function getJoinType($joinType, $name)
{
@@ -447,8 +447,8 @@ class ActiveQuery extends Query implements ActiveQueryInterface
/**
* Returns the table name and the table alias for [[modelClass]].
- * @param ActiveQuery $query
- * @return array the table name and the table alias.
+ * @param ActiveQuery $query
+ * @return array the table name and the table alias.
*/
private function getQueryTableName($query)
{
@@ -481,7 +481,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* The current query object will be modified accordingly.
* @param ActiveQuery $parent
* @param ActiveQuery $child
- * @param string $joinType
+ * @param string $joinType
*/
private function joinWithRelation($parent, $child, $joinType)
{
@@ -567,9 +567,9 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* }
* ```
*
- * @param string|array $condition the ON condition. Please refer to [[Query::where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return static the query object itself
+ * @param string|array $condition the ON condition. Please refer to [[Query::where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return static the query object itself
*/
public function onCondition($condition, $params = [])
{
@@ -592,12 +592,12 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* }
* ```
*
- * @param string $tableName the name of the pivot table.
- * @param array $link the link between the pivot table and the table associated with [[primaryModel]].
- * The keys of the array represent the columns in the pivot table, and the values represent the columns
- * in the [[primaryModel]] table.
- * @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.
+ * @param string $tableName the name of the pivot table.
+ * @param array $link the link between the pivot table and the table associated with [[primaryModel]].
+ * The keys of the array represent the columns in the pivot table, and the values represent the columns
+ * in the [[primaryModel]] table.
+ * @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
* @see via()
*/
diff --git a/framework/db/ActiveQueryInterface.php b/framework/db/ActiveQueryInterface.php
index 7d3e7f19bf..b6434d9b98 100644
--- a/framework/db/ActiveQueryInterface.php
+++ b/framework/db/ActiveQueryInterface.php
@@ -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);
}
diff --git a/framework/db/ActiveQueryTrait.php b/framework/db/ActiveQueryTrait.php
index dd3a454361..5daa6a5cf8 100644
--- a/framework/db/ActiveQueryTrait.php
+++ b/framework/db/ActiveQueryTrait.php
@@ -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)
diff --git a/framework/db/ActiveRecord.php b/framework/db/ActiveRecord.php
index 22ad0efa7b..6534dd6ac2 100644
--- a/framework/db/ActiveRecord.php
+++ b/framework/db/ActiveRecord.php
@@ -134,8 +134,8 @@ class ActiveRecord extends BaseActiveRecord
* $customers = Customer::findBySql('SELECT * FROM tbl_customer')->all();
* ~~~
*
- * @param string $sql the SQL statement to be executed
- * @param array $params parameters to be bound to the SQL statement during execution.
+ * @param string $sql the SQL statement to be executed
+ * @param array $params parameters to be bound to the SQL statement during execution.
* @return ActiveQuery the newly created [[ActiveQuery]] instance
*/
public static function findBySql($sql, $params = [])
@@ -154,11 +154,11 @@ class ActiveRecord extends BaseActiveRecord
* Customer::updateAll(['status' => 1], 'status = 2');
* ~~~
*
- * @param array $attributes attribute values (name-value pairs) to be saved into the table
- * @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
- * Please refer to [[Query::where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return integer the number of rows updated
+ * @param array $attributes attribute values (name-value pairs) to be saved into the table
+ * @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
+ * Please refer to [[Query::where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return integer the number of rows updated
*/
public static function updateAll($attributes, $condition = '', $params = [])
{
@@ -176,13 +176,13 @@ class ActiveRecord extends BaseActiveRecord
* Customer::updateAllCounters(['age' => 1]);
* ~~~
*
- * @param array $counters the counters to be updated (attribute name => increment value).
- * Use negative values if you want to decrement the counters.
- * @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
- * Please refer to [[Query::where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * Do not name the parameters as `:bp0`, `:bp1`, etc., because they are used internally by this method.
- * @return integer the number of rows updated
+ * @param array $counters the counters to be updated (attribute name => increment value).
+ * Use negative values if you want to decrement the counters.
+ * @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
+ * Please refer to [[Query::where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * Do not name the parameters as `:bp0`, `:bp1`, etc., because they are used internally by this method.
+ * @return integer the number of rows updated
*/
public static function updateAllCounters($counters, $condition = '', $params = [])
{
@@ -207,10 +207,10 @@ class ActiveRecord extends BaseActiveRecord
* Customer::deleteAll('status = 3');
* ~~~
*
- * @param string|array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
- * Please refer to [[Query::where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return integer the number of rows deleted
+ * @param string|array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
+ * Please refer to [[Query::where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return integer the number of rows deleted
*/
public static function deleteAll($condition = '', $params = [])
{
@@ -240,7 +240,7 @@ class ActiveRecord extends BaseActiveRecord
* Note that all queries should use [[Query::andWhere()]] and [[Query::orWhere()]] to keep the
* default condition. Using [[Query::where()]] will override the default condition.
*
- * @param array $config the configuration passed to the ActiveQuery class.
+ * @param array $config the configuration passed to the ActiveQuery class.
* @return ActiveQuery the newly created [[ActiveQuery]] instance.
*/
public static function createQuery($config = [])
@@ -265,7 +265,7 @@ class ActiveRecord extends BaseActiveRecord
/**
* Returns the schema information of the DB table associated with this AR class.
- * @return TableSchema the schema information of the DB table associated with this AR class.
+ * @return TableSchema the schema information of the DB table associated with this AR class.
* @throws InvalidConfigException if the table for the AR class does not exist.
*/
public static function getTableSchema()
@@ -331,7 +331,7 @@ class ActiveRecord extends BaseActiveRecord
* in a transaction.
*
* @return array the declarations of transactional operations. The array keys are scenarios names,
- * and the array values are the corresponding transaction operations.
+ * and the array values are the corresponding transaction operations.
*/
public function transactions()
{
@@ -383,11 +383,11 @@ class ActiveRecord extends BaseActiveRecord
* $customer->insert();
* ~~~
*
- * @param boolean $runValidation whether to perform validation before saving the record.
- * If the validation fails, the record will not be inserted into the database.
- * @param array $attributes list of attributes that need to be saved. Defaults to null,
- * meaning all attributes that are loaded from DB will be saved.
- * @return boolean whether the attributes are valid and the record is inserted successfully.
+ * @param boolean $runValidation whether to perform validation before saving the record.
+ * If the validation fails, the record will not be inserted into the database.
+ * @param array $attributes list of attributes that need to be saved. Defaults to null,
+ * meaning all attributes that are loaded from DB will be saved.
+ * @return boolean whether the attributes are valid and the record is inserted successfully.
* @throws \Exception in case insert failed.
*/
public function insert($runValidation = true, $attributes = null)
@@ -419,8 +419,8 @@ class ActiveRecord extends BaseActiveRecord
/**
* Inserts an ActiveRecord into DB without considering transaction.
- * @param array $attributes list of attributes that need to be saved. Defaults to null,
- * meaning all attributes that are loaded from DB will be saved.
+ * @param array $attributes list of attributes that need to be saved. Defaults to null,
+ * meaning all attributes that are loaded from DB will be saved.
* @return boolean whether the record is inserted successfully.
*/
protected function insertInternal($attributes = null)
@@ -498,15 +498,15 @@ class ActiveRecord extends BaseActiveRecord
* }
* ~~~
*
- * @param boolean $runValidation whether to perform validation before saving the record.
- * If the validation fails, the record will not be inserted into the database.
- * @param array $attributes list of attributes that need to be saved. Defaults to null,
- * meaning all attributes that are loaded from DB will be saved.
- * @return integer|boolean the number of rows affected, or false if validation fails
- * or [[beforeSave()]] stops the updating process.
+ * @param boolean $runValidation whether to perform validation before saving the record.
+ * If the validation fails, the record will not be inserted into the database.
+ * @param array $attributes list of attributes that need to be saved. Defaults to null,
+ * meaning all attributes that are loaded from DB will be saved.
+ * @return integer|boolean the number of rows affected, or false if validation fails
+ * or [[beforeSave()]] stops the updating process.
* @throws StaleObjectException if [[optimisticLock|optimistic locking]] is enabled and the data
- * being updated is outdated.
- * @throws \Exception in case update failed.
+ * being updated is outdated.
+ * @throws \Exception in case update failed.
*/
public function update($runValidation = true, $attributes = null)
{
@@ -548,11 +548,11 @@ class ActiveRecord extends BaseActiveRecord
* In the above step 1 and 3, events named [[EVENT_BEFORE_DELETE]] and [[EVENT_AFTER_DELETE]]
* will be raised by the corresponding methods.
*
- * @return integer|boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason.
- * Note that it is possible the number of rows deleted is 0, even though the deletion execution is successful.
+ * @return integer|boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason.
+ * Note that it is possible the number of rows deleted is 0, even though the deletion execution is successful.
* @throws StaleObjectException if [[optimisticLock|optimistic locking]] is enabled and the data
- * being deleted is outdated.
- * @throws \Exception in case delete failed.
+ * being deleted is outdated.
+ * @throws \Exception in case delete failed.
*/
public function delete()
{
@@ -579,8 +579,8 @@ class ActiveRecord extends BaseActiveRecord
/**
* Deletes an ActiveRecord without considering transaction.
- * @return integer|boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason.
- * Note that it is possible the number of rows deleted is 0, even though the deletion execution is successful.
+ * @return integer|boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason.
+ * Note that it is possible the number of rows deleted is 0, even though the deletion execution is successful.
* @throws StaleObjectException
*/
protected function deleteInternal()
@@ -609,8 +609,8 @@ class ActiveRecord extends BaseActiveRecord
* Returns a value indicating whether the given active record is the same as the current one.
* The comparison is made by comparing the table names and the primary key values of the two active records.
* If one of the records [[isNewRecord|is new]] they are also considered not equal.
- * @param ActiveRecord $record record to compare to
- * @return boolean whether the two active records refer to the same row in the same database table.
+ * @param ActiveRecord $record record to compare to
+ * @return boolean whether the two active records refer to the same row in the same database table.
*/
public function equals($record)
{
@@ -623,7 +623,7 @@ class ActiveRecord extends BaseActiveRecord
/**
* Returns a value indicating whether the specified operation is transactional in the current [[scenario]].
- * @param integer $operation the operation to check. Possible values are [[OP_INSERT]], [[OP_UPDATE]] and [[OP_DELETE]].
+ * @param integer $operation the operation to check. Possible values are [[OP_INSERT]], [[OP_UPDATE]] and [[OP_DELETE]].
* @return boolean whether the specified operation is transactional in the current [[scenario]].
*/
public function isTransactional($operation)
diff --git a/framework/db/ActiveRecordInterface.php b/framework/db/ActiveRecordInterface.php
index 31b0e097ee..b2574b5cf5 100644
--- a/framework/db/ActiveRecordInterface.php
+++ b/framework/db/ActiveRecordInterface.php
@@ -37,35 +37,35 @@ interface ActiveRecordInterface
* Returns the named attribute value.
* If this record is the result of a query and the attribute is not loaded,
* null will be returned.
- * @param string $name the attribute name
- * @return mixed the attribute value. Null if the attribute is not set or does not exist.
+ * @param string $name the attribute name
+ * @return mixed the attribute value. Null if the attribute is not set or does not exist.
* @see hasAttribute()
*/
public function getAttribute($name);
/**
* Sets the named attribute value.
- * @param string $name the attribute name.
- * @param mixed $value the attribute value.
+ * @param string $name the attribute name.
+ * @param mixed $value the attribute value.
* @see hasAttribute()
*/
public function setAttribute($name, $value);
/**
* Returns a value indicating whether the record has an attribute with the specified name.
- * @param string $name the name of the attribute
+ * @param string $name the name of the attribute
* @return boolean whether the record has an attribute with the specified name.
*/
public function hasAttribute($name);
/**
* Returns the primary key value(s).
- * @param boolean $asArray whether to return the primary key value as an array. If true,
- * the return value will be an array with attribute names as keys and attribute values as values.
- * Note that for composite primary keys, an array will always be returned regardless of this parameter value.
- * @return mixed the primary key value. An array (attribute name => attribute value) is returned if the primary key
- * is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
- * the key value is null).
+ * @param boolean $asArray whether to return the primary key value as an array. If true,
+ * the return value will be an array with attribute names as keys and attribute values as values.
+ * Note that for composite primary keys, an array will always be returned regardless of this parameter value.
+ * @return mixed the primary key value. An array (attribute name => attribute value) is returned if the primary key
+ * is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
+ * the key value is null).
*/
public function getPrimaryKey($asArray = false);
@@ -74,21 +74,21 @@ interface ActiveRecordInterface
* This refers to the primary key value that is populated into the record
* after executing a find method (e.g. find(), findAll()).
* The value remains unchanged even if the primary key attribute is manually assigned with a different value.
- * @param boolean $asArray whether to return the primary key value as an array. If true,
- * the return value will be an array with column name as key and column value as value.
- * If this is false (default), a scalar value will be returned for non-composite primary key.
+ * @param boolean $asArray whether to return the primary key value as an array. If true,
+ * the return value will be an array with column name as key and column value as value.
+ * If this is false (default), a scalar value will be returned for non-composite primary key.
* @property mixed The old primary key value. An array (column name => column value) is
- * returned if the primary key is composite. A string is returned otherwise (null will be
- * returned if the key value is null).
- * @return mixed the old primary key value. An array (column name => column value) is returned if the primary key
- * is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
- * the key value is null).
+ * returned if the primary key is composite. A string is returned otherwise (null will be
+ * returned if the key value is null).
+ * @return mixed the old primary key value. An array (column name => column value) is returned if the primary key
+ * is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
+ * the key value is null).
*/
public function getOldPrimaryKey($asArray = false);
/**
* Returns a value indicating whether the given set of attributes represents the primary key for this model
- * @param array $keys the set of attributes to check
+ * @param array $keys the set of attributes to check
* @return boolean whether the given set of attributes represents the primary key for this model
*/
public static function isPrimaryKey($keys);
@@ -111,8 +111,8 @@ interface ActiveRecordInterface
* - null (not specified): return a new [[ActiveQuery]] object for further query purpose.
*
* @return ActiveQueryInterface|static|null When `$q` is null, a new [[ActiveQuery]] instance
- * is returned; when `$q` is a scalar or an array, an ActiveRecord object matching it will be
- * returned (null will be returned if there is no matching).
+ * is returned; when `$q` is a scalar or an array, an ActiveRecord object matching it will be
+ * returned (null will be returned if there is no matching).
*/
public static function find($q = null);
@@ -138,7 +138,7 @@ interface ActiveRecordInterface
* Note that all queries should use [[Query::andWhere()]] and [[Query::orWhere()]] to keep the
* default condition. Using [[Query::where()]] will override the default condition.
*
- * @param array $config the configuration passed to the ActiveQuery class.
+ * @param array $config the configuration passed to the ActiveQuery class.
* @return ActiveQueryInterface the newly created [[ActiveQueryInterface|ActiveQuery]] instance.
*/
public static function createQuery($config = []);
@@ -151,11 +151,11 @@ interface ActiveRecordInterface
* Customer::updateAll(['status' => 1], ['status' => '2']);
* ~~~
*
- * @param array $attributes attribute values (name-value pairs) to be saved for the record.
- * Unlike [[update()]] these are not going to be validated.
- * @param array $condition the condition that matches the records that should get updated.
- * Please refer to [[QueryInterface::where()]] on how to specify this parameter.
- * An empty condition will match all records.
+ * @param array $attributes attribute values (name-value pairs) to be saved for the record.
+ * Unlike [[update()]] these are not going to be validated.
+ * @param array $condition the condition that matches the records that should get updated.
+ * Please refer to [[QueryInterface::where()]] on how to specify this parameter.
+ * An empty condition will match all records.
* @return integer the number of rows updated
*/
public static function updateAll($attributes, $condition = null);
@@ -170,9 +170,9 @@ interface ActiveRecordInterface
* Customer::deleteAll([status = 3]);
* ~~~
*
- * @param array $condition the condition that matches the records that should get deleted.
- * Please refer to [[QueryInterface::where()]] on how to specify this parameter.
- * An empty condition will match all records.
+ * @param array $condition the condition that matches the records that should get deleted.
+ * Please refer to [[QueryInterface::where()]] on how to specify this parameter.
+ * An empty condition will match all records.
* @return integer the number of rows deleted
*/
public static function deleteAll($condition = null);
@@ -192,11 +192,11 @@ interface ActiveRecordInterface
* $customer->save();
* ~~~
*
- * @param boolean $runValidation whether to perform validation before saving the record.
- * If the validation fails, the record will not be saved to database. `false` will be returned
- * in this case.
- * @param array $attributes list of attributes that need to be saved. Defaults to null,
- * meaning all attributes that are loaded from DB will be saved.
+ * @param boolean $runValidation whether to perform validation before saving the record.
+ * If the validation fails, the record will not be saved to database. `false` will be returned
+ * in this case.
+ * @param array $attributes list of attributes that need to be saved. Defaults to null,
+ * meaning all attributes that are loaded from DB will be saved.
* @return boolean whether the saving succeeds
*/
public function save($runValidation = true, $attributes = null);
@@ -213,10 +213,10 @@ interface ActiveRecordInterface
* $customer->insert();
* ```
*
- * @param boolean $runValidation whether to perform validation before saving the record.
- * If the validation fails, the record will not be inserted into the database.
- * @param array $attributes list of attributes that need to be saved. Defaults to null,
- * meaning all attributes that are loaded from DB will be saved.
+ * @param boolean $runValidation whether to perform validation before saving the record.
+ * If the validation fails, the record will not be inserted into the database.
+ * @param array $attributes list of attributes that need to be saved. Defaults to null,
+ * meaning all attributes that are loaded from DB will be saved.
* @return boolean whether the attributes are valid and the record is inserted successfully.
*/
public function insert($runValidation = true, $attributes = null);
@@ -233,14 +233,14 @@ interface ActiveRecordInterface
* $customer->update();
* ```
*
- * @param boolean $runValidation whether to perform validation before saving the record.
- * If the validation fails, the record will not be inserted into the database.
- * @param array $attributes list of attributes that need to be saved. Defaults to null,
- * meaning all attributes that are loaded from DB will be saved.
+ * @param boolean $runValidation whether to perform validation before saving the record.
+ * If the validation fails, the record will not be inserted into the database.
+ * @param array $attributes list of attributes that need to be saved. Defaults to null,
+ * meaning all attributes that are loaded from DB will be saved.
* @return integer|boolean the number of rows affected, or false if validation fails
- * or updating process is stopped for other reasons.
- * Note that it is possible that the number of rows affected is 0, even though the
- * update execution is successful.
+ * or updating process is stopped for other reasons.
+ * Note that it is possible that the number of rows affected is 0, even though the
+ * update execution is successful.
*/
public function update($runValidation = true, $attributes = null);
@@ -248,7 +248,7 @@ interface ActiveRecordInterface
* Deletes the record from the database.
*
* @return integer|boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason.
- * Note that it is possible that the number of rows deleted is 0, even though the deletion execution is successful.
+ * Note that it is possible that the number of rows deleted is 0, even though the deletion execution is successful.
*/
public function delete();
@@ -261,7 +261,7 @@ interface ActiveRecordInterface
/**
* Returns a value indicating whether the given active record is the same as the current one.
* Two [[isNewRecord|new]] records are considered to be not equal.
- * @param static $record record to compare to
+ * @param static $record record to compare to
* @return boolean whether the two active records refer to the same row in the same database table.
*/
public function equals($record);
@@ -271,8 +271,8 @@ interface ActiveRecordInterface
* A relation is defined by a getter method which returns an object implementing the [[ActiveQueryInterface]]
* (normally this would be a relational [[ActiveQuery]] object).
* It can be declared in either the ActiveRecord class itself or one of its behaviors.
- * @param string $name the relation name
- * @param boolean $throwException whether to throw exception if the relation does not exist.
+ * @param string $name the relation name
+ * @param boolean $throwException whether to throw exception if the relation does not exist.
* @return ActiveQueryInterface the relational query object
*/
public function getRelation($name, $throwException = true);
@@ -289,11 +289,11 @@ interface ActiveRecordInterface
*
* This method requires that the primary key value is not null.
*
- * @param string $name the case sensitive name of the relationship.
- * @param static $model the record to be linked with the current one.
- * @param array $extraColumns additional column values to be saved into the pivot table.
- * This parameter is only meaningful for a relationship involving a pivot table
- * (i.e., a relation set with `[[ActiveQueryInterface::via()]]`.)
+ * @param string $name the case sensitive name of the relationship.
+ * @param static $model the record to be linked with the current one.
+ * @param array $extraColumns additional column values to be saved into the pivot table.
+ * This parameter is only meaningful for a relationship involving a pivot table
+ * (i.e., a relation set with `[[ActiveQueryInterface::via()]]`.)
*/
public function link($name, $model, $extraColumns = []);
@@ -303,11 +303,11 @@ interface ActiveRecordInterface
* The record with the foreign key of the relationship will be deleted if `$delete` is true.
* Otherwise, the foreign key will be set null and the record will be saved without validation.
*
- * @param string $name the case sensitive name of the relationship.
- * @param static $model the model to be unlinked from the current one.
+ * @param string $name the case sensitive name of the relationship.
+ * @param static $model the model to be unlinked from the current one.
* @param boolean $delete whether to delete the model that contains the foreign key.
- * If false, the model's foreign key will be set null and saved.
- * If true, the model containing the foreign key will be deleted.
+ * If false, the model's foreign key will be set null and saved.
+ * If true, the model containing the foreign key will be deleted.
*/
public function unlink($name, $model, $delete = false);
}
diff --git a/framework/db/ActiveRelationTrait.php b/framework/db/ActiveRelationTrait.php
index 6676165e23..2c95ddfa75 100644
--- a/framework/db/ActiveRelationTrait.php
+++ b/framework/db/ActiveRelationTrait.php
@@ -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)
diff --git a/framework/db/BaseActiveRecord.php b/framework/db/BaseActiveRecord.php
index b781a7ed10..3ac93e35eb 100644
--- a/framework/db/BaseActiveRecord.php
+++ b/framework/db/BaseActiveRecord.php
@@ -127,9 +127,9 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* - null: return a new [[ActiveQuery]] object for further query purpose.
*
* @return ActiveQuery|static|null When `$q` is null, a new [[ActiveQuery]] instance
- * is returned; when `$q` is a scalar or an array, an ActiveRecord object matching it will be
- * returned (null will be returned if there is no matching).
- * @throws InvalidConfigException if the AR class does not have a primary key
+ * is returned; when `$q` is a scalar or an array, an ActiveRecord object matching it will be
+ * returned (null will be returned if there is no matching).
+ * @throws InvalidConfigException if the AR class does not have a primary key
* @see createQuery()
*/
public static function find($q = null)
@@ -158,10 +158,10 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* Customer::updateAll(['status' => 1], 'status = 2');
* ~~~
*
- * @param array $attributes attribute values (name-value pairs) to be saved into the table
- * @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
- * Please refer to [[Query::where()]] on how to specify this parameter.
- * @return integer the number of rows updated
+ * @param array $attributes attribute values (name-value pairs) to be saved into the table
+ * @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
+ * Please refer to [[Query::where()]] on how to specify this parameter.
+ * @return integer the number of rows updated
*/
public static function updateAll($attributes, $condition = '')
{
@@ -176,11 +176,11 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* Customer::updateAllCounters(['age' => 1]);
* ~~~
*
- * @param array $counters the counters to be updated (attribute name => increment value).
- * Use negative values if you want to decrement the counters.
- * @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
- * Please refer to [[Query::where()]] on how to specify this parameter.
- * @return integer the number of rows updated
+ * @param array $counters the counters to be updated (attribute name => increment value).
+ * Use negative values if you want to decrement the counters.
+ * @param string|array $condition the conditions that will be put in the WHERE part of the UPDATE SQL.
+ * Please refer to [[Query::where()]] on how to specify this parameter.
+ * @return integer the number of rows updated
*/
public static function updateAllCounters($counters, $condition = '')
{
@@ -197,10 +197,10 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* Customer::deleteAll('status = 3');
* ~~~
*
- * @param string|array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
- * Please refer to [[Query::where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return integer the number of rows deleted
+ * @param string|array $condition the conditions that will be put in the WHERE part of the DELETE SQL.
+ * Please refer to [[Query::where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return integer the number of rows deleted
*/
public static function deleteAll($condition = '', $params = [])
{
@@ -228,7 +228,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* to resolve the conflict.
*
* @return string the column name that stores the lock version of a table row.
- * If null is returned (default implemented), optimistic locking will not be supported.
+ * If null is returned (default implemented), optimistic locking will not be supported.
*/
public function optimisticLock()
{
@@ -239,9 +239,9 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* PHP getter magic method.
* This method is overridden so that attributes and related objects can be accessed like properties.
*
- * @param string $name property name
+ * @param string $name property name
* @throws \yii\base\InvalidParamException if relation name is wrong
- * @return mixed property value
+ * @return mixed property value
* @see getAttribute()
*/
public function __get($name)
@@ -266,8 +266,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* PHP setter magic method.
* This method is overridden so that AR attributes can be accessed like properties.
- * @param string $name property name
- * @param mixed $value property value
+ * @param string $name property name
+ * @param mixed $value property value
*/
public function __set($name, $value)
{
@@ -281,7 +281,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Checks if a property value is null.
* This method overrides the parent implementation by checking if the named attribute is null or not.
- * @param string $name the property name or the event name
+ * @param string $name the property name or the event name
* @return boolean whether the property value is null
*/
public function __isset($name)
@@ -334,10 +334,10 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
*
* Call methods declared in [[ActiveQuery]] to further customize the relation.
*
- * @param string $class the class name of the related record
- * @param array $link the primary-foreign key constraint. The keys of the array refer to
- * the attributes of the record associated with the `$class` model, while the values of the
- * array refer to the corresponding attributes in **this** AR class.
+ * @param string $class the class name of the related record
+ * @param array $link the primary-foreign key constraint. The keys of the array refer to
+ * the attributes of the record associated with the `$class` model, while the values of the
+ * array refer to the corresponding attributes in **this** AR class.
* @return ActiveQueryInterface the relational query object.
*/
public function hasOne($class, $link)
@@ -376,10 +376,10 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
*
* Call methods declared in [[ActiveQuery]] to further customize the relation.
*
- * @param string $class the class name of the related record
- * @param array $link the primary-foreign key constraint. The keys of the array refer to
- * the attributes of the record associated with the `$class` model, while the values of the
- * array refer to the corresponding attributes in **this** AR class.
+ * @param string $class the class name of the related record
+ * @param array $link the primary-foreign key constraint. The keys of the array refer to
+ * the attributes of the record associated with the `$class` model, while the values of the
+ * array refer to the corresponding attributes in **this** AR class.
* @return ActiveQueryInterface the relational query object.
*/
public function hasMany($class, $link)
@@ -397,7 +397,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Populates the named relation with the related records.
* Note that this method does not check if the relation exists or not.
- * @param string $name the relation name (case-sensitive)
+ * @param string $name the relation name (case-sensitive)
* @param ActiveRecordInterface|array|null $records the related records to be populated into the relation.
*/
public function populateRelation($name, $records)
@@ -407,7 +407,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Check whether the named relation has been populated with records.
- * @param string $name the relation name (case-sensitive)
+ * @param string $name the relation name (case-sensitive)
* @return boolean whether relation has been populated with records.
*/
public function isRelationPopulated($name)
@@ -426,7 +426,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Returns a value indicating whether the model has an attribute with the specified name.
- * @param string $name the name of the attribute
+ * @param string $name the name of the attribute
* @return boolean whether the model has an attribute with the specified name.
*/
public function hasAttribute($name)
@@ -438,8 +438,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* Returns the named attribute value.
* If this record is the result of a query and the attribute is not loaded,
* null will be returned.
- * @param string $name the attribute name
- * @return mixed the attribute value. Null if the attribute is not set or does not exist.
+ * @param string $name the attribute name
+ * @return mixed the attribute value. Null if the attribute is not set or does not exist.
* @see hasAttribute()
*/
public function getAttribute($name)
@@ -449,8 +449,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Sets the named attribute value.
- * @param string $name the attribute name
- * @param mixed $value the attribute value.
+ * @param string $name the attribute name
+ * @param mixed $value the attribute value.
* @throws InvalidParamException if the named attribute does not exist.
* @see hasAttribute()
*/
@@ -486,9 +486,9 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* Returns the old value of the named attribute.
* If this record is the result of a query and the attribute is not loaded,
* null will be returned.
- * @param string $name the attribute name
- * @return mixed the old attribute value. Null if the attribute is not loaded before
- * or does not exist.
+ * @param string $name the attribute name
+ * @return mixed the old attribute value. Null if the attribute is not loaded before
+ * or does not exist.
* @see hasAttribute()
*/
public function getOldAttribute($name)
@@ -498,8 +498,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Sets the old value of the named attribute.
- * @param string $name the attribute name
- * @param mixed $value the old attribute value.
+ * @param string $name the attribute name
+ * @param mixed $value the old attribute value.
* @throws InvalidParamException if the named attribute does not exist.
* @see hasAttribute()
*/
@@ -525,7 +525,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Returns a value indicating whether the named attribute has been changed.
- * @param string $name the name of the attribute
+ * @param string $name the name of the attribute
* @return boolean whether the attribute has been changed
*/
public function isAttributeChanged($name)
@@ -539,9 +539,9 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Returns the attribute values that have been modified since they are loaded or saved most recently.
- * @param string[]|null $names the names of the attributes whose values may be returned if they are
- * changed recently. If null, [[attributes()]] will be used.
- * @return array the changed attribute values (name-value pairs)
+ * @param string[]|null $names the names of the attributes whose values may be returned if they are
+ * changed recently. If null, [[attributes()]] will be used.
+ * @return array the changed attribute values (name-value pairs)
*/
public function getDirtyAttributes($names = null)
{
@@ -583,10 +583,10 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* ~~~
*
*
- * @param boolean $runValidation whether to perform validation before saving the record.
- * If the validation fails, the record will not be saved to database.
- * @param array $attributes list of attributes that need to be saved. Defaults to null,
- * meaning all attributes that are loaded from DB will be saved.
+ * @param boolean $runValidation whether to perform validation before saving the record.
+ * If the validation fails, the record will not be saved to database.
+ * @param array $attributes list of attributes that need to be saved. Defaults to null,
+ * meaning all attributes that are loaded from DB will be saved.
* @return boolean whether the saving succeeds
*/
public function save($runValidation = true, $attributes = null)
@@ -638,15 +638,15 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* }
* ~~~
*
- * @param boolean $runValidation whether to perform validation before saving the record.
- * If the validation fails, the record will not be inserted into the database.
- * @param array $attributes list of attributes that need to be saved. Defaults to null,
- * meaning all attributes that are loaded from DB will be saved.
- * @return integer|boolean the number of rows affected, or false if validation fails
- * or [[beforeSave()]] stops the updating process.
+ * @param boolean $runValidation whether to perform validation before saving the record.
+ * If the validation fails, the record will not be inserted into the database.
+ * @param array $attributes list of attributes that need to be saved. Defaults to null,
+ * meaning all attributes that are loaded from DB will be saved.
+ * @return integer|boolean the number of rows affected, or false if validation fails
+ * or [[beforeSave()]] stops the updating process.
* @throws StaleObjectException if [[optimisticLock|optimistic locking]] is enabled and the data
- * being updated is outdated.
- * @throws \Exception in case update failed.
+ * being updated is outdated.
+ * @throws \Exception in case update failed.
*/
public function update($runValidation = true, $attributes = null)
{
@@ -669,7 +669,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
*
* Note that this method will NOT perform data validation.
*
- * @param array $attributes the attributes (names or name-value pairs) to be updated
+ * @param array $attributes the attributes (names or name-value pairs) to be updated
* @return integer|boolean the number of rows affected, or false if [[beforeSave()]] stops the updating process.
*/
public function updateAttributes($attributes)
@@ -738,8 +738,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* $post->updateCounters(['view_count' => 1]);
* ~~~
*
- * @param array $counters the counters to be updated (attribute name => increment value)
- * Use negative values if you want to decrement the counters.
+ * @param array $counters the counters to be updated (attribute name => increment value)
+ * Use negative values if you want to decrement the counters.
* @return boolean whether the saving is successful
* @see updateAllCounters()
*/
@@ -770,11 +770,11 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* In the above step 1 and 3, events named [[EVENT_BEFORE_DELETE]] and [[EVENT_AFTER_DELETE]]
* will be raised by the corresponding methods.
*
- * @return integer|boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason.
- * Note that it is possible the number of rows deleted is 0, even though the deletion execution is successful.
+ * @return integer|boolean the number of rows deleted, or false if the deletion is unsuccessful for some reason.
+ * Note that it is possible the number of rows deleted is 0, even though the deletion execution is successful.
* @throws StaleObjectException if [[optimisticLock|optimistic locking]] is enabled and the data
- * being deleted is outdated.
- * @throws \Exception in case delete failed.
+ * being deleted is outdated.
+ * @throws \Exception in case delete failed.
*/
public function delete()
{
@@ -859,10 +859,10 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* }
* ~~~
*
- * @param boolean $insert whether this method called while inserting a record.
- * If false, it means the method is called while updating a record.
+ * @param boolean $insert whether this method called while inserting a record.
+ * If false, it means the method is called while updating a record.
* @return boolean whether the insertion or updating should continue.
- * If false, the insertion or updating will be cancelled.
+ * If false, the insertion or updating will be cancelled.
*/
public function beforeSave($insert)
{
@@ -879,7 +879,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* When overriding this method, make sure you call the parent implementation so that
* the event is triggered.
* @param boolean $insert whether this method called while inserting a record.
- * If false, it means the method is called while updating a record.
+ * If false, it means the method is called while updating a record.
*/
public function afterSave($insert)
{
@@ -927,7 +927,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Repopulates this active record with the latest data.
* @return boolean whether the row still exists in the database. If true, the latest data
- * will be populated to this active record. Otherwise, this record will remain unchanged.
+ * will be populated to this active record. Otherwise, this record will remain unchanged.
*/
public function refresh()
{
@@ -948,8 +948,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* Returns a value indicating whether the given active record is the same as the current one.
* The comparison is made by comparing the table names and the primary key values of the two active records.
* If one of the records [[isNewRecord|is new]] they are also considered not equal.
- * @param ActiveRecordInterface $record record to compare to
- * @return boolean whether the two active records refer to the same row in the same database table.
+ * @param ActiveRecordInterface $record record to compare to
+ * @return boolean whether the two active records refer to the same row in the same database table.
*/
public function equals($record)
{
@@ -962,15 +962,15 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Returns the primary key value(s).
- * @param boolean $asArray whether to return the primary key value as an array. If true,
- * the return value will be an array with column names as keys and column values as values.
- * Note that for composite primary keys, an array will always be returned regardless of this parameter value.
+ * @param boolean $asArray whether to return the primary key value as an array. If true,
+ * the return value will be an array with column names as keys and column values as values.
+ * Note that for composite primary keys, an array will always be returned regardless of this parameter value.
* @property mixed The primary key value. An array (column name => column value) is returned if
- * the primary key is composite. A string is returned otherwise (null will be returned if
- * the key value is null).
- * @return mixed the primary key value. An array (column name => column value) is returned if the primary key
- * is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
- * the key value is null).
+ * the primary key is composite. A string is returned otherwise (null will be returned if
+ * the key value is null).
+ * @return mixed the primary key value. An array (column name => column value) is returned if the primary key
+ * is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
+ * the key value is null).
*/
public function getPrimaryKey($asArray = false)
{
@@ -992,15 +992,15 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* This refers to the primary key value that is populated into the record
* after executing a find method (e.g. find(), findAll()).
* The value remains unchanged even if the primary key attribute is manually assigned with a different value.
- * @param boolean $asArray whether to return the primary key value as an array. If true,
- * the return value will be an array with column name as key and column value as value.
- * If this is false (default), a scalar value will be returned for non-composite primary key.
+ * @param boolean $asArray whether to return the primary key value as an array. If true,
+ * the return value will be an array with column name as key and column value as value.
+ * If this is false (default), a scalar value will be returned for non-composite primary key.
* @property mixed The old primary key value. An array (column name => column value) is
- * returned if the primary key is composite. A string is returned otherwise (null will be
- * returned if the key value is null).
- * @return mixed the old primary key value. An array (column name => column value) is returned if the primary key
- * is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
- * the key value is null).
+ * returned if the primary key is composite. A string is returned otherwise (null will be
+ * returned if the key value is null).
+ * @return mixed the old primary key value. An array (column name => column value) is returned if the primary key
+ * is composite or `$asArray` is true. A string is returned otherwise (null will be returned if
+ * the key value is null).
*/
public function getOldPrimaryKey($asArray = false)
{
@@ -1028,8 +1028,8 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* record to trigger the [[EVENT_AFTER_FIND|afterFind Event]].
*
* @param BaseActiveRecord $record the record to be populated. In most cases this will be an instance
- * created by [[instantiate()]] beforehand.
- * @param array $row attribute values (name => value)
+ * created by [[instantiate()]] beforehand.
+ * @param array $row attribute values (name => value)
*/
public static function populateRecord($record, $row)
{
@@ -1054,7 +1054,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* depends on the row data to be populated into the record.
* For example, by creating a record based on the value of a column,
* you may implement the so-called single-table inheritance mapping.
- * @param array $row row data to be populated into the record.
+ * @param array $row row data to be populated into the record.
* @return static the newly created active record
*/
public static function instantiate($row)
@@ -1065,7 +1065,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Returns whether there is an element at the specified offset.
* 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 whether there is an element at the specified offset.
*/
public function offsetExists($offset)
@@ -1077,11 +1077,11 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* Returns the relation object with the specified name.
* A relation is defined by a getter method which returns an [[ActiveQueryInterface]] object.
* It can be declared in either the Active Record class itself or one of its behaviors.
- * @param string $name the relation name
- * @param boolean $throwException whether to throw exception if the relation does not exist.
+ * @param string $name the relation name
+ * @param boolean $throwException whether to throw exception if the relation does not exist.
* @return ActiveQueryInterface|ActiveQuery the relational query object. If the relation does not exist
- * and `$throwException` is false, null will be returned.
- * @throws InvalidParamException if the named relation does not exist.
+ * and `$throwException` is false, null will be returned.
+ * @throws InvalidParamException if the named relation does not exist.
*/
public function getRelation($name, $throwException = true)
{
@@ -1132,12 +1132,12 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
*
* Note that this method requires that the primary key value is not null.
*
- * @param string $name the case sensitive name of the relationship
- * @param ActiveRecordInterface $model the model to be linked with the current one.
- * @param array $extraColumns additional column values to be saved into the pivot table.
- * This parameter is only meaningful for a relationship involving a pivot table
- * (i.e., a relation set with [[ActiveRelationTrait::via()]] or `[[ActiveQuery::viaTable()]]`.)
- * @throws InvalidCallException if the method is unable to link two models.
+ * @param string $name the case sensitive name of the relationship
+ * @param ActiveRecordInterface $model the model to be linked with the current one.
+ * @param array $extraColumns additional column values to be saved into the pivot table.
+ * This parameter is only meaningful for a relationship involving a pivot table
+ * (i.e., a relation set with [[ActiveRelationTrait::via()]] or `[[ActiveQuery::viaTable()]]`.)
+ * @throws InvalidCallException if the method is unable to link two models.
*/
public function link($name, $model, $extraColumns = [])
{
@@ -1219,12 +1219,12 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* The model with the foreign key of the relationship will be deleted if `$delete` is true.
* Otherwise, the foreign key will be set null and the model will be saved without validation.
*
- * @param string $name the case sensitive name of the relationship.
- * @param ActiveRecordInterface $model the model to be unlinked from the current one.
- * @param boolean $delete whether to delete the model that contains the foreign key.
- * If false, the model's foreign key will be set null and saved.
- * If true, the model containing the foreign key will be deleted.
- * @throws InvalidCallException if the models cannot be unlinked
+ * @param string $name the case sensitive name of the relationship.
+ * @param ActiveRecordInterface $model the model to be unlinked from the current one.
+ * @param boolean $delete whether to delete the model that contains the foreign key.
+ * If false, the model's foreign key will be set null and saved.
+ * If true, the model containing the foreign key will be deleted.
+ * @throws InvalidCallException if the models cannot be unlinked
*/
public function unlink($name, $model, $delete = false)
{
@@ -1303,9 +1303,9 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
}
/**
- * @param array $link
- * @param BaseActiveRecord $foreignModel
- * @param BaseActiveRecord $primaryModel
+ * @param array $link
+ * @param BaseActiveRecord $foreignModel
+ * @param BaseActiveRecord $primaryModel
* @throws InvalidCallException
*/
private function bindModels($link, $foreignModel, $primaryModel)
@@ -1322,7 +1322,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Returns a value indicating whether the given set of attributes represents the primary key for this model
- * @param array $keys the set of attributes to check
+ * @param array $keys the set of attributes to check
* @return boolean whether the given set of attributes represents the primary key for this model
*/
public static function isPrimaryKey($keys)
@@ -1338,7 +1338,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Returns the text label for the specified attribute.
* If the attribute looks like `relatedModel.attribute`, then the attribute will be received from the related model.
- * @param string $attribute the attribute name
+ * @param string $attribute the attribute name
* @return string the attribute label
* @see generateAttributeLabel()
* @see attributeLabels()
diff --git a/framework/db/ColumnSchema.php b/framework/db/ColumnSchema.php
index 83dce13c10..93c8dc06ed 100644
--- a/framework/db/ColumnSchema.php
+++ b/framework/db/ColumnSchema.php
@@ -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)
diff --git a/framework/db/Command.php b/framework/db/Command.php
index 1a74d96b98..23a01f6c3d 100644
--- a/framework/db/Command.php
+++ b/framework/db/Command.php
@@ -89,7 +89,7 @@ class Command extends \yii\base\Component
/**
* Specifies the SQL statement to be executed.
* The previous SQL execution (if any) will be cancelled, and [[params]] will be cleared as well.
- * @param string $sql the SQL statement to be set.
+ * @param string $sql the SQL statement to be set.
* @return static this command instance
*/
public function setSql($sql)
@@ -170,15 +170,15 @@ class Command extends \yii\base\Component
/**
* Binds a parameter to the SQL statement to be executed.
- * @param string|integer $name parameter identifier. For a prepared statement
- * using named placeholders, this will be a parameter name of
- * the form `:name`. For a prepared statement using question mark
- * placeholders, this will be the 1-indexed position of the parameter.
- * @param mixed $value Name of the PHP variable to bind to the SQL statement parameter
- * @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value.
- * @param integer $length length of the data type
- * @param mixed $driverOptions the driver-specific options
- * @return static the current command being executed
+ * @param string|integer $name parameter identifier. For a prepared statement
+ * using named placeholders, this will be a parameter name of
+ * the form `:name`. For a prepared statement using question mark
+ * placeholders, this will be the 1-indexed position of the parameter.
+ * @param mixed $value Name of the PHP variable to bind to the SQL statement parameter
+ * @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value.
+ * @param integer $length length of the data type
+ * @param mixed $driverOptions the driver-specific options
+ * @return static the current command being executed
* @see http://www.php.net/manual/en/function.PDOStatement-bindParam.php
*/
public function bindParam($name, &$value, $dataType = null, $length = null, $driverOptions = null)
@@ -201,13 +201,13 @@ class Command extends \yii\base\Component
/**
* Binds a value to a parameter.
- * @param string|integer $name Parameter identifier. For a prepared statement
- * using named placeholders, this will be a parameter name of
- * the form `:name`. For a prepared statement using question mark
- * placeholders, this will be the 1-indexed position of the parameter.
- * @param mixed $value The value to bind to the parameter
- * @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value.
- * @return static the current command being executed
+ * @param string|integer $name Parameter identifier. For a prepared statement
+ * using named placeholders, this will be a parameter name of
+ * the form `:name`. For a prepared statement using question mark
+ * placeholders, this will be the 1-indexed position of the parameter.
+ * @param mixed $value The value to bind to the parameter
+ * @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value.
+ * @return static the current command being executed
* @see http://www.php.net/manual/en/function.PDOStatement-bindValue.php
*/
public function bindValue($name, $value, $dataType = null)
@@ -226,11 +226,11 @@ class Command extends \yii\base\Component
* Binds a list of values to the corresponding parameters.
* This is similar to [[bindValue()]] except that it binds multiple values at a time.
* Note that the SQL data type of each value is determined by its PHP type.
- * @param array $values the values to be bound. This must be given in terms of an associative
- * array with array keys being the parameter names, and array values the corresponding parameter values,
- * e.g. `[':name' => 'John', ':age' => 25]`. By default, the PDO type of each value is determined
- * by its PHP type. You may explicitly specify the PDO type by using an array: `[value, type]`,
- * e.g. `[':name' => 'John', ':profile' => [$profile, \PDO::PARAM_LOB]]`.
+ * @param array $values the values to be bound. This must be given in terms of an associative
+ * array with array keys being the parameter names, and array values the corresponding parameter values,
+ * e.g. `[':name' => 'John', ':age' => 25]`. By default, the PDO type of each value is determined
+ * by its PHP type. You may explicitly specify the PDO type by using an array: `[value, type]`,
+ * e.g. `[':name' => 'John', ':profile' => [$profile, \PDO::PARAM_LOB]]`.
* @return static the current command being executed
*/
public function bindValues($values)
@@ -256,7 +256,7 @@ class Command extends \yii\base\Component
* Executes the SQL statement.
* This method should only be used for executing non-query SQL statement, such as `INSERT`, `DELETE`, `UPDATE` SQLs.
* No result set will be returned.
- * @return integer number of rows affected by the execution.
+ * @return integer number of rows affected by the execution.
* @throws Exception execution failed
*/
public function execute()
@@ -298,7 +298,7 @@ class Command extends \yii\base\Component
* Executes the SQL statement and returns query result.
* This method is for executing a SQL query that returns result set, such as `SELECT`.
* @return DataReader the reader object for fetching the query result
- * @throws Exception execution failed
+ * @throws Exception execution failed
*/
public function query()
{
@@ -307,10 +307,10 @@ class Command extends \yii\base\Component
/**
* Executes the SQL statement and returns ALL rows at once.
- * @param integer $fetchMode the result fetch mode. Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
- * for valid fetch modes. If this parameter is null, the value set in [[fetchMode]] will be used.
- * @return array all rows of the query result. Each array element is an array representing a row of data.
- * An empty array is returned if the query results in nothing.
+ * @param integer $fetchMode the result fetch mode. Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
+ * for valid fetch modes. If this parameter is null, the value set in [[fetchMode]] will be used.
+ * @return array all rows of the query result. Each array element is an array representing a row of data.
+ * An empty array is returned if the query results in nothing.
* @throws Exception execution failed
*/
public function queryAll($fetchMode = null)
@@ -321,11 +321,11 @@ class Command extends \yii\base\Component
/**
* Executes the SQL statement and returns the first row of the result.
* This method is best used when only the first row of result is needed for a query.
- * @param integer $fetchMode the result fetch mode. Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
- * for valid fetch modes. If this parameter is null, the value set in [[fetchMode]] will be used.
+ * @param integer $fetchMode the result fetch mode. Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
+ * for valid fetch modes. If this parameter is null, the value set in [[fetchMode]] 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.
- * @throws Exception execution failed
+ * results in nothing.
+ * @throws Exception execution failed
*/
public function queryOne($fetchMode = null)
{
@@ -336,8 +336,8 @@ class Command extends \yii\base\Component
* Executes the SQL statement and returns the value of the first column in the first row of data.
* This method is best used when only a single value is needed for a query.
* @return string|boolean the value of the first column in the first row of the query result.
- * False is returned if there is no value.
- * @throws Exception execution failed
+ * False is returned if there is no value.
+ * @throws Exception execution failed
*/
public function queryScalar()
{
@@ -353,7 +353,7 @@ class Command extends \yii\base\Component
* Executes the SQL statement and returns the first column of the result.
* This method is best used when only the first column of result (i.e. the first element in each row)
* is needed for a query.
- * @return array the first column of the query result. Empty array is returned if the query results in nothing.
+ * @return array the first column of the query result. Empty array is returned if the query results in nothing.
* @throws Exception execution failed
*/
public function queryColumn()
@@ -363,10 +363,10 @@ class Command extends \yii\base\Component
/**
* Performs the actual DB query of a SQL statement.
- * @param string $method method of PDOStatement to be called
- * @param integer $fetchMode the result fetch mode. Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
- * for valid fetch modes. If this parameter is null, the value set in [[fetchMode]] will be used.
- * @return mixed the method execution result
+ * @param string $method method of PDOStatement to be called
+ * @param integer $fetchMode the result fetch mode. Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
+ * for valid fetch modes. If this parameter is null, the value set in [[fetchMode]] will be used.
+ * @return mixed the method execution result
* @throws Exception if the query causes any problem
*/
private function queryInternal($method, $fetchMode = null)
@@ -448,8 +448,8 @@ class Command extends \yii\base\Component
*
* Note that the created command is not executed until [[execute()]] is called.
*
- * @param string $table the table that new rows will be inserted into.
- * @param array $columns the column data (name => value) to be inserted into the table.
+ * @param string $table the table that new rows will be inserted into.
+ * @param array $columns the column data (name => value) to be inserted into the table.
* @return Command the command object itself
*/
public function insert($table, $columns)
@@ -474,9 +474,9 @@ class Command extends \yii\base\Component
*
* Note that the values in each row must match the corresponding column names.
*
- * @param string $table the table that new rows will be inserted into.
- * @param array $columns the column names
- * @param array $rows the rows to be batch inserted into the table
+ * @param string $table the table that new rows will be inserted into.
+ * @param array $columns the column names
+ * @param array $rows the rows to be batch inserted into the table
* @return Command the command object itself
*/
public function batchInsert($table, $columns, $rows)
@@ -498,12 +498,12 @@ class Command extends \yii\base\Component
*
* Note that the created command is not executed until [[execute()]] is called.
*
- * @param string $table the table to be updated.
- * @param array $columns the column data (name => value) to be updated.
- * @param string|array $condition the condition that will be put in the WHERE part. Please
- * refer to [[Query::where()]] on how to specify condition.
- * @param array $params the parameters to be bound to the command
- * @return Command the command object itself
+ * @param string $table the table to be updated.
+ * @param array $columns the column data (name => value) to be updated.
+ * @param string|array $condition the condition that will be put in the WHERE part. Please
+ * refer to [[Query::where()]] on how to specify condition.
+ * @param array $params the parameters to be bound to the command
+ * @return Command the command object itself
*/
public function update($table, $columns, $condition = '', $params = [])
{
@@ -524,11 +524,11 @@ class Command extends \yii\base\Component
*
* Note that the created command is not executed until [[execute()]] is called.
*
- * @param string $table the table where the data will be deleted from.
- * @param string|array $condition the condition that will be put in the WHERE part. Please
- * refer to [[Query::where()]] on how to specify condition.
- * @param array $params the parameters to be bound to the command
- * @return Command the command object itself
+ * @param string $table the table where the data will be deleted from.
+ * @param string|array $condition the condition that will be put in the WHERE part. Please
+ * refer to [[Query::where()]] on how to specify condition.
+ * @param array $params the parameters to be bound to the command
+ * @return Command the command object itself
*/
public function delete($table, $condition = '', $params = [])
{
@@ -550,9 +550,9 @@ class Command extends \yii\base\Component
* If a column is specified with definition only (e.g. 'PRIMARY KEY (name, type)'), it will be directly
* inserted into the generated SQL.
*
- * @param string $table the name of the table to be created. The name will be properly quoted by the method.
- * @param array $columns the columns (name => definition) in the new table.
- * @param string $options additional SQL fragment that will be appended to the generated SQL.
+ * @param string $table the name of the table to be created. The name will be properly quoted by the method.
+ * @param array $columns the columns (name => definition) in the new table.
+ * @param string $options additional SQL fragment that will be appended to the generated SQL.
* @return Command the command object itself
*/
public function createTable($table, $columns, $options = null)
@@ -564,8 +564,8 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command 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 Command the command object itself
*/
public function renameTable($table, $newName)
@@ -577,7 +577,7 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command for dropping a DB table.
- * @param string $table the table to be dropped. The name will be properly quoted by the method.
+ * @param string $table the table to be dropped. The name will be properly quoted by the method.
* @return Command the command object itself
*/
public function dropTable($table)
@@ -589,7 +589,7 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command for truncating a DB table.
- * @param string $table the table to be truncated. The name will be properly quoted by the method.
+ * @param string $table the table to be truncated. The name will be properly quoted by the method.
* @return Command the command object itself
*/
public function truncateTable($table)
@@ -601,11 +601,11 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command for adding a new DB column.
- * @param string $table the table that the new column will be added to. The table name will be properly quoted by the method.
- * @param string $column the name of the new column. The name will be properly quoted by the method.
- * @param string $type the column type. [[\yii\db\QueryBuilder::getColumnType()]] will be called
- * to convert the give column type to the physical one. For example, `string` will be converted
- * as `varchar(255)`, and `string not null` becomes `varchar(255) not null`.
+ * @param string $table the table that the new column will be added to. The table name will be properly quoted by the method.
+ * @param string $column the name of the new column. The name will be properly quoted by the method.
+ * @param string $type the column type. [[\yii\db\QueryBuilder::getColumnType()]] will be called
+ * to convert the give column type to the physical one. For example, `string` will be converted
+ * as `varchar(255)`, and `string not null` becomes `varchar(255) not null`.
* @return Command the command object itself
*/
public function addColumn($table, $column, $type)
@@ -617,8 +617,8 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command for dropping a DB column.
- * @param string $table the table whose column is to be dropped. The name will be properly quoted by the method.
- * @param string $column the name of the column to be dropped. The name will be properly quoted by the method.
+ * @param string $table the table whose column is to be dropped. The name will be properly quoted by the method.
+ * @param string $column the name of the column to be dropped. The name will be properly quoted by the method.
* @return Command the command object itself
*/
public function dropColumn($table, $column)
@@ -630,9 +630,9 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command 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.
+ * @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 Command the command object itself
*/
public function renameColumn($table, $oldName, $newName)
@@ -644,11 +644,11 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command 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 column type. [[\yii\db\QueryBuilder::getColumnType()]] will be called
- * to convert the give column type to the physical one. For example, `string` will be converted
- * as `varchar(255)`, and `string not null` becomes `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 column type. [[\yii\db\QueryBuilder::getColumnType()]] will be called
+ * to convert the give column type to the physical one. For example, `string` will be converted
+ * as `varchar(255)`, and `string not null` becomes `varchar(255) not null`.
* @return Command the command object itself
*/
public function alterColumn($table, $column, $type)
@@ -661,10 +661,10 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command for adding a primary key constraint to an existing table.
* The method will properly quote the table and column names.
- * @param string $name the name of the primary key constraint.
- * @param string $table the table that the primary key constraint will be added to.
- * @param string|array $columns comma separated string or array of columns that the primary key will consist of.
- * @return Command the command object itself.
+ * @param string $name the name of the primary key constraint.
+ * @param string $table the table that the primary key constraint will be added to.
+ * @param string|array $columns comma separated string or array of columns that the primary key will consist of.
+ * @return Command the command object itself.
*/
public function addPrimaryKey($name, $table, $columns)
{
@@ -675,8 +675,8 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command 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 Command the command object itself
*/
public function dropPrimaryKey($name, $table)
@@ -689,13 +689,13 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command for adding a foreign key constraint to an existing table.
* The method will properly quote the table and column names.
- * @param string $name the name of the foreign key constraint.
- * @param string $table the table that the foreign key constraint will be added to.
- * @param string $columns the name of the column to that the constraint will be added on. If there are multiple columns, separate them with commas.
- * @param string $refTable the table that the foreign key references to.
- * @param string $refColumns the name of the column that the foreign key references to. If there are multiple columns, separate them with commas.
- * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
- * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
+ * @param string $name the name of the foreign key constraint.
+ * @param string $table the table that the foreign key constraint will be added to.
+ * @param string $columns the name of the column to that the constraint will be added on. If there are multiple columns, separate them with commas.
+ * @param string $refTable the table that the foreign key references to.
+ * @param string $refColumns the name of the column that the foreign key references to. If there are multiple columns, separate them with commas.
+ * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
+ * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
* @return Command the command object itself
*/
public function addForeignKey($name, $table, $columns, $refTable, $refColumns, $delete = null, $update = null)
@@ -707,8 +707,8 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command 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 Command the command object itself
*/
public function dropForeignKey($name, $table)
@@ -720,12 +720,12 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command for creating a new index.
- * @param string $name the name of the index. The name will be properly quoted by the method.
- * @param string $table the table that the new index will be created for. The table name will be properly quoted by the method.
- * @param string|array $columns the column(s) that should be included in the index. If there are multiple columns, please separate them
- * by commas. The column names will be properly quoted by the method.
- * @param boolean $unique whether to add UNIQUE constraint on the created index.
- * @return Command the command object itself
+ * @param string $name the name of the index. The name will be properly quoted by the method.
+ * @param string $table the table that the new index will be created for. The table name will be properly quoted by the method.
+ * @param string|array $columns the column(s) that should be included in the index. If there are multiple columns, please separate them
+ * by commas. The column names will be properly quoted by the method.
+ * @param boolean $unique whether to add UNIQUE constraint on the created index.
+ * @return Command the command object itself
*/
public function createIndex($name, $table, $columns, $unique = false)
{
@@ -736,8 +736,8 @@ class Command extends \yii\base\Component
/**
* Creates a SQL command 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 Command the command object itself
*/
public function dropIndex($name, $table)
@@ -751,10 +751,10 @@ class Command extends \yii\base\Component
* Creates a SQL command 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 $table 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 Command the command object itself
+ * @param string $table 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 Command the command object itself
* @throws NotSupportedException if this is not supported by the underlying DBMS
*/
public function resetSequence($table, $value = null)
@@ -766,11 +766,11 @@ class Command extends \yii\base\Component
/**
* Builds a SQL command for enabling or disabling integrity check.
- * @param boolean $check whether to turn on or off the integrity check.
- * @param string $schema the schema name of the tables. Defaults to empty string, meaning the current
- * or default schema.
- * @param string $table the table name.
- * @return Command the command object itself
+ * @param boolean $check whether to turn on or off the integrity check.
+ * @param string $schema the schema name of the tables. Defaults to empty string, meaning the current
+ * or default schema.
+ * @param string $table the table name.
+ * @return Command the command object itself
* @throws NotSupportedException if this is not supported by the underlying DBMS
*/
public function checkIntegrity($check = true, $schema = '', $table = '')
diff --git a/framework/db/Connection.php b/framework/db/Connection.php
index 6610363cb1..ec01a1ac48 100644
--- a/framework/db/Connection.php
+++ b/framework/db/Connection.php
@@ -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)
diff --git a/framework/db/DataReader.php b/framework/db/DataReader.php
index 36a38ac062..478b8e85ea 100644
--- a/framework/db/DataReader.php
+++ b/framework/db/DataReader.php
@@ -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()
{
diff --git a/framework/db/Exception.php b/framework/db/Exception.php
index 44949f65c0..4ed0cc560d 100644
--- a/framework/db/Exception.php
+++ b/framework/db/Exception.php
@@ -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)
{
diff --git a/framework/db/Expression.php b/framework/db/Expression.php
index 0e2130e332..e378be2152 100644
--- a/framework/db/Expression.php
+++ b/framework/db/Expression.php
@@ -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 = [])
{
diff --git a/framework/db/Migration.php b/framework/db/Migration.php
index c228d3628d..87fcdde69a 100644
--- a/framework/db/Migration.php
+++ b/framework/db/Migration.php
@@ -56,7 +56,7 @@ class Migration extends \yii\base\Component
* This method contains the logic to be executed when applying this migration.
* Child classes may overwrite this method to provide actual migration logic.
* @return boolean return a false value to indicate the migration fails
- * and should not proceed further. All other return values mean the migration succeeds.
+ * and should not proceed further. All other return values mean the migration succeeds.
*/
public function up()
{
@@ -84,7 +84,7 @@ class Migration extends \yii\base\Component
* The default implementation throws an exception indicating the migration cannot be removed.
* Child classes may override this method if the corresponding migrations can be removed.
* @return boolean return a false value to indicate the migration fails
- * and should not proceed further. All other return values mean the migration succeeds.
+ * and should not proceed further. All other return values mean the migration succeeds.
*/
public function down()
{
@@ -114,7 +114,7 @@ class Migration extends \yii\base\Component
* Child classes may implement this method instead of [[up()]] if the DB logic
* needs to be within a transaction.
* @return boolean return a false value to indicate the migration fails
- * and should not proceed further. All other return values mean the migration succeeds.
+ * and should not proceed further. All other return values mean the migration succeeds.
*/
public function safeUp()
{
@@ -127,7 +127,7 @@ class Migration extends \yii\base\Component
* Child classes may implement this method instead of [[up()]] if the DB logic
* needs to be within a transaction.
* @return boolean return a false value to indicate the migration fails
- * and should not proceed further. All other return values mean the migration succeeds.
+ * and should not proceed further. All other return values mean the migration succeeds.
*/
public function safeDown()
{
@@ -136,9 +136,9 @@ class Migration extends \yii\base\Component
/**
* Executes a SQL statement.
* This method executes the specified SQL statement using [[db]].
- * @param string $sql the SQL statement to be executed
- * @param array $params input parameters (name => value) for the SQL execution.
- * See [[Command::execute()]] for more details.
+ * @param string $sql the SQL statement to be executed
+ * @param array $params input parameters (name => value) for the SQL execution.
+ * See [[Command::execute()]] for more details.
*/
public function execute($sql, $params = [])
{
@@ -151,8 +151,8 @@ class Migration extends \yii\base\Component
/**
* Creates and executes an INSERT SQL statement.
* The method will properly escape the column names, and bind the values to be inserted.
- * @param string $table the table that new rows will be inserted into.
- * @param array $columns the column data (name => value) to be inserted into the table.
+ * @param string $table the table that new rows will be inserted into.
+ * @param array $columns the column data (name => value) to be inserted into the table.
*/
public function insert($table, $columns)
{
@@ -165,9 +165,9 @@ class Migration extends \yii\base\Component
/**
* Creates and executes an batch INSERT SQL statement.
* The method will properly escape the column names, and bind the values to be inserted.
- * @param string $table the table that new rows will be inserted into.
- * @param array $columns the column names.
- * @param array $rows the rows to be batch inserted into the table
+ * @param string $table the table that new rows will be inserted into.
+ * @param array $columns the column names.
+ * @param array $rows the rows to be batch inserted into the table
*/
public function batchInsert($table, $columns, $rows)
{
@@ -180,11 +180,11 @@ class Migration extends \yii\base\Component
/**
* Creates and executes an UPDATE SQL statement.
* The method will properly escape the column names and bind the values to be updated.
- * @param string $table the table to be updated.
- * @param array $columns the column data (name => value) to be updated.
+ * @param string $table the table to be updated.
+ * @param array $columns the column data (name => value) to be updated.
* @param array|string $condition the conditions that will be put in the WHERE part. Please
- * refer to [[Query::where()]] on how to specify conditions.
- * @param array $params the parameters to be bound to the query.
+ * refer to [[Query::where()]] on how to specify conditions.
+ * @param array $params the parameters to be bound to the query.
*/
public function update($table, $columns, $condition = '', $params = [])
{
@@ -196,10 +196,10 @@ class Migration extends \yii\base\Component
/**
* Creates and executes a DELETE SQL statement.
- * @param string $table the table where the data will be deleted from.
+ * @param string $table the table where the data will be deleted from.
* @param array|string $condition the conditions that will be put in the WHERE part. Please
- * refer to [[Query::where()]] on how to specify conditions.
- * @param array $params the parameters to be bound to the query.
+ * refer to [[Query::where()]] on how to specify conditions.
+ * @param array $params the parameters to be bound to the query.
*/
public function delete($table, $condition = '', $params = [])
{
@@ -221,8 +221,8 @@ class Migration extends \yii\base\Component
* If a column is specified with definition only (e.g. 'PRIMARY KEY (name, type)'), it will be directly
* put into the generated SQL.
*
- * @param string $table the name of the table to be created. The name will be properly quoted by the method.
- * @param array $columns the columns (name => definition) in the new table.
+ * @param string $table the name of the table to be created. The name will be properly quoted by the method.
+ * @param array $columns the columns (name => definition) in the new table.
* @param string $options additional SQL fragment that will be appended to the generated SQL.
*/
public function createTable($table, $columns, $options = null)
@@ -235,7 +235,7 @@ class Migration extends \yii\base\Component
/**
* Builds and executes 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 $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.
*/
public function renameTable($table, $newName)
@@ -272,11 +272,11 @@ class Migration extends \yii\base\Component
/**
* Builds and executes a SQL statement for adding a new DB column.
- * @param string $table the table that the new column will be added to. The table name will be properly quoted by the method.
+ * @param string $table the table that the new column will be added to. The table name will be properly quoted by the method.
* @param string $column the name of the new column. The name will be properly quoted by the method.
- * @param string $type the column type. The [[QueryBuilder::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 $type the column type. The [[QueryBuilder::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'.
*/
public function addColumn($table, $column, $type)
{
@@ -288,7 +288,7 @@ class Migration extends \yii\base\Component
/**
* Builds and executes a SQL statement for dropping a DB column.
- * @param string $table the table whose column is to be dropped. The name will be properly quoted by the method.
+ * @param string $table the table whose column is to be dropped. The name will be properly quoted by the method.
* @param string $column the name of the column to be dropped. The name will be properly quoted by the method.
*/
public function dropColumn($table, $column)
@@ -301,8 +301,8 @@ class Migration extends \yii\base\Component
/**
* Builds and executes 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 $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.
*/
public function renameColumn($table, $name, $newName)
@@ -315,11 +315,11 @@ class Migration extends \yii\base\Component
/**
* Builds and executes 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 $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 [[QueryBuilder::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 $type the new column type. The [[QueryBuilder::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'.
*/
public function alterColumn($table, $column, $type)
{
@@ -332,8 +332,8 @@ class Migration extends \yii\base\Component
/**
* Builds and executes a SQL statement for creating a primary key.
* The method will properly quote the table and column names.
- * @param string $name the name of the primary key constraint.
- * @param string $table the table that the primary key constraint will be added to.
+ * @param string $name the name of the primary key constraint.
+ * @param string $table the table that the primary key constraint will be added to.
* @param string|array $columns comma separated string or array of columns that the primary key will consist of.
*/
public function addPrimaryKey($name, $table, $columns)
@@ -346,7 +346,7 @@ class Migration extends \yii\base\Component
/**
* Builds and executes a SQL statement for dropping a primary key.
- * @param string $name the name of the primary key constraint to be removed.
+ * @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.
*/
public function dropPrimaryKey($name, $table)
@@ -360,13 +360,13 @@ class Migration extends \yii\base\Component
/**
* Builds a SQL statement for adding a foreign key constraint to an existing table.
* The method will properly quote the table and column names.
- * @param string $name the name of the foreign key constraint.
- * @param string $table the table that the foreign key constraint will be added to.
- * @param string $columns the name of the column to that the constraint will be added on. If there are multiple columns, separate them with commas or use an array.
- * @param string $refTable the table that the foreign key references to.
+ * @param string $name the name of the foreign key constraint.
+ * @param string $table the table that the foreign key constraint will be added to.
+ * @param string $columns the name of the column to that the constraint will be added on. If there are multiple columns, separate them with commas or use an array.
+ * @param string $refTable the table that the foreign key references to.
* @param string $refColumns the name of the column that the foreign key references to. If there are multiple columns, separate them with commas or use an array.
- * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
- * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
+ * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
+ * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
*/
public function addForeignKey($name, $table, $columns, $refTable, $refColumns, $delete = null, $update = null)
{
@@ -378,7 +378,7 @@ class Migration extends \yii\base\Component
/**
* 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 $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.
*/
public function dropForeignKey($name, $table)
@@ -391,11 +391,11 @@ class Migration extends \yii\base\Component
/**
* Builds and executes a SQL statement for creating a new index.
- * @param string $name the name of the index. The name will be properly quoted by the method.
- * @param string $table the table that the new index will be created for. The table name will be properly quoted by the method.
+ * @param string $name the name of the index. The name will be properly quoted by the method.
+ * @param string $table the table that the new index will be created for. The table name will be properly quoted by the method.
* @param string|array $columns the column(s) that should be included in the index. If there are multiple columns, please separate them
- * by commas or use an array. The column names will be properly quoted by the method.
- * @param boolean $unique whether to add UNIQUE constraint on the created index.
+ * by commas or use an array. The column names will be properly quoted by the method.
+ * @param boolean $unique whether to add UNIQUE constraint on the created index.
*/
public function createIndex($name, $table, $columns, $unique = false)
{
@@ -407,7 +407,7 @@ class Migration extends \yii\base\Component
/**
* Builds and executes 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 $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.
*/
public function dropIndex($name, $table)
diff --git a/framework/db/Query.php b/framework/db/Query.php
index 53dbcb9296..287d431fde 100644
--- a/framework/db/Query.php
+++ b/framework/db/Query.php
@@ -109,9 +109,9 @@ class Query extends Component implements QueryInterface
/**
* Creates a DB command that can be used to execute this query.
- * @param Connection $db the database connection used to generate the SQL statement.
- * If this parameter is not given, the `db` application component will be used.
- * @return Command the created DB command instance.
+ * @param Connection $db the database connection used to generate the SQL statement.
+ * If this parameter is not given, the `db` application component will be used.
+ * @return Command the created DB command instance.
*/
public function createCommand($db = null)
{
@@ -139,10 +139,10 @@ class Query extends Component implements QueryInterface
* }
* ```
*
- * @param integer $batchSize the number of records to be fetched in each batch.
- * @param Connection $db the database connection. If not set, the "db" application component will be used.
+ * @param integer $batchSize the number of records to be fetched in each batch.
+ * @param Connection $db the database connection. If not set, the "db" application component will be used.
* @return BatchQueryResult the batch query result. It implements the `Iterator` interface
- * and can be traversed to retrieve the data in batches.
+ * and can be traversed to retrieve the data in batches.
*/
public function batch($batchSize = 100, $db = null)
{
@@ -166,10 +166,10 @@ class Query extends Component implements QueryInterface
* }
* ```
*
- * @param integer $batchSize the number of records to be fetched in each batch.
- * @param Connection $db the database connection. If not set, the "db" application component will be used.
+ * @param integer $batchSize the number of records to be fetched in each batch.
+ * @param Connection $db the database connection. If not set, the "db" application component will be used.
* @return BatchQueryResult the batch query result. It implements the `Iterator` interface
- * and can be traversed to retrieve the data in batches.
+ * and can be traversed to retrieve the data in batches.
*/
public function each($batchSize = 100, $db = null)
{
@@ -184,9 +184,9 @@ class Query extends Component implements QueryInterface
/**
* Executes the query and returns all results as an array.
- * @param Connection $db the database connection used to generate the SQL statement.
- * 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 generate the SQL statement.
+ * 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)
{
@@ -199,7 +199,7 @@ class Query extends Component implements QueryInterface
* Converts the raw query results into the format as specified by this query.
* This method is internally used to convert the data fetched from database
* into the format as required by this query.
- * @param array $rows the raw query result from database
+ * @param array $rows the raw query result from database
* @return array the converted query result
*/
public function prepareResult($rows)
@@ -222,10 +222,10 @@ class Query extends Component implements QueryInterface
/**
* Executes the query and returns a single row of result.
- * @param Connection $db the database connection used to generate the SQL statement.
- * If this parameter is not given, the `db` application component will be used.
+ * @param Connection $db the database connection used to generate the SQL statement.
+ * 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)
{
@@ -235,10 +235,10 @@ class Query extends Component implements QueryInterface
/**
* Returns the query result as a scalar value.
* The value returned will be the first column in the first row of the query results.
- * @param Connection $db the database connection used to generate the SQL statement.
- * If this parameter is not given, the `db` application component will be used.
+ * @param Connection $db the database connection used to generate the SQL statement.
+ * If this parameter is not given, the `db` application component will be used.
* @return string|boolean the value of the first column in the first row of the query result.
- * False is returned if the query result is empty.
+ * False is returned if the query result is empty.
*/
public function scalar($db = null)
{
@@ -247,9 +247,9 @@ class Query extends Component implements QueryInterface
/**
* Executes the query and returns the first column of the result.
- * @param Connection $db the database connection used to generate the SQL statement.
- * If this parameter is not given, the `db` application component will be used.
- * @return array the first column of the query result. An empty array is returned if the query results in nothing.
+ * @param Connection $db the database connection used to generate the SQL statement.
+ * If this parameter is not given, the `db` application component will be used.
+ * @return array the first column of the query result. An empty array is returned if the query results in nothing.
*/
public function column($db = null)
{
@@ -258,11 +258,11 @@ class Query extends Component implements QueryInterface
/**
* Returns the number of records.
- * @param string $q the COUNT expression. Defaults to '*'.
- * Make sure you properly quote column names in the expression.
- * @param Connection $db the database connection used to generate the SQL statement.
- * If this parameter is not given (or null), the `db` application component will be used.
- * @return integer number of records
+ * @param string $q the COUNT expression. Defaults to '*'.
+ * Make sure you properly quote column names in the expression.
+ * @param Connection $db the database connection used to generate the SQL statement.
+ * If this parameter is not given (or null), the `db` application component will be used.
+ * @return integer number of records
*/
public function count($q = '*', $db = null)
{
@@ -271,11 +271,11 @@ class Query extends Component implements QueryInterface
/**
* Returns the sum of the specified column values.
- * @param string $q the column name or expression.
- * Make sure you properly quote column names in the expression.
- * @param Connection $db the database connection used to generate the SQL statement.
- * If this parameter is not given, the `db` application component will be used.
- * @return integer the sum of the specified column values
+ * @param string $q the column name or expression.
+ * Make sure you properly quote column names in the expression.
+ * @param Connection $db the database connection used to generate the SQL statement.
+ * If this parameter is not given, the `db` application component will be used.
+ * @return integer the sum of the specified column values
*/
public function sum($q, $db = null)
{
@@ -284,11 +284,11 @@ class Query extends Component implements QueryInterface
/**
* Returns the average of the specified column values.
- * @param string $q the column name or expression.
- * Make sure you properly quote column names in the expression.
- * @param Connection $db the database connection used to generate the SQL statement.
- * If this parameter is not given, the `db` application component will be used.
- * @return integer the average of the specified column values.
+ * @param string $q the column name or expression.
+ * Make sure you properly quote column names in the expression.
+ * @param Connection $db the database connection used to generate the SQL statement.
+ * If this parameter is not given, the `db` application component will be used.
+ * @return integer the average of the specified column values.
*/
public function average($q, $db = null)
{
@@ -297,11 +297,11 @@ class Query extends Component implements QueryInterface
/**
* Returns the minimum of the specified column values.
- * @param string $q the column name or expression.
- * Make sure you properly quote column names in the expression.
- * @param Connection $db the database connection used to generate the SQL statement.
- * If this parameter is not given, the `db` application component will be used.
- * @return integer the minimum of the specified column values.
+ * @param string $q the column name or expression.
+ * Make sure you properly quote column names in the expression.
+ * @param Connection $db the database connection used to generate the SQL statement.
+ * If this parameter is not given, the `db` application component will be used.
+ * @return integer the minimum of the specified column values.
*/
public function min($q, $db = null)
{
@@ -310,11 +310,11 @@ class Query extends Component implements QueryInterface
/**
* Returns the maximum of the specified column values.
- * @param string $q the column name or expression.
- * Make sure you properly quote column names in the expression.
- * @param Connection $db the database connection used to generate the SQL statement.
- * If this parameter is not given, the `db` application component will be used.
- * @return integer the maximum of the specified column values.
+ * @param string $q the column name or expression.
+ * Make sure you properly quote column names in the expression.
+ * @param Connection $db the database connection used to generate the SQL statement.
+ * If this parameter is not given, the `db` application component will be used.
+ * @return integer the maximum of the specified column values.
*/
public function max($q, $db = null)
{
@@ -323,9 +323,9 @@ class Query extends Component implements QueryInterface
/**
* Returns a value indicating whether the query result contains any row of data.
- * @param Connection $db the database connection used to generate the SQL statement.
- * 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 generate the SQL statement.
+ * 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)
{
@@ -340,8 +340,8 @@ class Query extends Component implements QueryInterface
/**
* Queries a scalar value by setting [[select]] first.
* Restores the value of select to make this query reusable.
- * @param string|Expression $selectExpression
- * @param Connection|null $db
+ * @param string|Expression $selectExpression
+ * @param Connection|null $db
* @return bool|string
*/
private function queryScalar($selectExpression, $db)
@@ -372,10 +372,10 @@ class Query extends Component implements QueryInterface
/**
* Sets the SELECT part of the query.
* @param string|array $columns the columns to be selected.
- * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']).
- * Columns can contain table prefixes (e.g. "tbl_user.id") and/or column aliases (e.g. "tbl_user.id AS user_id").
- * The method will automatically quote the column names unless a column contains some parenthesis
- * (which means the column contains a DB expression).
+ * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']).
+ * Columns can contain table prefixes (e.g. "tbl_user.id") and/or column aliases (e.g. "tbl_user.id AS user_id").
+ * 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 you are selecting an expression like `CONCAT(first_name, ' ', last_name)`, you should
* use an array to specify the columns. Otherwise, the expression may be incorrectly split into several parts.
@@ -383,8 +383,8 @@ class Query extends Component implements QueryInterface
* When the columns are specified as an array, you may also use array keys as the column aliases (if a column
* does not need alias, do not use a string key).
*
- * @param string $option additional option that should be appended to the 'SELECT' keyword. For example,
- * in MySQL, the option 'SQL_CALC_FOUND_ROWS' can be used.
+ * @param string $option additional option that should be appended to the 'SELECT' keyword. For example,
+ * in MySQL, the option 'SQL_CALC_FOUND_ROWS' can be used.
* @return static the query object itself
*/
public function select($columns, $option = null)
@@ -400,8 +400,8 @@ class Query extends Component implements QueryInterface
/**
* Sets the value indicating whether to SELECT DISTINCT or not.
- * @param boolean $value whether to SELECT DISTINCT or not.
- * @return static the query object itself
+ * @param boolean $value whether to SELECT DISTINCT or not.
+ * @return static the query object itself
*/
public function distinct($value = true)
{
@@ -413,10 +413,10 @@ class Query extends Component implements QueryInterface
/**
* Sets the FROM part of the query.
* @param string|array $tables the table(s) to be selected from. This can be either a string (e.g. `'tbl_user'`)
- * or an array (e.g. `['tbl_user', 'tbl_profile']`) specifying one or several table names.
- * Table names can contain schema prefixes (e.g. `'public.tbl_user'`) and/or table aliases (e.g. `'tbl_user u'`).
- * The method will automatically quote the table names unless it contains some parenthesis
- * (which means the table is given as a sub-query or DB expression).
+ * or an array (e.g. `['tbl_user', 'tbl_profile']`) specifying one or several table names.
+ * Table names can contain schema prefixes (e.g. `'public.tbl_user'`) and/or table aliases (e.g. `'tbl_user u'`).
+ * The method will automatically quote the table names unless it contains some parenthesis
+ * (which means the table is given as a sub-query or DB expression).
*
* When the tables are specified as an array, you may also use the array keys as the table aliases
* (if a table does not need alias, do not use a string key).
@@ -506,9 +506,9 @@ class Query extends Component implements QueryInterface
*
* - `not exists`: similar to the `exists` operator and builds a `NOT EXISTS (sub-query)` expression.
*
- * @param string|array $condition the conditions that should be put in the WHERE part.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return static the query object itself
+ * @param string|array $condition the conditions that should be put in the WHERE part.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return static the query object itself
* @see andWhere()
* @see orWhere()
*/
@@ -523,10 +523,10 @@ class Query extends Component implements 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.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return static the query object itself
+ * @param string|array $condition the new WHERE condition. Please refer to [[where()]]
+ * on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return static the query object itself
* @see where()
* @see orWhere()
*/
@@ -545,10 +545,10 @@ class Query extends Component implements 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.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return static the query object itself
+ * @param string|array $condition the new WHERE condition. Please refer to [[where()]]
+ * on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return static the query object itself
* @see where()
* @see andWhere()
*/
@@ -567,7 +567,7 @@ class Query extends Component implements QueryInterface
/**
* Appends a JOIN part to the query.
* The first parameter specifies what type of join it is.
- * @param string $type the type of join, such as INNER JOIN, LEFT JOIN.
+ * @param string $type the type of join, such as INNER JOIN, LEFT JOIN.
* @param string|array $table the table to be joined.
*
* Use string to represent the name of the table to be joined.
@@ -579,10 +579,10 @@ class Query extends Component implements QueryInterface
* The value must be a Query object representing the sub-query while the corresponding key
* represents the alias for the sub-query.
*
- * @param string|array $on the join condition that should appear in the ON part.
- * Please refer to [[where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return Query the query object itself
+ * @param string|array $on the join condition that should appear in the ON part.
+ * Please refer to [[where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return Query the query object itself
*/
public function join($type, $table, $on = '', $params = [])
{
@@ -604,10 +604,10 @@ class Query extends Component implements QueryInterface
* The value must be a Query object representing the sub-query while the corresponding key
* represents the alias for the sub-query.
*
- * @param string|array $on the join condition that should appear in the ON part.
- * Please refer to [[where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return Query the query object itself
+ * @param string|array $on the join condition that should appear in the ON part.
+ * Please refer to [[where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return Query the query object itself
*/
public function innerJoin($table, $on = '', $params = [])
{
@@ -629,10 +629,10 @@ class Query extends Component implements QueryInterface
* The value must be a Query object representing the sub-query while the corresponding key
* represents the alias for the sub-query.
*
- * @param string|array $on the join condition that should appear in the ON part.
- * Please refer to [[where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query
- * @return Query the query object itself
+ * @param string|array $on the join condition that should appear in the ON part.
+ * Please refer to [[where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query
+ * @return Query the query object itself
*/
public function leftJoin($table, $on = '', $params = [])
{
@@ -654,10 +654,10 @@ class Query extends Component implements QueryInterface
* The value must be a Query object representing the sub-query while the corresponding key
* represents the alias for the sub-query.
*
- * @param string|array $on the join condition that should appear in the ON part.
- * Please refer to [[where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query
- * @return Query the query object itself
+ * @param string|array $on the join condition that should appear in the ON part.
+ * Please refer to [[where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query
+ * @return Query the query object itself
*/
public function rightJoin($table, $on = '', $params = [])
{
@@ -668,11 +668,11 @@ class Query extends Component implements QueryInterface
/**
* Sets the GROUP BY part of the query.
- * @param string|array $columns the columns to be grouped by.
- * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']).
- * 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 to be grouped by.
+ * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']).
+ * 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 addGroupBy()
*/
public function groupBy($columns)
@@ -687,11 +687,11 @@ class Query extends Component implements QueryInterface
/**
* Adds additional group-by columns to the existing ones.
- * @param string|array $columns additional columns to be grouped by.
- * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']).
- * 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 additional columns to be grouped by.
+ * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']).
+ * 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 groupBy()
*/
public function addGroupBy($columns)
@@ -710,10 +710,10 @@ class Query extends Component implements QueryInterface
/**
* Sets the HAVING part of the query.
- * @param string|array $condition the conditions to be put after HAVING.
- * Please refer to [[where()]] on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return static the query object itself
+ * @param string|array $condition the conditions to be put after HAVING.
+ * Please refer to [[where()]] on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return static the query object itself
* @see andHaving()
* @see orHaving()
*/
@@ -728,10 +728,10 @@ class Query extends Component implements QueryInterface
/**
* Adds an additional HAVING 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 HAVING condition. Please refer to [[where()]]
- * on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return static the query object itself
+ * @param string|array $condition the new HAVING condition. Please refer to [[where()]]
+ * on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return static the query object itself
* @see having()
* @see orHaving()
*/
@@ -750,10 +750,10 @@ class Query extends Component implements QueryInterface
/**
* Adds an additional HAVING 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 HAVING condition. Please refer to [[where()]]
- * on how to specify this parameter.
- * @param array $params the parameters (name => value) to be bound to the query.
- * @return static the query object itself
+ * @param string|array $condition the new HAVING condition. Please refer to [[where()]]
+ * on how to specify this parameter.
+ * @param array $params the parameters (name => value) to be bound to the query.
+ * @return static the query object itself
* @see having()
* @see andHaving()
*/
@@ -771,9 +771,9 @@ class Query extends Component implements QueryInterface
/**
* Appends a SQL statement using UNION operator.
- * @param string|Query $sql the SQL statement to be appended using UNION
- * @param boolean $all TRUE if using UNION ALL and FALSE if using UNION
- * @return static the query object itself
+ * @param string|Query $sql the SQL statement to be appended using UNION
+ * @param boolean $all TRUE if using UNION ALL and FALSE if using UNION
+ * @return static the query object itself
*/
public function union($sql, $all = false)
{
@@ -784,8 +784,8 @@ class Query extends Component implements QueryInterface
/**
* Sets the parameters to be bound to the query.
- * @param array $params list of query parameter values indexed by parameter placeholders.
- * For example, `[':name' => 'Dan', ':age' => 31]`.
+ * @param array $params list of query parameter values indexed by parameter placeholders.
+ * For example, `[':name' => 'Dan', ':age' => 31]`.
* @return static the query object itself
* @see addParams()
*/
@@ -798,8 +798,8 @@ class Query extends Component implements QueryInterface
/**
* Adds additional parameters to be bound to the query.
- * @param array $params list of query parameter values indexed by parameter placeholders.
- * For example, `[':name' => 'Dan', ':age' => 31]`.
+ * @param array $params list of query parameter values indexed by parameter placeholders.
+ * For example, `[':name' => 'Dan', ':age' => 31]`.
* @return static the query object itself
* @see params()
*/
diff --git a/framework/db/QueryBuilder.php b/framework/db/QueryBuilder.php
index cc944cc36a..1c94b34f1e 100644
--- a/framework/db/QueryBuilder.php
+++ b/framework/db/QueryBuilder.php
@@ -45,7 +45,7 @@ class QueryBuilder extends \yii\base\Object
/**
* Constructor.
* @param Connection $connection the database connection.
- * @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($connection, $config = [])
{
@@ -55,12 +55,12 @@ class QueryBuilder extends \yii\base\Object
/**
* Generates a SELECT SQL statement from a [[Query]] object.
- * @param Query $query the [[Query]] object from which the SQL statement will be generated.
- * @param array $params the parameters to be bound to the generated SQL statement. These parameters will
- * be included in the result with the additional parameters generated during the query building process.
+ * @param Query $query the [[Query]] object from which the SQL statement will be generated.
+ * @param array $params the parameters to be bound to the generated SQL statement. These parameters will
+ * be included in the result with the additional parameters generated during the query building process.
* @return array the generated SQL statement (the first array element) and the corresponding
- * parameters to be bound to the SQL statement (the second array element). The parameters returned
- * include those provided in `$params`.
+ * parameters to be bound to the SQL statement (the second array element). The parameters returned
+ * include those provided in `$params`.
*/
public function build($query, $params = [])
{
@@ -112,10 +112,10 @@ class QueryBuilder extends \yii\base\Object
*
* The method will properly escape the table and column names.
*
- * @param string $table the table that new rows will be inserted into.
- * @param array $columns the column data (name => value) to be inserted into the table.
- * @param array $params the binding parameters that will be generated by this method.
- * They should be bound to the DB command later.
+ * @param string $table the table that new rows will be inserted into.
+ * @param array $columns the column data (name => value) to be inserted into the table.
+ * @param array $params the binding parameters that will be generated by this method.
+ * They should be bound to the DB command later.
* @return string the INSERT SQL
*/
public function insert($table, $columns, &$params)
@@ -160,9 +160,9 @@ class QueryBuilder extends \yii\base\Object
*
* Note that the values in each row must match the corresponding column names.
*
- * @param string $table the table that new rows will be inserted into.
- * @param array $columns the column names
- * @param array $rows the rows to be batch inserted into the table
+ * @param string $table the table that new rows will be inserted into.
+ * @param array $columns the column names
+ * @param array $rows the rows to be batch inserted into the table
* @return string the batch INSERT SQL statement
*/
public function batchInsert($table, $columns, $rows)
@@ -211,13 +211,13 @@ class QueryBuilder extends \yii\base\Object
*
* The method will properly escape the table and column names.
*
- * @param string $table the table to be updated.
- * @param array $columns the column data (name => value) to be updated.
- * @param array|string $condition the condition that will be put in the WHERE part. Please
- * refer to [[Query::where()]] on how to specify condition.
- * @param array $params the binding parameters that will be modified by this method
- * so that they can be bound to the DB command later.
- * @return string the UPDATE SQL
+ * @param string $table the table to be updated.
+ * @param array $columns the column data (name => value) to be updated.
+ * @param array|string $condition the condition that will be put in the WHERE part. Please
+ * refer to [[Query::where()]] on how to specify condition.
+ * @param array $params the binding parameters that will be modified by this method
+ * so that they can be bound to the DB command later.
+ * @return string the UPDATE SQL
*/
public function update($table, $columns, $condition, &$params)
{
@@ -257,12 +257,12 @@ class QueryBuilder extends \yii\base\Object
*
* The method will properly escape the table and column names.
*
- * @param string $table the table where the data will be deleted from.
- * @param array|string $condition the condition that will be put in the WHERE part. Please
- * refer to [[Query::where()]] on how to specify condition.
- * @param array $params the binding parameters that will be modified by this method
- * so that they can be bound to the DB command later.
- * @return string the DELETE SQL
+ * @param string $table the table where the data will be deleted from.
+ * @param array|string $condition the condition that will be put in the WHERE part. Please
+ * refer to [[Query::where()]] on how to specify condition.
+ * @param array $params the binding parameters that will be modified by this method
+ * so that they can be bound to the DB command later.
+ * @return string the DELETE SQL
*/
public function delete($table, $condition, &$params)
{
@@ -293,9 +293,9 @@ class QueryBuilder extends \yii\base\Object
* ]);
* ~~~
*
- * @param string $table the name of the table to be created. The name will be properly quoted by the method.
- * @param array $columns the columns (name => definition) in the new table.
- * @param string $options additional SQL fragment that will be appended to the generated SQL.
+ * @param string $table the name of the table to be created. The name will be properly quoted by the method.
+ * @param array $columns the columns (name => definition) in the new table.
+ * @param string $options additional SQL fragment that will be appended to the generated SQL.
* @return string the SQL statement for creating a new DB table.
*/
public function createTable($table, $columns, $options = null)
@@ -315,8 +315,8 @@ class QueryBuilder extends \yii\base\Object
/**
* 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)
@@ -326,7 +326,7 @@ class QueryBuilder extends \yii\base\Object
/**
* Builds a SQL statement for dropping a DB table.
- * @param string $table the table to be dropped. The name will be properly quoted by the method.
+ * @param string $table the table to be dropped. The name will be properly quoted by the method.
* @return string the SQL statement for dropping a DB table.
*/
public function dropTable($table)
@@ -336,10 +336,10 @@ class QueryBuilder extends \yii\base\Object
/**
* Builds a SQL statement for adding a primary key constraint to an existing table.
- * @param string $name the name of the primary key constraint.
- * @param string $table the table that the primary key constraint will be added to.
- * @param string|array $columns comma separated string or array of columns that the primary key will consist of.
- * @return string the SQL statement for adding a primary key constraint to an existing table.
+ * @param string $name the name of the primary key constraint.
+ * @param string $table the table that the primary key constraint will be added to.
+ * @param string|array $columns comma separated string or array of columns that the primary key will consist of.
+ * @return string the SQL statement for adding a primary key constraint to an existing table.
*/
public function addPrimaryKey($name, $table, $columns)
{
@@ -358,8 +358,8 @@ class QueryBuilder extends \yii\base\Object
/**
* 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)
@@ -370,7 +370,7 @@ class QueryBuilder extends \yii\base\Object
/**
* Builds a SQL statement for truncating a DB table.
- * @param string $table the table to be truncated. The name will be properly quoted by the method.
+ * @param string $table the table to be truncated. The name will be properly quoted by the method.
* @return string the SQL statement for truncating a DB table.
*/
public function truncateTable($table)
@@ -380,11 +380,11 @@ class QueryBuilder extends \yii\base\Object
/**
* Builds a SQL statement for adding a new DB column.
- * @param string $table the table that the new column will be added to. The table name will be properly quoted by the method.
- * @param string $column the name of the new column. The name will be properly quoted by the method.
- * @param string $type the 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 that the new column will be added to. The table name will be properly quoted by the method.
+ * @param string $column the name of the new column. The name will be properly quoted by the method.
+ * @param string $type the 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 adding a new column.
*/
public function addColumn($table, $column, $type)
@@ -396,8 +396,8 @@ class QueryBuilder extends \yii\base\Object
/**
* Builds a SQL statement for dropping a DB column.
- * @param string $table the table whose column is to be dropped. The name will be properly quoted by the method.
- * @param string $column the name of the column to be dropped. The name will be properly quoted by the method.
+ * @param string $table the table whose column is to be dropped. The name will be properly quoted by the method.
+ * @param string $column the name of the column to be dropped. The name will be properly quoted by the method.
* @return string the SQL statement for dropping a DB column.
*/
public function dropColumn($table, $column)
@@ -408,9 +408,9 @@ class QueryBuilder extends \yii\base\Object
/**
* 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.
+ * @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.
*/
public function renameColumn($table, $oldName, $newName)
@@ -422,12 +422,12 @@ class QueryBuilder extends \yii\base\Object
/**
* 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)
@@ -441,16 +441,16 @@ class QueryBuilder extends \yii\base\Object
/**
* Builds a SQL statement for adding a foreign key constraint to an existing table.
* The method will properly quote the table and column names.
- * @param string $name the name of the foreign key constraint.
- * @param string $table the table that the foreign key constraint will be added to.
- * @param string|array $columns the name of the column to that the constraint will be added on.
- * If there are multiple columns, separate them with commas or use an array to represent them.
- * @param string $refTable the table that the foreign key references to.
- * @param string|array $refColumns the name of the column that the foreign key references to.
- * If there are multiple columns, separate them with commas or use an array to represent them.
- * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
- * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
- * @return string the SQL statement for adding a foreign key constraint to an existing table.
+ * @param string $name the name of the foreign key constraint.
+ * @param string $table the table that the foreign key constraint will be added to.
+ * @param string|array $columns the name of the column to that the constraint will be added on.
+ * If there are multiple columns, separate them with commas or use an array to represent them.
+ * @param string $refTable the table that the foreign key references to.
+ * @param string|array $refColumns the name of the column that the foreign key references to.
+ * If there are multiple columns, separate them with commas or use an array to represent them.
+ * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
+ * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
+ * @return string the SQL statement for adding a foreign key constraint to an existing table.
*/
public function addForeignKey($name, $table, $columns, $refTable, $refColumns, $delete = null, $update = null)
{
@@ -471,8 +471,8 @@ class QueryBuilder extends \yii\base\Object
/**
* 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)
@@ -483,13 +483,13 @@ class QueryBuilder extends \yii\base\Object
/**
* Builds a SQL statement for creating a new index.
- * @param string $name the name of the index. The name will be properly quoted by the method.
- * @param string $table the table that the new index will be created for. The table name will be properly quoted by the method.
- * @param string|array $columns the column(s) that should be included in the index. If there are multiple columns,
- * separate them with commas or use an array to represent them. Each column name will be properly quoted
- * by the method, unless a parenthesis is found in the name.
- * @param boolean $unique whether to add UNIQUE constraint on the created index.
- * @return string the SQL statement for creating a new index.
+ * @param string $name the name of the index. The name will be properly quoted by the method.
+ * @param string $table the table that the new index will be created for. The table name will be properly quoted by the method.
+ * @param string|array $columns the column(s) that should be included in the index. If there are multiple columns,
+ * separate them with commas or use an array to represent them. Each column name will be properly quoted
+ * by the method, unless a parenthesis is found in the name.
+ * @param boolean $unique whether to add UNIQUE constraint on the created index.
+ * @return string the SQL statement for creating a new index.
*/
public function createIndex($name, $table, $columns, $unique = false)
{
@@ -501,8 +501,8 @@ class QueryBuilder extends \yii\base\Object
/**
* 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)
@@ -514,10 +514,10 @@ class QueryBuilder extends \yii\base\Object
* 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 $table the name of the table whose primary key sequence will be reset
- * @param array|string $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 $table the name of the table whose primary key sequence will be reset
+ * @param array|string $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 NotSupportedException if this is not supported by the underlying DBMS
*/
public function resetSequence($table, $value = null)
@@ -527,10 +527,10 @@ class QueryBuilder extends \yii\base\Object
/**
* 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 NotSupportedException if this is not supported by the underlying DBMS
*/
public function checkIntegrity($check = true, $schema = '', $table = '')
@@ -572,7 +572,7 @@ class QueryBuilder extends \yii\base\Object
* be ignored.
*
* If a type cannot be found in [[typeMap]], it will be returned without any change.
- * @param string $type abstract column type
+ * @param string $type abstract column type
* @return string physical column type.
*/
public function getColumnType($type)
@@ -593,11 +593,11 @@ class QueryBuilder extends \yii\base\Object
}
/**
- * @param array $columns
- * @param array $params the binding parameters to be populated
- * @param boolean $distinct
- * @param string $selectOption
- * @return string the SELECT clause built from [[Query::$select]].
+ * @param array $columns
+ * @param array $params the binding parameters to be populated
+ * @param boolean $distinct
+ * @param string $selectOption
+ * @return string the SELECT clause built from [[Query::$select]].
*/
public function buildSelect($columns, &$params, $distinct = false, $selectOption = null)
{
@@ -632,8 +632,8 @@ class QueryBuilder extends \yii\base\Object
}
/**
- * @param array $tables
- * @param array $params the binding parameters to be populated
+ * @param array $tables
+ * @param array $params the binding parameters to be populated
* @return string the FROM clause built from [[Query::$from]].
*/
public function buildFrom($tables, &$params)
@@ -664,9 +664,9 @@ class QueryBuilder extends \yii\base\Object
}
/**
- * @param array $joins
- * @param array $params the binding parameters to be populated
- * @return string the JOIN clause built from [[Query::$join]].
+ * @param array $joins
+ * @param array $params the binding parameters to be populated
+ * @return string the JOIN clause built from [[Query::$join]].
* @throws Exception if the $joins parameter is not in proper format
*/
public function buildJoin($joins, &$params)
@@ -709,9 +709,9 @@ class QueryBuilder extends \yii\base\Object
}
/**
- * @param string|array $condition
- * @param array $params the binding parameters to be populated
- * @return string the WHERE clause built from [[Query::$where]].
+ * @param string|array $condition
+ * @param array $params the binding parameters to be populated
+ * @return string the WHERE clause built from [[Query::$where]].
*/
public function buildWhere($condition, &$params)
{
@@ -721,7 +721,7 @@ class QueryBuilder extends \yii\base\Object
}
/**
- * @param array $columns
+ * @param array $columns
* @return string the GROUP BY clause
*/
public function buildGroupBy($columns)
@@ -730,9 +730,9 @@ class QueryBuilder extends \yii\base\Object
}
/**
- * @param string|array $condition
- * @param array $params the binding parameters to be populated
- * @return string the HAVING clause built from [[Query::$having]].
+ * @param string|array $condition
+ * @param array $params the binding parameters to be populated
+ * @return string the HAVING clause built from [[Query::$having]].
*/
public function buildHaving($condition, &$params)
{
@@ -742,7 +742,7 @@ class QueryBuilder extends \yii\base\Object
}
/**
- * @param array $columns
+ * @param array $columns
* @return string the ORDER BY clause built from [[Query::$orderBy]].
*/
public function buildOrderBy($columns)
@@ -763,9 +763,9 @@ class QueryBuilder extends \yii\base\Object
}
/**
- * @param integer $limit
- * @param integer $offset
- * @return string the LIMIT and OFFSET clauses built from [[Query::$limit]].
+ * @param integer $limit
+ * @param integer $offset
+ * @return string the LIMIT and OFFSET clauses built from [[Query::$limit]].
*/
public function buildLimit($limit, $offset)
{
@@ -782,7 +782,7 @@ class QueryBuilder extends \yii\base\Object
/**
* Checks to see if the given limit is effective.
- * @param mixed $limit the given limit
+ * @param mixed $limit the given limit
* @return boolean whether the limit is effective
*/
protected function hasLimit($limit)
@@ -792,7 +792,7 @@ class QueryBuilder extends \yii\base\Object
/**
* Checks to see if the given offset is effective.
- * @param mixed $offset the given offset
+ * @param mixed $offset the given offset
* @return boolean whether the offset is effective
*/
protected function hasOffset($offset)
@@ -801,8 +801,8 @@ class QueryBuilder extends \yii\base\Object
}
/**
- * @param array $unions
- * @param array $params the binding parameters to be populated
+ * @param array $unions
+ * @param array $params the binding parameters to be populated
* @return string the UNION clause built from [[Query::$union]].
*/
public function buildUnion($unions, &$params)
@@ -828,8 +828,8 @@ class QueryBuilder extends \yii\base\Object
/**
* Processes columns and properly quote them if necessary.
* It will join all columns into a string with comma as separators.
- * @param string|array $columns the columns to be processed
- * @return string the processing result
+ * @param string|array $columns the columns to be processed
+ * @return string the processing result
*/
public function buildColumns($columns)
{
@@ -853,10 +853,10 @@ class QueryBuilder extends \yii\base\Object
/**
* Parses the condition specification and generates the corresponding SQL expression.
- * @param string|array $condition the condition specification. Please refer to [[Query::where()]]
- * on how to specify a condition.
- * @param array $params the binding parameters to be populated
- * @return string the generated SQL expression
+ * @param string|array $condition the condition specification. Please refer to [[Query::where()]]
+ * on how to specify a condition.
+ * @param array $params the binding parameters to be populated
+ * @return string the generated SQL expression
* @throws InvalidParamException if the condition is in bad format
*/
public function buildCondition($condition, &$params)
@@ -900,8 +900,8 @@ class QueryBuilder extends \yii\base\Object
/**
* Creates a condition based on column-value pairs.
- * @param array $condition the condition specification.
- * @param array $params the binding parameters to be populated
+ * @param array $condition the condition specification.
+ * @param array $params the binding parameters to be populated
* @return string the generated SQL expression
*/
public function buildHashCondition($condition, &$params)
@@ -934,9 +934,9 @@ class QueryBuilder extends \yii\base\Object
/**
* Connects two or more SQL expressions with the `AND` or `OR` operator.
- * @param string $operator the operator to use for connecting the given operands
- * @param array $operands the SQL expressions to connect.
- * @param array $params the binding parameters to be populated
+ * @param string $operator the operator to use for connecting the given operands
+ * @param array $operands the SQL expressions to connect.
+ * @param array $params the binding parameters to be populated
* @return string the generated SQL expression
*/
public function buildAndCondition($operator, $operands, &$params)
@@ -959,10 +959,10 @@ class QueryBuilder extends \yii\base\Object
/**
* Inverts an SQL expressions with `NOT` operator.
- * @param string $operator the operator to use for connecting the given operands
- * @param array $operands the SQL expressions to connect.
- * @param array $params the binding parameters to be populated
- * @return string the generated SQL expression
+ * @param string $operator the operator to use for connecting the given operands
+ * @param array $operands the SQL expressions to connect.
+ * @param array $params the binding parameters to be populated
+ * @return string the generated SQL expression
* @throws InvalidParamException if wrong number of operands have been given.
*/
public function buildNotCondition($operator, $operands, &$params)
@@ -984,11 +984,11 @@ class QueryBuilder extends \yii\base\Object
/**
* Creates an SQL expressions with the `BETWEEN` operator.
- * @param string $operator the operator to use (e.g. `BETWEEN` or `NOT BETWEEN`)
- * @param array $operands the first operand is the column name. The second and third operands
- * describe the interval that column value should be in.
- * @param array $params the binding parameters to be populated
- * @return string the generated SQL expression
+ * @param string $operator the operator to use (e.g. `BETWEEN` or `NOT BETWEEN`)
+ * @param array $operands the first operand is the column name. The second and third operands
+ * describe the interval that column value should be in.
+ * @param array $params the binding parameters to be populated
+ * @return string the generated SQL expression
* @throws InvalidParamException if wrong number of operands have been given.
*/
public function buildBetweenCondition($operator, $operands, &$params)
@@ -1012,14 +1012,14 @@ class QueryBuilder extends \yii\base\Object
/**
* Creates an SQL expressions with the `IN` operator.
- * @param string $operator the operator to use (e.g. `IN` or `NOT IN`)
- * @param array $operands the first operand is the column name. If it is an array
- * a composite IN condition will be generated.
- * The second operand is an array of values that column value should be among.
- * If it is an empty array the generated expression will be a `false` value if
- * operator is `IN` and empty if operator is `NOT IN`.
- * @param array $params the binding parameters to be populated
- * @return string the generated SQL expression
+ * @param string $operator the operator to use (e.g. `IN` or `NOT IN`)
+ * @param array $operands the first operand is the column name. If it is an array
+ * a composite IN condition will be generated.
+ * The second operand is an array of values that column value should be among.
+ * If it is an empty array the generated expression will be a `false` value if
+ * operator is `IN` and empty if operator is `NOT IN`.
+ * @param array $params the binding parameters to be populated
+ * @return string the generated SQL expression
* @throws Exception if wrong number of operands have been given.
*/
public function buildInCondition($operator, $operands, &$params)
@@ -1099,7 +1099,7 @@ class QueryBuilder extends \yii\base\Object
/**
* Creates an SQL expressions with the `LIKE` operator.
* @param string $operator the operator to use (e.g. `LIKE`, `NOT LIKE`, `OR LIKE` or `OR NOT LIKE`)
- * @param array $operands an array of two or three operands
+ * @param array $operands an array of two or three operands
*
* - The first operand is the column name.
* - The second operand is a single value or an array of values that column value
@@ -1112,8 +1112,8 @@ class QueryBuilder extends \yii\base\Object
* You may use `false` or an empty array to indicate the values are already escaped and no escape
* should be applied. Note that when using an escape mapping (or the third operand is not provided),
* the values will be automatically enclosed within a pair of percentage characters.
- * @param array $params the binding parameters to be populated
- * @return string the generated SQL expression
+ * @param array $params the binding parameters to be populated
+ * @return string the generated SQL expression
* @throws InvalidParamException if wrong number of operands have been given.
*/
public function buildLikeCondition($operator, $operands, &$params)
@@ -1156,10 +1156,10 @@ class QueryBuilder extends \yii\base\Object
/**
* Creates an SQL expressions with the `EXISTS` operator.
- * @param string $operator the operator to use (e.g. `EXISTS` or `NOT EXISTS`)
- * @param array $operands contains only one element which is a [[Query]] object representing the sub-query.
- * @param array $params the binding parameters to be populated
- * @return string the generated SQL expression
+ * @param string $operator the operator to use (e.g. `EXISTS` or `NOT EXISTS`)
+ * @param array $operands contains only one element which is a [[Query]] object representing the sub-query.
+ * @param array $params the binding parameters to be populated
+ * @return string the generated SQL expression
* @throws InvalidParamException if the operand is not a [[Query]] object.
*/
public function buildExistsCondition($operator, $operands, &$params)
diff --git a/framework/db/QueryInterface.php b/framework/db/QueryInterface.php
index 8bfac52cda..090ce7c370 100644
--- a/framework/db/QueryInterface.php
+++ b/framework/db/QueryInterface.php
@@ -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);
}
diff --git a/framework/db/QueryTrait.php b/framework/db/QueryTrait.php
index 363aa5f33f..5fca3ec5d4 100644
--- a/framework/db/QueryTrait.php
+++ b/framework/db/QueryTrait.php
@@ -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)
{
diff --git a/framework/db/Schema.php b/framework/db/Schema.php
index 7ad78f8027..7cdb46ccf2 100644
--- a/framework/db/Schema.php
+++ b/framework/db/Schema.php
@@ -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)
{
diff --git a/framework/db/TableSchema.php b/framework/db/TableSchema.php
index 86b925dc28..48723a47db 100644
--- a/framework/db/TableSchema.php
+++ b/framework/db/TableSchema.php
@@ -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)
diff --git a/framework/db/Transaction.php b/framework/db/Transaction.php
index d40c7d691e..f524604d82 100644
--- a/framework/db/Transaction.php
+++ b/framework/db/Transaction.php
@@ -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()
{
diff --git a/framework/db/cubrid/QueryBuilder.php b/framework/db/cubrid/QueryBuilder.php
index 24603faba1..effeb3ec9f 100644
--- a/framework/db/cubrid/QueryBuilder.php
+++ b/framework/db/cubrid/QueryBuilder.php
@@ -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)
diff --git a/framework/db/cubrid/Schema.php b/framework/db/cubrid/Schema.php
index 816882372e..1e15d231bd 100644
--- a/framework/db/cubrid/Schema.php
+++ b/framework/db/cubrid/Schema.php
@@ -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
*/
diff --git a/framework/db/mssql/PDO.php b/framework/db/mssql/PDO.php
index dc6bb3dbbe..081b0910bb 100644
--- a/framework/db/mssql/PDO.php
+++ b/framework/db/mssql/PDO.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)
{
diff --git a/framework/db/mssql/QueryBuilder.php b/framework/db/mssql/QueryBuilder.php
index 10c7ca4f1d..ef78bdd9b1 100644
--- a/framework/db/mssql/QueryBuilder.php
+++ b/framework/db/mssql/QueryBuilder.php
@@ -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 = '')
diff --git a/framework/db/mssql/Schema.php b/framework/db/mssql/Schema.php
index d73b918be6..65a1662dc0 100644
--- a/framework/db/mssql/Schema.php
+++ b/framework/db/mssql/Schema.php
@@ -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 = '')
{
diff --git a/framework/db/mssql/SqlsrvPDO.php b/framework/db/mssql/SqlsrvPDO.php
index 1f29b4a682..ade96c01c1 100644
--- a/framework/db/mssql/SqlsrvPDO.php
+++ b/framework/db/mssql/SqlsrvPDO.php
@@ -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)
{
diff --git a/framework/db/mysql/QueryBuilder.php b/framework/db/mysql/QueryBuilder.php
index 16a12dc930..18f5ec466a 100644
--- a/framework/db/mysql/QueryBuilder.php
+++ b/framework/db/mysql/QueryBuilder.php
@@ -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 = '')
{
diff --git a/framework/db/mysql/Schema.php b/framework/db/mysql/Schema.php
index 0c19c66fc7..7930679f71 100644
--- a/framework/db/mysql/Schema.php
+++ b/framework/db/mysql/Schema.php
@@ -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 = '')
{
diff --git a/framework/db/oci/QueryBuilder.php b/framework/db/oci/QueryBuilder.php
index b85782d41e..f9b14fd990 100644
--- a/framework/db/oci/QueryBuilder.php
+++ b/framework/db/oci/QueryBuilder.php
@@ -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)
diff --git a/framework/db/oci/Schema.php b/framework/db/oci/Schema.php
index 6fe42f85e9..a109ebf61c 100644
--- a/framework/db/oci/Schema.php
+++ b/framework/db/oci/Schema.php
@@ -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)
{
diff --git a/framework/db/pgsql/QueryBuilder.php b/framework/db/pgsql/QueryBuilder.php
index 932653d894..afb63bd9f0 100644
--- a/framework/db/pgsql/QueryBuilder.php
+++ b/framework/db/pgsql/QueryBuilder.php
@@ -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)
diff --git a/framework/db/pgsql/Schema.php b/framework/db/pgsql/Schema.php
index fb5322f4fe..2e75e133a4 100644
--- a/framework/db/pgsql/Schema.php
+++ b/framework/db/pgsql/Schema.php
@@ -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)
{
@@ -104,7 +104,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)
@@ -114,7 +114,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)
@@ -132,7 +132,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
*/
@@ -155,8 +155,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 = '')
{
@@ -229,8 +229,8 @@ SQL;
/**
* Gets information about given table unique indexes.
- * @param TableSchema $table the table metadata
- * @return array with index names, columns and if it is an expression tree
+ * @param TableSchema $table the table metadata
+ * @return array with index names, columns and if it is an expression tree
*/
protected function getUniqueIndexInformation($table)
{
@@ -271,8 +271,8 @@ SQL;
* ]
* ~~~
*
- * @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)
{
@@ -298,8 +298,8 @@ SQL;
/**
* 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)
{
@@ -386,7 +386,7 @@ SQL;
/**
* 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)
@@ -411,7 +411,6 @@ SQL;
}
$column->phpType = $this->getColumnPhpType($column);
-
return $column;
}
}
diff --git a/framework/db/sqlite/QueryBuilder.php b/framework/db/sqlite/QueryBuilder.php
index e8f6073f94..ba4de8b188 100644
--- a/framework/db/sqlite/QueryBuilder.php
+++ b/framework/db/sqlite/QueryBuilder.php
@@ -55,9 +55,9 @@ class QueryBuilder extends \yii\db\QueryBuilder
*
* Note that the values in each row must match the corresponding column names.
*
- * @param string $table the table that new rows will be inserted into.
- * @param array $columns the column names
- * @param array $rows the rows to be batch inserted into the table
+ * @param string $table the table that new rows will be inserted into.
+ * @param array $columns the column names
+ * @param array $rows the rows to be batch inserted into the table
* @return string the batch INSERT SQL statement
*/
public function batchInsert($table, $columns, $rows)
@@ -99,10 +99,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)
@@ -131,10 +131,10 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Enables or disables integrity check.
- * @param boolean $check whether to turn on or off the integrity check.
- * @param string $schema the schema of the tables. Meaningless for SQLite.
- * @param string $table the table name. Meaningless for SQLite.
- * @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. Meaningless for SQLite.
+ * @param string $table the table name. Meaningless for SQLite.
+ * @return string the SQL statement for checking integrity
* @throws NotSupportedException this is not supported by SQLite
*/
public function checkIntegrity($check = true, $schema = '', $table = '')
@@ -144,7 +144,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for truncating a DB table.
- * @param string $table the table to be truncated. The name will be properly quoted by the method.
+ * @param string $table the table to be truncated. The name will be properly quoted by the method.
* @return string the SQL statement for truncating a DB table.
*/
public function truncateTable($table)
@@ -154,8 +154,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)
@@ -165,9 +165,9 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for dropping a DB column.
- * @param string $table the table whose column is to be dropped. The name will be properly quoted by the method.
- * @param string $column the name of the column to be dropped. The name will be properly quoted by the method.
- * @return string the SQL statement for dropping a DB column.
+ * @param string $table the table whose column is to be dropped. The name will be properly quoted by the method.
+ * @param string $column the name of the column to be dropped. The name will be properly quoted by the method.
+ * @return string the SQL statement for dropping a DB column.
* @throws NotSupportedException this is not supported by SQLite
*/
public function dropColumn($table, $column)
@@ -177,10 +177,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 NotSupportedException this is not supported by SQLite
*/
public function renameColumn($table, $oldName, $newName)
@@ -191,16 +191,16 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for adding a foreign key constraint to an existing table.
* The method will properly quote the table and column names.
- * @param string $name the name of the foreign key constraint.
- * @param string $table the table that the foreign key constraint will be added to.
- * @param string|array $columns the name of the column to that the constraint will be added on.
- * If there are multiple columns, separate them with commas or use an array to represent them.
- * @param string $refTable the table that the foreign key references to.
- * @param string|array $refColumns the name of the column that the foreign key references to.
- * If there are multiple columns, separate them with commas or use an array to represent them.
- * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
- * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
- * @return string the SQL statement for adding a foreign key constraint to an existing table.
+ * @param string $name the name of the foreign key constraint.
+ * @param string $table the table that the foreign key constraint will be added to.
+ * @param string|array $columns the name of the column to that the constraint will be added on.
+ * If there are multiple columns, separate them with commas or use an array to represent them.
+ * @param string $refTable the table that the foreign key references to.
+ * @param string|array $refColumns the name of the column that the foreign key references to.
+ * If there are multiple columns, separate them with commas or use an array to represent them.
+ * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
+ * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
+ * @return string the SQL statement for adding a foreign key constraint to an existing table.
* @throws NotSupportedException this is not supported by SQLite
*/
public function addForeignKey($name, $table, $columns, $refTable, $refColumns, $delete = null, $update = null)
@@ -210,9 +210,9 @@ 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.
- * @return string the 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.
+ * @return string the SQL statement for dropping a foreign key constraint.
* @throws NotSupportedException this is not supported by SQLite
*/
public function dropForeignKey($name, $table)
@@ -222,13 +222,13 @@ 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'.
- * @return string the 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'.
+ * @return string the SQL statement for changing the definition of a column.
* @throws NotSupportedException this is not supported by SQLite
*/
public function alterColumn($table, $column, $type)
@@ -238,10 +238,10 @@ class QueryBuilder extends \yii\db\QueryBuilder
/**
* Builds a SQL statement for adding a primary key constraint to an existing table.
- * @param string $name the name of the primary key constraint.
- * @param string $table the table that the primary key constraint will be added to.
- * @param string|array $columns comma separated string or array of columns that the primary key will consist of.
- * @return string the SQL statement for adding a primary key constraint to an existing table.
+ * @param string $name the name of the primary key constraint.
+ * @param string $table the table that the primary key constraint will be added to.
+ * @param string|array $columns comma separated string or array of columns that the primary key will consist of.
+ * @return string the SQL statement for adding a primary key constraint to an existing table.
* @throws NotSupportedException this is not supported by SQLite
*/
public function addPrimaryKey($name, $table, $columns)
@@ -251,9 +251,9 @@ 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.
- * @return string the SQL statement for removing a primary key constraint from 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.
+ * @return string the SQL statement for removing a primary key constraint from an existing table.
* @throws NotSupportedException this is not supported by SQLite *
*/
public function dropPrimaryKey($name, $table)
diff --git a/framework/db/sqlite/Schema.php b/framework/db/sqlite/Schema.php
index 56da423aa4..c287668d62 100644
--- a/framework/db/sqlite/Schema.php
+++ b/framework/db/sqlite/Schema.php
@@ -54,7 +54,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)
@@ -65,7 +65,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)
@@ -85,8 +85,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 = '')
{
@@ -97,7 +97,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)
@@ -117,8 +117,8 @@ class Schema extends \yii\db\Schema
/**
* Collects the table column metadata.
- * @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)
{
@@ -173,8 +173,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)
{
@@ -199,7 +199,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)
diff --git a/framework/di/ServiceLocator.php b/framework/di/ServiceLocator.php
index ea0b888378..f3f49bc90e 100644
--- a/framework/di/ServiceLocator.php
+++ b/framework/di/ServiceLocator.php
@@ -55,12 +55,11 @@ class ServiceLocator extends Component
*/
private $_definitions = [];
-
/**
* Getter magic method.
* This method is overridden to support accessing components like reading properties.
- * @param string $name component or property name
- * @return mixed the named property value
+ * @param string $name component or property name
+ * @return mixed the named property value
*/
public function __get($name)
{
@@ -74,7 +73,7 @@ class ServiceLocator extends Component
/**
* Checks if a property value is null.
* This method overrides the parent implementation by checking if the named component is loaded.
- * @param string $name the property name or the event name
+ * @param string $name the property name or the event name
* @return boolean whether the property value is null
*/
public function __isset($name)
diff --git a/framework/grid/ActionColumn.php b/framework/grid/ActionColumn.php
index af8f25c172..6193ec0996 100644
--- a/framework/grid/ActionColumn.php
+++ b/framework/grid/ActionColumn.php
@@ -115,11 +115,11 @@ class ActionColumn extends Column
/**
* Creates a URL for the given action and model.
* This method is called for each button and each row.
- * @param string $action the button name (or action ID)
- * @param \yii\db\ActiveRecord $model the data model
- * @param mixed $key the key associated with the data model
- * @param integer $index the current row index
- * @return string the created URL
+ * @param string $action the button name (or action ID)
+ * @param \yii\db\ActiveRecord $model the data model
+ * @param mixed $key the key associated with the data model
+ * @param integer $index the current row index
+ * @return string the created URL
*/
public function createUrl($action, $model, $key, $index)
{
diff --git a/framework/grid/Column.php b/framework/grid/Column.php
index 4da20f4267..945d6c48a1 100644
--- a/framework/grid/Column.php
+++ b/framework/grid/Column.php
@@ -87,10 +87,10 @@ class Column extends Object
/**
* Renders a data cell.
- * @param mixed $model the data model being rendered
- * @param mixed $key the key associated with the data model
- * @param integer $index the zero-based index of the data item among the item array returned by [[GridView::dataProvider]].
- * @return string the rendering result
+ * @param mixed $model the data model being rendered
+ * @param mixed $key the key associated with the data model
+ * @param integer $index the zero-based index of the data item among the item array returned by [[GridView::dataProvider]].
+ * @return string the rendering result
*/
public function renderDataCell($model, $key, $index)
{
@@ -136,10 +136,10 @@ class Column extends Object
/**
* Returns the raw data cell content.
* This method is called by [[renderDataCellContent()]] when rendering the content of a data cell.
- * @param mixed $model the data model
- * @param mixed $key the key associated with the data model
- * @param integer $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]].
- * @return string the rendering result
+ * @param mixed $model the data model
+ * @param mixed $key the key associated with the data model
+ * @param integer $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]].
+ * @return string the rendering result
*/
protected function getDataCellContent($model, $key, $index)
{
@@ -152,10 +152,10 @@ class Column extends Object
/**
* Renders the data cell content.
- * @param mixed $model the data model
- * @param mixed $key the key associated with the data model
- * @param integer $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]].
- * @return string the rendering result
+ * @param mixed $model the data model
+ * @param mixed $key the key associated with the data model
+ * @param integer $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]].
+ * @return string the rendering result
*/
protected function renderDataCellContent($model, $key, $index)
{
diff --git a/framework/grid/GridView.php b/framework/grid/GridView.php
index af37be9ee2..c923fef184 100644
--- a/framework/grid/GridView.php
+++ b/framework/grid/GridView.php
@@ -385,10 +385,10 @@ class GridView extends BaseListView
/**
* Renders a table row with the given data model and key.
- * @param mixed $model the data model to be rendered
- * @param mixed $key the key associated with the data model
- * @param integer $index the zero-based index of the data model among the model array returned by [[dataProvider]].
- * @return string the rendering result
+ * @param mixed $model the data model to be rendered
+ * @param mixed $key the key associated with the data model
+ * @param integer $index the zero-based index of the data model among the model array returned by [[dataProvider]].
+ * @return string the rendering result
*/
public function renderTableRow($model, $key, $index)
{
@@ -434,8 +434,8 @@ class GridView extends BaseListView
/**
* Creates a [[DataColumn]] object based on a string in the format of "attribute:format:label".
- * @param string $text the column specification string
- * @return DataColumn the column instance
+ * @param string $text the column specification string
+ * @return DataColumn the column instance
* @throws InvalidConfigException if the column specification is invalid
*/
protected function createDataColumn($text)
diff --git a/framework/helpers/BaseArrayHelper.php b/framework/helpers/BaseArrayHelper.php
index d0b1a8f5ca..8ead84f93f 100644
--- a/framework/helpers/BaseArrayHelper.php
+++ b/framework/helpers/BaseArrayHelper.php
@@ -23,9 +23,9 @@ class BaseArrayHelper
{
/**
* Converts an object or an array of objects into an array.
- * @param object|array $object the object to be converted into an array
- * @param array $properties a mapping from object class names to the properties that need to put into the resulting arrays.
- * The properties specified for each class is an array of the following format:
+ * @param object|array $object the object to be converted into an array
+ * @param array $properties a mapping from object class names to the properties that need to put into the resulting arrays.
+ * The properties specified for each class is an array of the following format:
*
* ~~~
* [
@@ -53,8 +53,8 @@ class BaseArrayHelper
* ]
* ~~~
*
- * @param boolean $recursive whether to recursively converts properties which are objects into arrays.
- * @return array the array representation of the object
+ * @param boolean $recursive whether to recursively converts properties which are objects into arrays.
+ * @return array the array representation of the object
*/
public static function toArray($object, $properties = [], $recursive = true)
{
@@ -107,9 +107,9 @@ class BaseArrayHelper
* type and are having the same key.
* For integer-keyed elements, the elements from the latter array will
* be appended to the former array.
- * @param array $a array to be merged to
- * @param array $b array to be merged from. You can specify additional
- * arrays via third argument, fourth argument etc.
+ * @param array $a array to be merged to
+ * @param array $b array to be merged from. You can specify additional
+ * arrays via third argument, fourth argument etc.
* @return array the merged array (the original arrays are not changed.)
*/
public static function merge($a, $b)
@@ -158,12 +158,12 @@ class BaseArrayHelper
* $street = \yii\helpers\ArrayHelper::getValue($users, 'address.street');
* ~~~
*
- * @param array|object $array array or object to extract value from
- * @param string|\Closure $key key name of the array element, or property name of the object,
- * or an anonymous function returning the value. The anonymous function signature should be:
- * `function($array, $defaultValue)`.
- * @param mixed $default the default value to be returned if the specified key does not exist
- * @return mixed the value of the element if found, default value otherwise
+ * @param array|object $array array or object to extract value from
+ * @param string|\Closure $key key name of the array element, or property name of the object,
+ * or an anonymous function returning the value. The anonymous function signature should be:
+ * `function($array, $defaultValue)`.
+ * @param mixed $default the default value to be returned if the specified key does not exist
+ * @return mixed the value of the element if found, default value otherwise
* @throws InvalidParamException if $array is neither an array nor an object.
*/
public static function getValue($array, $key, $default = null)
@@ -204,9 +204,9 @@ class BaseArrayHelper
* // $array = ['options' => [1, 2]];
* ~~~
*
- * @param array $array the array to extract value from
- * @param string $key key name of the array element
- * @param mixed $default the default value to be returned if the specified key does not exist
+ * @param array $array the array to extract value from
+ * @param string $key key name of the array element
+ * @param mixed $default the default value to be returned if the specified key does not exist
* @return mixed|null the value of the element if found, default value otherwise
*/
public static function remove(&$array, $key, $default = null)
@@ -250,9 +250,9 @@ class BaseArrayHelper
* });
* ~~~
*
- * @param array $array the array that needs to be indexed
- * @param string|\Closure $key the column name or anonymous function whose result will be used to index the array
- * @return array the indexed array
+ * @param array $array the array that needs to be indexed
+ * @param string|\Closure $key the column name or anonymous function whose result will be used to index the array
+ * @return array the indexed array
*/
public static function index($array, $key)
{
@@ -285,11 +285,11 @@ class BaseArrayHelper
* });
* ~~~
*
- * @param array $array
- * @param string|\Closure $name
- * @param boolean $keepKeys whether to maintain the array keys. If false, the resulting array
- * will be re-indexed with integers.
- * @return array the list of column values
+ * @param array $array
+ * @param string|\Closure $name
+ * @param boolean $keepKeys whether to maintain the array keys. If false, the resulting array
+ * will be re-indexed with integers.
+ * @return array the list of column values
*/
public static function getColumn($array, $name, $keepKeys = true)
{
@@ -342,10 +342,10 @@ class BaseArrayHelper
* // ]
* ~~~
*
- * @param array $array
- * @param string|\Closure $from
- * @param string|\Closure $to
- * @param string|\Closure $group
+ * @param array $array
+ * @param string|\Closure $from
+ * @param string|\Closure $to
+ * @param string|\Closure $group
* @return array
*/
public static function map($array, $from, $to, $group = null)
@@ -368,9 +368,9 @@ class BaseArrayHelper
* Checks if the given array contains the specified key.
* This method enhances the `array_key_exists()` function by supporting case-insensitive
* key comparison.
- * @param string $key the key to check
- * @param array $array the array with keys to check
- * @param boolean $caseSensitive whether the key comparison should be case-sensitive
+ * @param string $key the key to check
+ * @param array $array the array with keys to check
+ * @param boolean $caseSensitive whether the key comparison should be case-sensitive
* @return boolean whether the array contains the specified key
*/
public static function keyExists($key, $array, $caseSensitive = true)
@@ -390,19 +390,19 @@ class BaseArrayHelper
/**
* Sorts an array of objects or arrays (with the same structure) by one or several keys.
- * @param array $array the array to be sorted. The array will be modified after calling this method.
- * @param string|\Closure|array $key the key(s) to be sorted by. This refers to a key name of the sub-array
- * elements, a property name of the objects, or an anonymous function returning the values for comparison
- * purpose. The anonymous function signature should be: `function($item)`.
- * To sort by multiple keys, provide an array of keys here.
- * @param integer|array $direction the sorting direction. It can be either `SORT_ASC` or `SORT_DESC`.
- * When sorting by multiple keys with different sorting directions, use an array of sorting directions.
- * @param integer|array $sortFlag the PHP sort flag. Valid values include
- * `SORT_REGULAR`, `SORT_NUMERIC`, `SORT_STRING`, `SORT_LOCALE_STRING`, `SORT_NATURAL` and `SORT_FLAG_CASE`.
- * Please refer to [PHP manual](http://php.net/manual/en/function.sort.php)
- * for more details. When sorting by multiple keys with different sort flags, use an array of sort flags.
+ * @param array $array the array to be sorted. The array will be modified after calling this method.
+ * @param string|\Closure|array $key the key(s) to be sorted by. This refers to a key name of the sub-array
+ * elements, a property name of the objects, or an anonymous function returning the values for comparison
+ * purpose. The anonymous function signature should be: `function($item)`.
+ * To sort by multiple keys, provide an array of keys here.
+ * @param integer|array $direction the sorting direction. It can be either `SORT_ASC` or `SORT_DESC`.
+ * When sorting by multiple keys with different sorting directions, use an array of sorting directions.
+ * @param integer|array $sortFlag the PHP sort flag. Valid values include
+ * `SORT_REGULAR`, `SORT_NUMERIC`, `SORT_STRING`, `SORT_LOCALE_STRING`, `SORT_NATURAL` and `SORT_FLAG_CASE`.
+ * Please refer to [PHP manual](http://php.net/manual/en/function.sort.php)
+ * for more details. When sorting by multiple keys with different sort flags, use an array of sort flags.
* @throws InvalidParamException if the $descending or $sortFlag parameters do not have
- * correct number of elements as that of $key.
+ * correct number of elements as that of $key.
*/
public static function multisort(&$array, $key, $direction = SORT_ASC, $sortFlag = SORT_REGULAR)
{
@@ -436,12 +436,12 @@ class BaseArrayHelper
* Encodes special characters in an array of strings into HTML entities.
* Both the array keys and values will be encoded.
* If a value is an array, this method will also encode it recursively.
- * @param array $data data to be encoded
- * @param boolean $valuesOnly whether to encode array values only. If false,
- * both the array keys and array values will be encoded.
- * @param string $charset the charset that the data is using. If not set,
- * [[\yii\base\Application::charset]] will be used.
- * @return array the encoded data
+ * @param array $data data to be encoded
+ * @param boolean $valuesOnly whether to encode array values only. If false,
+ * both the array keys and array values will be encoded.
+ * @param string $charset the charset that the data is using. If not set,
+ * [[\yii\base\Application::charset]] will be used.
+ * @return array the encoded data
* @see http://www.php.net/manual/en/function.htmlspecialchars.php
*/
public static function htmlEncode($data, $valuesOnly = true, $charset = null)
@@ -468,10 +468,10 @@ class BaseArrayHelper
* Decodes HTML entities into the corresponding characters in an array of strings.
* Both the array keys and values will be decoded.
* If a value is an array, this method will also decode it recursively.
- * @param array $data data to be decoded
- * @param boolean $valuesOnly whether to decode array values only. If false,
- * both the array keys and array values will be decoded.
- * @return array the decoded data
+ * @param array $data data to be decoded
+ * @param boolean $valuesOnly whether to decode array values only. If false,
+ * both the array keys and array values will be decoded.
+ * @return array the decoded data
* @see http://www.php.net/manual/en/function.htmlspecialchars-decode.php
*/
public static function htmlDecode($data, $valuesOnly = true)
diff --git a/framework/helpers/BaseConsole.php b/framework/helpers/BaseConsole.php
index ad2b7a0f17..ae006864c8 100644
--- a/framework/helpers/BaseConsole.php
+++ b/framework/helpers/BaseConsole.php
@@ -108,8 +108,8 @@ class BaseConsole
/**
* Moves the cursor to an absolute position given as column and row by sending ANSI control code CUP or CHA to the terminal.
- * @param integer $column 1-based column number, 1 is the left edge of the screen.
- * @param integer|null $row 1-based row number, 1 is the top edge of the screen. if not set, will move cursor only in current line.
+ * @param integer $column 1-based column number, 1 is the left edge of the screen.
+ * @param integer|null $row 1-based row number, 1 is the top edge of the screen. if not set, will move cursor only in current line.
*/
public static function moveCursorTo($column, $row = null)
{
@@ -233,9 +233,9 @@ class BaseConsole
/**
* Returns the ANSI format code.
*
- * @param array $format An array containing formatting values.
- * You can pass any of the FG_*, BG_* and TEXT_* constants
- * and also [[xtermFgColor]] and [[xtermBgColor]] to specify a format.
+ * @param array $format An array containing formatting values.
+ * You can pass any of the FG_*, BG_* and TEXT_* constants
+ * and also [[xtermFgColor]] and [[xtermBgColor]] to specify a format.
* @return string The ANSI format code according to the given formatting constants.
*/
public static function ansiFormatCode($format)
@@ -247,8 +247,8 @@ class BaseConsole
* Echoes an ANSI format code that affects the formatting of any text that is printed afterwards.
*
* @param array $format An array containing formatting values.
- * You can pass any of the FG_*, BG_* and TEXT_* constants
- * and also [[xtermFgColor]] and [[xtermBgColor]] to specify a format.
+ * You can pass any of the FG_*, BG_* and TEXT_* constants
+ * and also [[xtermFgColor]] and [[xtermBgColor]] to specify a format.
* @see ansiFormatCode()
* @see endAnsiFormat()
*/
@@ -274,10 +274,10 @@ class BaseConsole
/**
* Will return a string formatted with the given ANSI style
*
- * @param string $string the string to be formatted
- * @param array $format An array containing formatting values.
- * You can pass any of the FG_*, BG_* and TEXT_* constants
- * and also [[xtermFgColor]] and [[xtermBgColor]] to specify a format.
+ * @param string $string the string to be formatted
+ * @param array $format An array containing formatting values.
+ * You can pass any of the FG_*, BG_* and TEXT_* constants
+ * and also [[xtermFgColor]] and [[xtermBgColor]] to specify a format.
* @return string
*/
public static function ansiFormat($string, $format = [])
@@ -292,7 +292,7 @@ class BaseConsole
* You can pass the return value of this to one of the formatting methods:
* [[ansiFormat]], [[ansiFormatCode]], [[beginAnsiFormat]]
*
- * @param integer $colorCode xterm color code
+ * @param integer $colorCode xterm color code
* @return string
* @see http://en.wikipedia.org/wiki/Talk:ANSI_escape_code#xterm-256colors
*/
@@ -306,7 +306,7 @@ class BaseConsole
* You can pass the return value of this to one of the formatting methods:
* [[ansiFormat]], [[ansiFormatCode]], [[beginAnsiFormat]]
*
- * @param integer $colorCode xterm color code
+ * @param integer $colorCode xterm color code
* @return string
* @see http://en.wikipedia.org/wiki/Talk:ANSI_escape_code#xterm-256colors
*/
@@ -318,7 +318,7 @@ class BaseConsole
/**
* Strips ANSI control codes from a string
*
- * @param string $string String to strip
+ * @param string $string String to strip
* @return string
*/
public static function stripAnsiFormat($string)
@@ -477,8 +477,8 @@ class BaseConsole
* colors should be used. It defaults to true, if set to false, the
* colorcodes will just be removed (And %% will be transformed into %)
*
- * @param string $string String to convert
- * @param boolean $colored Should the string be colored?
+ * @param string $string String to convert
+ * @param boolean $colored Should the string be colored?
* @return string
*/
// TODO rework/refactor according to https://github.com/yiisoft/yii2/issues/746
@@ -558,7 +558,7 @@ class BaseConsole
* - windows without ansicon
* - not tty consoles
*
- * @param mixed $stream
+ * @param mixed $stream
* @return boolean true if the stream supports ANSI colors, otherwise false.
*/
public static function streamSupportsAnsiColors($stream)
@@ -580,9 +580,9 @@ class BaseConsole
/**
* Usage: list($width, $height) = ConsoleHelper::getScreenSize();
*
- * @param boolean $refresh whether to force checking and not re-use cached size value.
- * This is useful to detect changing window size while the application is running but may
- * not get up to date values on every terminal.
+ * @param boolean $refresh whether to force checking and not re-use cached size value.
+ * This is useful to detect changing window size while the application is running but may
+ * not get up to date values on every terminal.
* @return array|boolean An array of ($width, $height) or false when it was not able to determine size.
*/
public static function getScreenSize($refresh = false)
@@ -622,8 +622,8 @@ class BaseConsole
/**
* Gets input from STDIN and returns a string right-trimmed for EOLs.
*
- * @param boolean $raw If set to true, returns the raw string without trimming
- * @return string the string read from stdin
+ * @param boolean $raw If set to true, returns the raw string without trimming
+ * @return string the string read from stdin
*/
public static function stdin($raw = false)
{
@@ -633,7 +633,7 @@ class BaseConsole
/**
* Prints a string to STDOUT.
*
- * @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 static function stdout($string)
@@ -644,7 +644,7 @@ class BaseConsole
/**
* Prints a string to STDERR.
*
- * @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 static function stderr($string)
@@ -656,7 +656,7 @@ class BaseConsole
* Asks the user for input. Ends when the user types a carriage return (PHP_EOL). Optionally, It also provides a
* prompt.
*
- * @param string $prompt the prompt to display before waiting for input (optional)
+ * @param string $prompt the prompt to display before waiting for input (optional)
* @return string the user's input
*/
public static function input($prompt = null)
@@ -671,7 +671,7 @@ class BaseConsole
/**
* Prints text to STDOUT appended with a carriage return (PHP_EOL).
*
- * @param string $string the text to print
+ * @param string $string the text to print
* @return integer|boolean number of bytes printed or false on error.
*/
public static function output($string = null)
@@ -682,7 +682,7 @@ class BaseConsole
/**
* Prints text to STDERR appended with a carriage return (PHP_EOL).
*
- * @param string $string the text to print
+ * @param string $string the text to print
* @return integer|boolean number of bytes printed or false on error.
*/
public static function error($string = null)
@@ -693,14 +693,16 @@ class BaseConsole
/**
* Prompts the user for input and validates it
*
- * @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
- * - pattern: regular expression pattern to validate user input
- * - validator: a callable function to validate input. The function must accept two parameters:
- * - $input: the user input to validate
- * - $error: the error value passed by reference if validation failed.
+ * @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
+ * - `pattern`: regular expression pattern to validate user input
+ * - `validator`: a callable function to validate input. The function must accept two parameters:
+ * - `input`: the user input to validate
+ * - `error`: the error value passed by reference if validation failed.
+ *
* @return string the user input
*/
public static function prompt($text, $options = [])
@@ -745,8 +747,8 @@ class BaseConsole
/**
* 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
*/
public static function confirm($message, $default = true)
@@ -761,8 +763,8 @@ class BaseConsole
* 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
*/
@@ -814,15 +816,15 @@ class BaseConsole
* Console::endProgress("done." . PHP_EOL);
* ```
*
- * @param integer $done the number of items that are completed.
- * @param integer $total the total value of items that are to be done.
- * @param string $prefix an optional string to display before the progress bar.
- * Default to empty string which results in no prefix to be displayed.
- * @param integer|boolean $width optional width of the progressbar. This can be an integer representing
- * the number of characters to display for the progress bar or a float between 0 and 1 representing the
- * percentage of screen with the progress bar may take. It can also be set to false to disable the
- * bar and only show progress information like percent, number of items and ETA.
- * If not set, the bar will be as wide as the screen. Screen size will be detected using [[getScreenSize()]].
+ * @param integer $done the number of items that are completed.
+ * @param integer $total the total value of items that are to be done.
+ * @param string $prefix an optional string to display before the progress bar.
+ * Default to empty string which results in no prefix to be displayed.
+ * @param integer|boolean $width optional width of the progressbar. This can be an integer representing
+ * the number of characters to display for the progress bar or a float between 0 and 1 representing the
+ * percentage of screen with the progress bar may take. It can also be set to false to disable the
+ * bar and only show progress information like percent, number of items and ETA.
+ * If not set, the bar will be as wide as the screen. Screen size will be detected using [[getScreenSize()]].
* @see startProgress
* @see updateProgress
* @see endProgress
@@ -839,11 +841,11 @@ class BaseConsole
/**
* Updates a progress bar that has been started by [[startProgress()]].
*
- * @param integer $done the number of items that are completed.
- * @param integer $total the total value of items that are to be done.
- * @param string $prefix an optional string to display before the progress bar.
- * Defaults to null meaning the prefix specified by [[startProgress()]] will be used.
- * If prefix is specified it will update the prefix that will be used by later calls.
+ * @param integer $done the number of items that are completed.
+ * @param integer $total the total value of items that are to be done.
+ * @param string $prefix an optional string to display before the progress bar.
+ * Defaults to null meaning the prefix specified by [[startProgress()]] will be used.
+ * If prefix is specified it will update the prefix that will be used by later calls.
* @see startProgress
* @see endProgress
*/
@@ -903,11 +905,11 @@ class BaseConsole
/**
* Ends a progress bar that has been started by [[startProgress()]].
*
- * @param string|boolean $remove This can be `false` to leave the progress bar on screen and just print a newline.
- * If set to `true`, the line of the progress bar will be cleared. This may also be a string to be displayed instead
- * of the progress bar.
- * @param boolean $keepPrefix whether to keep the prefix that has been specified for the progressbar when progressbar
- * gets removed. Defaults to true.
+ * @param string|boolean $remove This can be `false` to leave the progress bar on screen and just print a newline.
+ * If set to `true`, the line of the progress bar will be cleared. This may also be a string to be displayed instead
+ * of the progress bar.
+ * @param boolean $keepPrefix whether to keep the prefix that has been specified for the progressbar when progressbar
+ * gets removed. Defaults to true.
* @see startProgress
* @see updateProgress
*/
diff --git a/framework/helpers/BaseFileHelper.php b/framework/helpers/BaseFileHelper.php
index 25ab9aa397..74b04ab999 100644
--- a/framework/helpers/BaseFileHelper.php
+++ b/framework/helpers/BaseFileHelper.php
@@ -33,8 +33,8 @@ class BaseFileHelper
* After normalization, the directory separators in the path will be `DIRECTORY_SEPARATOR`,
* and any trailing directory separators will be removed. For example, '/home\demo/' on Linux
* will be normalized as '/home/demo'.
- * @param string $path the file/directory path to be normalized
- * @param string $ds the directory separator to be used in the normalized result. Defaults to `DIRECTORY_SEPARATOR`.
+ * @param string $path the file/directory path to be normalized
+ * @param string $ds the directory separator to be used in the normalized result. Defaults to `DIRECTORY_SEPARATOR`.
* @return string the normalized file/directory path
*/
public static function normalizePath($path, $ds = DIRECTORY_SEPARATOR)
@@ -55,13 +55,13 @@ class BaseFileHelper
* If the target and the source language codes are the same,
* the original file will be returned.
*
- * @param string $file the original file
- * @param string $language the target language that the file should be localized to.
- * If not set, the value of [[\yii\base\Application::language]] will be used.
- * @param string $sourceLanguage the language that the original file is in.
- * If not set, the value of [[\yii\base\Application::sourceLanguage]] will be used.
+ * @param string $file the original file
+ * @param string $language the target language that the file should be localized to.
+ * If not set, the value of [[\yii\base\Application::language]] will be used.
+ * @param string $sourceLanguage the language that the original file is in.
+ * If not set, the value of [[\yii\base\Application::sourceLanguage]] will be used.
* @return string the matching localized file, or the original file if the localized version is not found.
- * If the target and the source language codes are the same, the original file will be returned.
+ * If the target and the source language codes are the same, the original file will be returned.
*/
public static function localize($file, $language = null, $sourceLanguage = null)
{
@@ -93,12 +93,12 @@ class BaseFileHelper
* This method will first try to determine the MIME type based on
* [finfo_open](http://php.net/manual/en/function.finfo-open.php). If this doesn't work, it will
* fall back to [[getMimeTypeByExtension()]].
- * @param string $file the file name.
- * @param string $magicFile name of the optional magic database file, usually something like `/path/to/magic.mime`.
- * This will be passed as the second parameter to [finfo_open](http://php.net/manual/en/function.finfo-open.php).
- * @param boolean $checkExtension whether to use the file extension to determine the MIME type in case
- * `finfo_open()` cannot determine it.
- * @return string the MIME type (e.g. `text/plain`). Null is returned if the MIME type cannot be determined.
+ * @param string $file the file name.
+ * @param string $magicFile name of the optional magic database file, usually something like `/path/to/magic.mime`.
+ * This will be passed as the second parameter to [finfo_open](http://php.net/manual/en/function.finfo-open.php).
+ * @param boolean $checkExtension whether to use the file extension to determine the MIME type in case
+ * `finfo_open()` cannot determine it.
+ * @return string the MIME type (e.g. `text/plain`). Null is returned if the MIME type cannot be determined.
*/
public static function getMimeType($file, $magicFile = null, $checkExtension = true)
{
@@ -119,9 +119,9 @@ class BaseFileHelper
/**
* Determines the MIME type based on the extension name of the specified file.
* This method will use a local map between extension names and MIME types.
- * @param string $file the file name.
- * @param string $magicFile the path of the file that contains all available MIME type information.
- * If this is not set, the default file aliased by `@yii/util/mimeTypes.php` will be used.
+ * @param string $file the file name.
+ * @param string $magicFile the path of the file that contains all available MIME type information.
+ * If this is not set, the default file aliased by `@yii/util/mimeTypes.php` will be used.
* @return string the MIME type. Null is returned if the MIME type cannot be determined.
*/
public static function getMimeTypeByExtension($file, $magicFile = null)
@@ -146,9 +146,9 @@ class BaseFileHelper
/**
* Copies a whole directory as another one.
* The files and sub-directories will also be copied over.
- * @param string $src the source directory
- * @param string $dst the destination directory
- * @param array $options options for directory copy. Valid options are:
+ * @param string $src the source directory
+ * @param string $dst the destination directory
+ * @param array $options options for directory copy. Valid options are:
*
* - dirMode: integer, the permission to be set for newly copied directories. Defaults to 0775.
* - fileMode: integer, the permission to be set for newly copied files. Defaults to the current environment setting.
@@ -243,8 +243,8 @@ class BaseFileHelper
/**
* Returns the files found under the specified directory and subdirectories.
- * @param string $dir the directory under which the files will be looked for.
- * @param array $options options for file searching. Valid options are:
+ * @param string $dir the directory under which the files will be looked for.
+ * @param array $options options for file searching. Valid options are:
*
* - filter: callback, a PHP callback that is called for each directory or file.
* The signature of the callback should be: `function ($path)`, where `$path` refers the full path to be filtered.
@@ -270,7 +270,7 @@ class BaseFileHelper
* Same pattern matching rules as in the "except" option are used.
* If a file path matches a pattern in both "only" and "except", it will NOT be returned.
* - recursive: boolean, whether the files under the subdirectories should also be looked for. Defaults to true.
- * @return array files found under the directory. The file list is sorted.
+ * @return array files found under the directory. The file list is sorted.
* @throws InvalidParamException if the dir is invalid.
*/
public static function findFiles($dir, $options = [])
@@ -322,9 +322,9 @@ class BaseFileHelper
/**
* Checks if the given file path satisfies the filtering options.
- * @param string $path the path of the file or directory to be checked
- * @param array $options the filtering options. See [[findFiles()]] for explanations of
- * the supported options.
+ * @param string $path the path of the file or directory to be checked
+ * @param array $options the filtering options. See [[findFiles()]] for explanations of
+ * the supported options.
* @return boolean whether the file or directory satisfies the filtering options.
*/
public static function filterPath($path, $options)
@@ -367,9 +367,9 @@ class BaseFileHelper
* it uses `chmod()` to set the permission of the created directory
* in order to avoid the impact of the `umask` setting.
*
- * @param string $path path of the directory to be created.
- * @param integer $mode the permission to be set for the created directory.
- * @param boolean $recursive whether to create parent directories if they do not exist.
+ * @param string $path path of the directory to be created.
+ * @param integer $mode the permission to be set for the created directory.
+ * @param boolean $recursive whether to create parent directories if they do not exist.
* @return boolean whether the directory is created successfully
*/
public static function createDirectory($path, $mode = 0775, $recursive = true)
@@ -392,11 +392,11 @@ class BaseFileHelper
*
* Based on match_basename() from dir.c of git 1.8.5.3 sources.
*
- * @param string $baseName file or directory name to compare with the pattern
- * @param string $pattern the pattern that $baseName will be compared against
- * @param integer|boolean $firstWildcard location of first wildcard character in the $pattern
- * @param integer $flags pattern flags
- * @return boolean wheter the name matches against pattern
+ * @param string $baseName file or directory name to compare with the pattern
+ * @param string $pattern the pattern that $baseName will be compared against
+ * @param integer|boolean $firstWildcard location of first wildcard character in the $pattern
+ * @param integer $flags pattern flags
+ * @return boolean wheter the name matches against pattern
*/
private static function matchBasename($baseName, $pattern, $firstWildcard, $flags)
{
@@ -420,12 +420,12 @@ class BaseFileHelper
*
* Based on match_pathname() from dir.c of git 1.8.5.3 sources.
*
- * @param string $path full path to compare
- * @param string $basePath base of path that will not be compared
- * @param string $pattern the pattern that path part will be compared against
- * @param integer|boolean $firstWildcard location of first wildcard character in the $pattern
- * @param integer $flags pattern flags
- * @return boolean wheter the path part matches against pattern
+ * @param string $path full path to compare
+ * @param string $basePath base of path that will not be compared
+ * @param string $pattern the pattern that path part will be compared against
+ * @param integer|boolean $firstWildcard location of first wildcard character in the $pattern
+ * @param integer $flags pattern flags
+ * @return boolean wheter the path part matches against pattern
*/
private static function matchPathname($path, $basePath, $pattern, $firstWildcard, $flags)
{
@@ -472,10 +472,10 @@ class BaseFileHelper
*
* Based on last_exclude_matching_from_list() from dir.c of git 1.8.5.3 sources.
*
- * @param string $basePath
- * @param string $path
- * @param array $excludes list of patterns to match $path against
- * @return string null or one of $excludes item as an array with keys: 'pattern', 'flags'
+ * @param string $basePath
+ * @param string $path
+ * @param array $excludes list of patterns to match $path against
+ * @return string null or one of $excludes item as an array with keys: 'pattern', 'flags'
* @throws InvalidParamException if any of the exclude patterns is not a string or an array with keys: pattern, flags, firstWildcard.
*/
private static function lastExcludeMatchingFromList($basePath, $path, $excludes)
@@ -508,8 +508,8 @@ class BaseFileHelper
/**
* Processes the pattern, stripping special characters like / and ! from the beginning and settings flags instead.
- * @param string $pattern
- * @return array with keys: (string) pattern, (int) flags, (int|boolean)firstWildcard
+ * @param string $pattern
+ * @return array with keys: (string) pattern, (int) flags, (int|boolean)firstWildcard
* @throws InvalidParamException if the pattern is not a string.
*/
private static function parseExcludePattern($pattern)
@@ -550,7 +550,7 @@ class BaseFileHelper
/**
* Searches for the first wildcard character in the pattern.
- * @param string $pattern the pattern to search in
+ * @param string $pattern the pattern to search in
* @return integer|boolean position of first wildcard character or false if not found
*/
private static function firstWildcardInPattern($pattern)
diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php
index 799857fa12..ca12d27419 100644
--- a/framework/helpers/BaseHtml.php
+++ b/framework/helpers/BaseHtml.php
@@ -83,10 +83,10 @@ class BaseHtml
/**
* Encodes special characters into HTML entities.
* The [[\yii\base\Application::charset|application charset]] will be used for encoding.
- * @param string $content the content to be encoded
- * @param boolean $doubleEncode whether to encode HTML entities in `$content`. If false,
- * HTML entities in `$content` will not be further encoded.
- * @return string the encoded content
+ * @param string $content the content to be encoded
+ * @param boolean $doubleEncode whether to encode HTML entities in `$content`. If false,
+ * HTML entities in `$content` will not be further encoded.
+ * @return string the encoded content
* @see decode()
* @see http://www.php.net/manual/en/function.htmlspecialchars.php
*/
@@ -98,7 +98,7 @@ class BaseHtml
/**
* Decodes special HTML entities back to the corresponding characters.
* This is the opposite of [[encode()]].
- * @param string $content the content to be decoded
+ * @param string $content the content to be decoded
* @return string the decoded content
* @see encode()
* @see http://www.php.net/manual/en/function.htmlspecialchars-decode.php
@@ -110,12 +110,12 @@ class BaseHtml
/**
* Generates a complete HTML tag.
- * @param string $name the tag name
+ * @param string $name the tag name
* @param string $content the content to be enclosed between the start and end tags. It will not be HTML-encoded.
- * If this is coming from end users, you should consider [[encode()]] it to prevent XSS attacks.
- * @param array $options the HTML tag attributes (HTML options) in terms of name-value pairs.
- * These will be rendered as the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
+ * If this is coming from end users, you should consider [[encode()]] it to prevent XSS attacks.
+ * @param array $options the HTML tag attributes (HTML options) in terms of name-value pairs.
+ * These will be rendered as the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
*
* For example when using `['class' => 'my-class', 'target' => '_blank', 'value' => null]` it will result in the
* html attributes rendered like this: `class="my-class" target="_blank"`.
@@ -135,11 +135,11 @@ class BaseHtml
/**
* Generates a start tag.
- * @param string $name the tag name
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $name the tag name
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated start tag
* @see endTag()
* @see tag()
@@ -151,7 +151,7 @@ class BaseHtml
/**
* Generates an end tag.
- * @param string $name the tag name
+ * @param string $name the tag name
* @return string the generated end tag
* @see beginTag()
* @see tag()
@@ -163,12 +163,12 @@ class BaseHtml
/**
* Generates a style tag.
- * @param string $content the style content
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * If the options does not contain "type", a "type" attribute with value "text/css" will be used.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $content the style content
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * If the options does not contain "type", a "type" attribute with value "text/css" will be used.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated style tag
*/
public static function style($content, $options = [])
@@ -178,12 +178,12 @@ class BaseHtml
/**
* Generates a script tag.
- * @param string $content the script content
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * If the options does not contain "type", a "type" attribute with value "text/javascript" will be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $content the script content
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * If the options does not contain "type", a "type" attribute with value "text/javascript" will be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated script tag
*/
public static function script($content, $options = [])
@@ -193,12 +193,12 @@ class BaseHtml
/**
* Generates a link tag that refers to an external CSS file.
- * @param array|string $url the URL of the external CSS file. This parameter will be processed by [[\yii\helpers\Url::to()]].
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
- * @return string the generated link tag
+ * @param array|string $url the URL of the external CSS file. This parameter will be processed by [[\yii\helpers\Url::to()]].
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @return string the generated link tag
* @see \yii\helpers\Url::to()
*/
public static function cssFile($url, $options = [])
@@ -213,11 +213,11 @@ class BaseHtml
/**
* Generates a script tag that refers to an external JavaScript file.
- * @param string $url the URL of the external JavaScript file. This parameter will be processed by [[\yii\helpers\Url::to()]].
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $url the URL of the external JavaScript file. This parameter will be processed by [[\yii\helpers\Url::to()]].
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated script tag
* @see \yii\helpers\Url::to()
*/
@@ -230,16 +230,16 @@ class BaseHtml
/**
* Generates a form start tag.
- * @param array|string $action the form action URL. This parameter will be processed by [[\yii\helpers\Url::to()]].
- * @param string $method the form submission method, such as "post", "get", "put", "delete" (case-insensitive).
- * Since most browsers only support "post" and "get", if other methods are given, they will
- * be simulated using "post", and a hidden input will be added which contains the actual method type.
- * See [[\yii\web\Request::methodParam]] for more details.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
- * @return string the generated form start tag.
+ * @param array|string $action the form action URL. This parameter will be processed by [[\yii\helpers\Url::to()]].
+ * @param string $method the form submission method, such as "post", "get", "put", "delete" (case-insensitive).
+ * Since most browsers only support "post" and "get", if other methods are given, they will
+ * be simulated using "post", and a hidden input will be added which contains the actual method type.
+ * See [[\yii\web\Request::methodParam]] for more details.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @return string the generated form start tag.
* @see endForm()
*/
public static function beginForm($action = '', $method = 'post', $options = [])
@@ -298,17 +298,17 @@ class BaseHtml
/**
* Generates a hyperlink tag.
- * @param string $text link body. It will NOT be HTML-encoded. Therefore you can pass in HTML code
- * such as an image tag. If this is coming from end users, you should consider [[encode()]]
- * it to prevent XSS attacks.
- * @param array|string|null $url the URL for the hyperlink tag. This parameter will be processed by [[yii\helpers\Url::to()]]
- * and will be used for the "href" attribute of the tag. If this parameter is null, the "href" attribute
- * will not be generated.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
- * @return string the generated hyperlink
+ * @param string $text link body. It will NOT be HTML-encoded. Therefore you can pass in HTML code
+ * such as an image tag. If this is coming from end users, you should consider [[encode()]]
+ * it to prevent XSS attacks.
+ * @param array|string|null $url the URL for the hyperlink tag. This parameter will be processed by [[yii\helpers\Url::to()]]
+ * and will be used for the "href" attribute of the tag. If this parameter is null, the "href" attribute
+ * will not be generated.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @return string the generated hyperlink
* @see yii\helpers\Url::to()
*/
public static function a($text, $url = null, $options = [])
@@ -322,15 +322,15 @@ class BaseHtml
/**
* Generates a mailto hyperlink.
- * @param string $text link body. It will NOT be HTML-encoded. Therefore you can pass in HTML code
- * such as an image tag. If this is coming from end users, you should consider [[encode()]]
- * it to prevent XSS attacks.
- * @param string $email email address. If this is null, the first parameter (link body) will be treated
- * as the email address and used.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $text link body. It will NOT be HTML-encoded. Therefore you can pass in HTML code
+ * such as an image tag. If this is coming from end users, you should consider [[encode()]]
+ * it to prevent XSS attacks.
+ * @param string $email email address. If this is null, the first parameter (link body) will be treated
+ * as the email address and used.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated mailto link
*/
public static function mailto($text, $email = null, $options = [])
@@ -342,11 +342,11 @@ class BaseHtml
/**
* Generates an image tag.
- * @param string $src the image URL. This parameter will be processed by [[yii\helpers\Url::to()]].
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $src the image URL. This parameter will be processed by [[yii\helpers\Url::to()]].
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated image tag
*/
public static function img($src, $options = [])
@@ -361,15 +361,15 @@ class BaseHtml
/**
* Generates a label tag.
- * @param string $content label text. It will NOT be HTML-encoded. Therefore you can pass in HTML code
- * such as an image tag. If this is is coming from end users, you should [[encode()]]
- * it to prevent XSS attacks.
- * @param string $for the ID of the HTML element that this label is associated with.
- * If this is null, the "for" attribute will not be generated.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $content label text. It will NOT be HTML-encoded. Therefore you can pass in HTML code
+ * such as an image tag. If this is is coming from end users, you should [[encode()]]
+ * it to prevent XSS attacks.
+ * @param string $for the ID of the HTML element that this label is associated with.
+ * If this is null, the "for" attribute will not be generated.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated label tag
*/
public static function label($content, $for = null, $options = [])
@@ -381,13 +381,13 @@ class BaseHtml
/**
* Generates a button tag.
- * @param string $content the content enclosed within the button tag. It will NOT be HTML-encoded.
- * Therefore you can pass in HTML code such as an image tag. If this is is coming from end users,
- * you should consider [[encode()]] it to prevent XSS attacks.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $content the content enclosed within the button tag. It will NOT be HTML-encoded.
+ * Therefore you can pass in HTML code such as an image tag. If this is is coming from end users,
+ * you should consider [[encode()]] it to prevent XSS attacks.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated button tag
*/
public static function button($content = 'Button', $options = [])
@@ -397,13 +397,13 @@ class BaseHtml
/**
* Generates a submit button tag.
- * @param string $content the content enclosed within the button tag. It will NOT be HTML-encoded.
- * Therefore you can pass in HTML code such as an image tag. If this is is coming from end users,
- * you should consider [[encode()]] it to prevent XSS attacks.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $content the content enclosed within the button tag. It will NOT be HTML-encoded.
+ * Therefore you can pass in HTML code such as an image tag. If this is is coming from end users,
+ * you should consider [[encode()]] it to prevent XSS attacks.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated submit button tag
*/
public static function submitButton($content = 'Submit', $options = [])
@@ -415,13 +415,13 @@ class BaseHtml
/**
* Generates a reset button tag.
- * @param string $content the content enclosed within the button tag. It will NOT be HTML-encoded.
- * Therefore you can pass in HTML code such as an image tag. If this is is coming from end users,
- * you should consider [[encode()]] it to prevent XSS attacks.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $content the content enclosed within the button tag. It will NOT be HTML-encoded.
+ * Therefore you can pass in HTML code such as an image tag. If this is is coming from end users,
+ * you should consider [[encode()]] it to prevent XSS attacks.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated reset button tag
*/
public static function resetButton($content = 'Reset', $options = [])
@@ -433,13 +433,13 @@ class BaseHtml
/**
* Generates an input type of the given type.
- * @param string $type the type attribute.
- * @param string $name the name attribute. If it is null, the name attribute will not be generated.
- * @param string $value the value attribute. If it is null, the value attribute will not be generated.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $type the type attribute.
+ * @param string $name the name attribute. If it is null, the name attribute will not be generated.
+ * @param string $value the value attribute. If it is null, the value attribute will not be generated.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated input tag
*/
public static function input($type, $name = null, $value = null, $options = [])
@@ -453,11 +453,11 @@ class BaseHtml
/**
* Generates an input button.
- * @param string $label the value attribute. If it is null, the value attribute will not be generated.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $label the value attribute. If it is null, the value attribute will not be generated.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated button tag
*/
public static function buttonInput($label = 'Button', $options = [])
@@ -470,11 +470,11 @@ class BaseHtml
/**
* Generates a submit input button.
- * @param string $label the value attribute. If it is null, the value attribute will not be generated.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $label the value attribute. If it is null, the value attribute will not be generated.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated button tag
*/
public static function submitInput($label = 'Submit', $options = [])
@@ -487,10 +487,10 @@ class BaseHtml
/**
* Generates a reset input button.
- * @param string $label the value attribute. If it is null, the value attribute will not be generated.
- * @param array $options the attributes of the button tag. The values will be HTML-encoded using [[encode()]].
- * Attributes whose value is null will be ignored and not put in the tag returned.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $label the value attribute. If it is null, the value attribute will not be generated.
+ * @param array $options the attributes of the button tag. The values will be HTML-encoded using [[encode()]].
+ * Attributes whose value is null will be ignored and not put in the tag returned.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated button tag
*/
public static function resetInput($label = 'Reset', $options = [])
@@ -503,12 +503,12 @@ class BaseHtml
/**
* Generates a text input field.
- * @param string $name the name attribute.
- * @param string $value the value attribute. If it is null, the value attribute will not be generated.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $name the name attribute.
+ * @param string $value the value attribute. If it is null, the value attribute will not be generated.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated button tag
*/
public static function textInput($name, $value = null, $options = [])
@@ -518,12 +518,12 @@ class BaseHtml
/**
* Generates a hidden input field.
- * @param string $name the name attribute.
- * @param string $value the value attribute. If it is null, the value attribute will not be generated.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $name the name attribute.
+ * @param string $value the value attribute. If it is null, the value attribute will not be generated.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated button tag
*/
public static function hiddenInput($name, $value = null, $options = [])
@@ -533,12 +533,12 @@ class BaseHtml
/**
* Generates a password input field.
- * @param string $name the name attribute.
- * @param string $value the value attribute. If it is null, the value attribute will not be generated.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $name the name attribute.
+ * @param string $value the value attribute. If it is null, the value attribute will not be generated.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated button tag
*/
public static function passwordInput($name, $value = null, $options = [])
@@ -551,12 +551,12 @@ class BaseHtml
* To use a file input field, you should set the enclosing form's "enctype" attribute to
* be "multipart/form-data". After the form is submitted, the uploaded file information
* can be obtained via $_FILES[$name] (see PHP documentation).
- * @param string $name the name attribute.
- * @param string $value the value attribute. If it is null, the value attribute will not be generated.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $name the name attribute.
+ * @param string $value the value attribute. If it is null, the value attribute will not be generated.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated button tag
*/
public static function fileInput($name, $value = null, $options = [])
@@ -566,12 +566,12 @@ class BaseHtml
/**
* Generates a text area input.
- * @param string $name the input name
- * @param string $value the input value. Note that it will be encoded using [[encode()]].
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $name the input name
+ * @param string $value the input value. Note that it will be encoded using [[encode()]].
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated text area tag
*/
public static function textarea($name, $value = '', $options = [])
@@ -583,9 +583,9 @@ class BaseHtml
/**
* Generates a radio button input.
- * @param string $name the name attribute.
+ * @param string $name the name attribute.
* @param boolean $checked whether the radio button should be checked.
- * @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
+ * @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
*
* - uncheck: string, the value associated with the uncheck state of the radio button. When this attribute
* is present, a hidden input will be generated so that if the radio button is not checked and is submitted,
@@ -633,9 +633,9 @@ class BaseHtml
/**
* Generates a checkbox input.
- * @param string $name the name attribute.
+ * @param string $name the name attribute.
* @param boolean $checked whether the checkbox should be checked.
- * @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
+ * @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
*
* - uncheck: string, the value associated with the uncheck state of the checkbox. When this attribute
* is present, a hidden input will be generated so that if the checkbox is not checked and is submitted,
@@ -683,13 +683,13 @@ class BaseHtml
/**
* Generates a drop-down list.
- * @param string $name the input name
+ * @param string $name the input name
* @param string $selection the selected value
- * @param array $items the option data items. The array keys are option values, and the array values
- * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
- * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
- * If you have a list of data models, you may convert them into the format described above using
- * [[\yii\helpers\ArrayHelper::map()]].
+ * @param array $items the option data items. The array keys are option values, and the array values
+ * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
+ * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
+ * If you have a list of data models, you may convert them into the format described above using
+ * [[\yii\helpers\ArrayHelper::map()]].
*
* Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in
* the labels will also be HTML-encoded.
@@ -728,13 +728,13 @@ class BaseHtml
/**
* Generates a list box.
- * @param string $name the input name
+ * @param string $name the input name
* @param string|array $selection the selected value(s)
- * @param array $items the option data items. The array keys are option values, and the array values
- * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
- * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
- * If you have a list of data models, you may convert them into the format described above using
- * [[\yii\helpers\ArrayHelper::map()]].
+ * @param array $items the option data items. The array keys are option values, and the array values
+ * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
+ * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
+ * If you have a list of data models, you may convert them into the format described above using
+ * [[\yii\helpers\ArrayHelper::map()]].
*
* Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in
* the labels will also be HTML-encoded.
@@ -791,12 +791,12 @@ class BaseHtml
* Generates a list of checkboxes.
* A checkbox list allows multiple selection, like [[listBox()]].
* As a result, the corresponding submitted value is an array.
- * @param string $name the name attribute of each checkbox.
+ * @param string $name the name attribute of each checkbox.
* @param string|array $selection the selected value(s).
- * @param array $items the data item used to generate the checkboxes.
- * The array values are the labels, while the array keys are the corresponding checkbox values.
- * @param array $options options (name => config) for the checkbox list container tag.
- * The following options are specially handled:
+ * @param array $items the data item used to generate the checkboxes.
+ * The array values are the labels, while the array keys are the corresponding checkbox values.
+ * @param array $options options (name => config) for the checkbox list container tag.
+ * The following options are specially handled:
*
* - tag: string, the tag name of the container element.
* - unselect: string, the value that should be submitted when none of the checkboxes is selected.
@@ -864,11 +864,11 @@ class BaseHtml
/**
* Generates a list of radio buttons.
* A radio button list is like a checkbox list, except that it only allows single selection.
- * @param string $name the name attribute of each radio button.
+ * @param string $name the name attribute of each radio button.
* @param string|array $selection the selected value(s).
- * @param array $items the data item used to generate the radio buttons.
- * The array values are the labels, while the array keys are the corresponding radio button values.
- * @param array $options options (name => config) for the radio button list. The following options are supported:
+ * @param array $items the data item used to generate the radio buttons.
+ * The array values are the labels, while the array keys are the corresponding radio button values.
+ * @param array $options options (name => config) for the radio button list. The following options are supported:
*
* - unselect: string, the value that should be submitted when none of the radio buttons is selected.
* By setting this option, a hidden input will be generated.
@@ -929,9 +929,9 @@ class BaseHtml
/**
* Generates an unordered list.
- * @param array|\Traversable $items the items for generating the list. Each item generates a single list item.
- * Note that items will be automatically HTML encoded if `$options['encode']` is not set or true.
- * @param array $options options (name => config) for the radio button list. The following options are supported:
+ * @param array|\Traversable $items the items for generating the list. Each item generates a single list item.
+ * Note that items will be automatically HTML encoded if `$options['encode']` is not set or true.
+ * @param array $options options (name => config) for the radio button list. The following options are supported:
*
* - encode: boolean, whether to HTML-encode the items. Defaults to true.
* This option is ignored if the `item` option is specified.
@@ -974,9 +974,9 @@ class BaseHtml
/**
* Generates an ordered list.
- * @param array|\Traversable $items the items for generating the list. Each item generates a single list item.
- * Note that items will be automatically HTML encoded if `$options['encode']` is not set or true.
- * @param array $options options (name => config) for the radio button list. The following options are supported:
+ * @param array|\Traversable $items the items for generating the list. Each item generates a single list item.
+ * Note that items will be automatically HTML encoded if `$options['encode']` is not set or true.
+ * @param array $options options (name => config) for the radio button list. The following options are supported:
*
* - encode: boolean, whether to HTML-encode the items. Defaults to true.
* This option is ignored if the `item` option is specified.
@@ -1005,13 +1005,13 @@ class BaseHtml
/**
* Generates a label tag for the given model attribute.
* The label text is the label associated with the attribute, obtained via [[Model::getAttributeLabel()]].
- * @param Model $model the model object
+ * @param Model $model the model object
* @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * If a value is null, the corresponding attribute will not be rendered.
- * The following options are specially handled:
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * If a value is null, the corresponding attribute will not be rendered.
+ * The following options are specially handled:
*
* - label: this specifies the label to be displayed. Note that this will NOT be [[encode()|encoded]].
* If this is not set, [[Model::getAttributeLabel()]] will be called to get the label for display
@@ -1034,11 +1034,11 @@ class BaseHtml
/**
* Generates a tag that contains the first validation error of the specified model attribute.
* Note that even if there is no validation error, this method will still return an empty error tag.
- * @param Model $model the model object
+ * @param Model $model the model object
* @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. The values will be HTML-encoded
- * using [[encode()]]. If a value is null, the corresponding attribute will not be rendered.
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. The values will be HTML-encoded
+ * using [[encode()]]. If a value is null, the corresponding attribute will not be rendered.
*
* The following options are specially handled:
*
@@ -1062,13 +1062,13 @@ class BaseHtml
* Generates an input tag for the given model attribute.
* This method will generate the "name" and "value" tag attributes automatically for the model attribute
* unless they are explicitly specified in `$options`.
- * @param string $type the input type (e.g. 'text', 'password')
- * @param Model $model the model object
- * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param string $type the input type (e.g. 'text', 'password')
+ * @param Model $model the model object
+ * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated input tag
*/
public static function activeInput($type, $model, $attribute, $options = [])
@@ -1086,12 +1086,12 @@ class BaseHtml
* Generates a text input tag for the given model attribute.
* This method will generate the "name" and "value" tag attributes automatically for the model attribute
* unless they are explicitly specified in `$options`.
- * @param Model $model the model object
- * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param Model $model the model object
+ * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated input tag
*/
public static function activeTextInput($model, $attribute, $options = [])
@@ -1103,12 +1103,12 @@ class BaseHtml
* Generates a hidden input tag for the given model attribute.
* This method will generate the "name" and "value" tag attributes automatically for the model attribute
* unless they are explicitly specified in `$options`.
- * @param Model $model the model object
- * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param Model $model the model object
+ * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated input tag
*/
public static function activeHiddenInput($model, $attribute, $options = [])
@@ -1120,12 +1120,12 @@ class BaseHtml
* Generates a password input tag for the given model attribute.
* This method will generate the "name" and "value" tag attributes automatically for the model attribute
* unless they are explicitly specified in `$options`.
- * @param Model $model the model object
- * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param Model $model the model object
+ * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated input tag
*/
public static function activePasswordInput($model, $attribute, $options = [])
@@ -1137,12 +1137,12 @@ class BaseHtml
* Generates a file input tag for the given model attribute.
* This method will generate the "name" and "value" tag attributes automatically for the model attribute
* unless they are explicitly specified in `$options`.
- * @param Model $model the model object
- * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param Model $model the model object
+ * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated input tag
*/
public static function activeFileInput($model, $attribute, $options = [])
@@ -1156,12 +1156,12 @@ class BaseHtml
/**
* Generates a textarea tag for the given model attribute.
* The model attribute value will be used as the content in the textarea.
- * @param Model $model the model object
- * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. These will be rendered as
- * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
- * See [[renderTagAttributes()]] for details on how attributes are being rendered.
+ * @param Model $model the model object
+ * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. These will be rendered as
+ * the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
+ * See [[renderTagAttributes()]] for details on how attributes are being rendered.
* @return string the generated textarea tag
*/
public static function activeTextarea($model, $attribute, $options = [])
@@ -1178,10 +1178,10 @@ class BaseHtml
/**
* Generates a radio button tag for the given model attribute.
* This method will generate the "checked" tag attribute according to the model attribute value.
- * @param Model $model the model object
+ * @param Model $model the model object
* @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
*
* - uncheck: string, the value associated with the uncheck state of the radio button. If not set,
* it will take the default value '0'. This method will render a hidden input so that if the radio button
@@ -1223,10 +1223,10 @@ class BaseHtml
/**
* Generates a checkbox tag for the given model attribute.
* This method will generate the "checked" tag attribute according to the model attribute value.
- * @param Model $model the model object
+ * @param Model $model the model object
* @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
+ * about attribute expression.
+ * @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
*
* - uncheck: string, the value associated with the uncheck state of the radio button. If not set,
* it will take the default value '0'. This method will render a hidden input so that if the radio button
@@ -1267,14 +1267,14 @@ class BaseHtml
/**
* Generates a drop-down list for the given model attribute.
* The selection of the drop-down list is taken from the value of the model attribute.
- * @param Model $model the model object
+ * @param Model $model the model object
* @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $items the option data items. The array keys are option values, and the array values
- * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
- * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
- * If you have a list of data models, you may convert them into the format described above using
- * [[\yii\helpers\ArrayHelper::map()]].
+ * about attribute expression.
+ * @param array $items the option data items. The array keys are option values, and the array values
+ * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
+ * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
+ * If you have a list of data models, you may convert them into the format described above using
+ * [[\yii\helpers\ArrayHelper::map()]].
*
* Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in
* the labels will also be HTML-encoded.
@@ -1317,14 +1317,14 @@ class BaseHtml
/**
* Generates a list box.
* The selection of the list box is taken from the value of the model attribute.
- * @param Model $model the model object
+ * @param Model $model the model object
* @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $items the option data items. The array keys are option values, and the array values
- * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
- * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
- * If you have a list of data models, you may convert them into the format described above using
- * [[\yii\helpers\ArrayHelper::map()]].
+ * about attribute expression.
+ * @param array $items the option data items. The array keys are option values, and the array values
+ * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
+ * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
+ * If you have a list of data models, you may convert them into the format described above using
+ * [[\yii\helpers\ArrayHelper::map()]].
*
* Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in
* the labels will also be HTML-encoded.
@@ -1372,13 +1372,13 @@ class BaseHtml
* A checkbox list allows multiple selection, like [[listBox()]].
* As a result, the corresponding submitted value is an array.
* The selection of the checkbox list is taken from the value of the model attribute.
- * @param Model $model the model object
+ * @param Model $model the model object
* @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $items the data item used to generate the checkboxes.
- * The array values are the labels, while the array keys are the corresponding checkbox values.
- * Note that the labels will NOT be HTML-encoded, while the values will.
- * @param array $options options (name => config) for the checkbox list. The following options are specially handled:
+ * about attribute expression.
+ * @param array $items the data item used to generate the checkboxes.
+ * The array values are the labels, while the array keys are the corresponding checkbox values.
+ * Note that the labels will NOT be HTML-encoded, while the values will.
+ * @param array $options options (name => config) for the checkbox list. The following options are specially handled:
*
* - unselect: string, the value that should be submitted when none of the checkboxes is selected.
* You may set this option to be null to prevent default value submission.
@@ -1417,13 +1417,13 @@ class BaseHtml
* Generates a list of radio buttons.
* A radio button list is like a checkbox list, except that it only allows single selection.
* The selection of the radio buttons is taken from the value of the model attribute.
- * @param Model $model the model object
+ * @param Model $model the model object
* @param string $attribute the attribute name or expression. See [[getAttributeName()]] for the format
- * about attribute expression.
- * @param array $items the data item used to generate the radio buttons.
- * The array keys are the labels, while the array values are the corresponding radio button values.
- * Note that the labels will NOT be HTML-encoded, while the values will.
- * @param array $options options (name => config) for the radio button list. The following options are specially handled:
+ * about attribute expression.
+ * @param array $items the data item used to generate the radio buttons.
+ * The array keys are the labels, while the array values are the corresponding radio button values.
+ * Note that the labels will NOT be HTML-encoded, while the values will.
+ * @param array $options options (name => config) for the radio button list. The following options are specially handled:
*
* - unselect: string, the value that should be submitted when none of the radio buttons is selected.
* You may set this option to be null to prevent default value submission.
@@ -1461,18 +1461,18 @@ class BaseHtml
/**
* Renders the option tags that can be used by [[dropDownList()]] and [[listBox()]].
* @param string|array $selection the selected value(s). This can be either a string for single selection
- * or an array for multiple selections.
- * @param array $items the option data items. The array keys are option values, and the array values
- * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
- * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
- * If you have a list of data models, you may convert them into the format described above using
- * [[\yii\helpers\ArrayHelper::map()]].
+ * or an array for multiple selections.
+ * @param array $items the option data items. The array keys are option values, and the array values
+ * are the corresponding option labels. The array can also be nested (i.e. some array values are arrays too).
+ * For each sub-array, an option group will be generated whose label is the key associated with the sub-array.
+ * If you have a list of data models, you may convert them into the format described above using
+ * [[\yii\helpers\ArrayHelper::map()]].
*
* Note, the values and labels will be automatically HTML-encoded by this method, and the blank spaces in
* the labels will also be HTML-encoded.
* @param array $tagOptions the $options parameter that is passed to the [[dropDownList()]] or [[listBox()]] call.
- * This method will take out these elements, if any: "prompt", "options" and "groups". See more details
- * in [[dropDownList()]] for the explanation of these elements.
+ * This method will take out these elements, if any: "prompt", "options" and "groups". See more details
+ * in [[dropDownList()]] for the explanation of these elements.
*
* @return string the generated list options
*/
@@ -1523,10 +1523,10 @@ class BaseHtml
* if `'data' => ['id' => 1, 'name' => 'yii']`, then this will be rendered:
* `data-id="1" data-name="yii"`.
*
- * @param array $attributes attributes to be rendered. The attribute values will be HTML-encoded using [[encode()]].
+ * @param array $attributes attributes to be rendered. The attribute values will be HTML-encoded using [[encode()]].
* @return string the rendering result. If the attributes are not empty, they will be rendered
- * into a string with a leading white space (so that it can be directly appended to the tag name
- * in a tag. If there is no attribute, an empty string will be returned.
+ * into a string with a leading white space (so that it can be directly appended to the tag name
+ * in a tag. If there is no attribute, an empty string will be returned.
*/
public static function renderTagAttributes($attributes)
{
@@ -1561,8 +1561,8 @@ class BaseHtml
/**
* Adds a CSS class to the specified options.
* If the CSS class is already in the options, it will not be added again.
- * @param array $options the options to be modified.
- * @param string $class the CSS class to be added
+ * @param array $options the options to be modified.
+ * @param string $class the CSS class to be added
*/
public static function addCssClass(&$options, $class)
{
@@ -1578,8 +1578,8 @@ class BaseHtml
/**
* Removes a CSS class from the specified options.
- * @param array $options the options to be modified.
- * @param string $class the CSS class to be removed
+ * @param array $options the options to be modified.
+ * @param string $class the CSS class to be removed
*/
public static function removeCssClass(&$options, $class)
{
@@ -1609,11 +1609,11 @@ class BaseHtml
* Html::addCssStyle($options, 'width: 100px; height: 200px');
* ```
*
- * @param array $options the HTML options to be modified.
- * @param string|array $style the new style string (e.g. `'width: 100px; height: 200px'`) or
- * array (e.g. `['width' => '100px', 'height' => '200px']`).
- * @param boolean $overwrite whether to overwrite existing CSS properties if the new style
- * contain them too.
+ * @param array $options the HTML options to be modified.
+ * @param string|array $style the new style string (e.g. `'width: 100px; height: 200px'`) or
+ * array (e.g. `['width' => '100px', 'height' => '200px']`).
+ * @param boolean $overwrite whether to overwrite existing CSS properties if the new style
+ * contain them too.
* @see removeCssStyle()
* @see cssStyleFromArray()
* @see cssStyleToArray()
@@ -1644,9 +1644,9 @@ class BaseHtml
* Html::removeCssStyle($options, ['width', 'height']);
* ```
*
- * @param array $options the HTML options to be modified.
+ * @param array $options the HTML options to be modified.
* @param string|array $properties the CSS properties to be removed. You may use a string
- * if you are removing a single property.
+ * if you are removing a single property.
* @see addCssStyle()
*/
public static function removeCssStyle(&$options, $properties)
@@ -1670,8 +1670,8 @@ class BaseHtml
* // will display: 'width: 100px; height: 200px;'
* ```
*
- * @param array $style the CSS style array. The array keys are the CSS property names,
- * and the array values are the corresponding CSS property values.
+ * @param array $style the CSS style array. The array keys are the CSS property names,
+ * and the array values are the corresponding CSS property values.
* @return string the CSS style string. If the CSS style is empty, a null will be returned.
*/
public static function cssStyleFromArray(array $style)
@@ -1697,8 +1697,8 @@ class BaseHtml
* // will display: ['width' => '100px', 'height' => '200px']
* ```
*
- * @param string $style the CSS style string
- * @return array the array representation of the CSS style
+ * @param string $style the CSS style string
+ * @return array the array representation of the CSS style
*/
public static function cssStyleToArray($style)
{
@@ -1726,8 +1726,8 @@ class BaseHtml
* for the first model in tabular input.
*
* If `$attribute` has neither prefix nor suffix, it will be returned back without change.
- * @param string $attribute the attribute name or expression
- * @return string the attribute name without prefix and suffix.
+ * @param string $attribute the attribute name or expression
+ * @return string the attribute name without prefix and suffix.
* @throws InvalidParamException if the attribute name contains non-word characters.
*/
public static function getAttributeName($attribute)
@@ -1748,9 +1748,9 @@ class BaseHtml
* If an attribute value is an instance of [[ActiveRecordInterface]] or an array of such instances,
* the primary value(s) of the AR instance(s) will be returned instead.
*
- * @param Model $model the model object
- * @param string $attribute the attribute name or expression
- * @return string|array the corresponding attribute value
+ * @param Model $model the model object
+ * @param string $attribute the attribute name or expression
+ * @return string|array the corresponding attribute value
* @throws InvalidParamException if the attribute name contains non-word characters.
*/
public static function getAttributeValue($model, $attribute)
@@ -1797,9 +1797,9 @@ class BaseHtml
*
* See [[getAttributeName()]] for explanation of attribute expression.
*
- * @param Model $model the model object
- * @param string $attribute the attribute name or expression
- * @return string the generated input name
+ * @param Model $model the model object
+ * @param string $attribute the attribute name or expression
+ * @return string the generated input name
* @throws InvalidParamException if the attribute name contains non-word characters.
*/
public static function getInputName($model, $attribute)
@@ -1825,9 +1825,9 @@ class BaseHtml
*
* This method converts the result [[getInputName()]] into a valid input ID.
* For example, if [[getInputName()]] returns `Post[content]`, this method will return `post-content`.
- * @param Model $model the model object
- * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for explanation of attribute expression.
- * @return string the generated input ID
+ * @param Model $model the model object
+ * @param string $attribute the attribute name or expression. See [[getAttributeName()]] for explanation of attribute expression.
+ * @return string the generated input ID
* @throws InvalidParamException if the attribute name contains non-word characters.
*/
public static function getInputId($model, $attribute)
diff --git a/framework/helpers/BaseHtmlPurifier.php b/framework/helpers/BaseHtmlPurifier.php
index 7f3d8569d1..8dd522e3c7 100644
--- a/framework/helpers/BaseHtmlPurifier.php
+++ b/framework/helpers/BaseHtmlPurifier.php
@@ -19,8 +19,8 @@ class BaseHtmlPurifier
/**
* Passes markup through HTMLPurifier making it safe to output to end user
*
- * @param string $content
- * @param array|null $config
+ * @param string $content
+ * @param array|null $config
* @return string
*/
public static function process($content, $config = null)
diff --git a/framework/helpers/BaseInflector.php b/framework/helpers/BaseInflector.php
index 2ca4bd079d..b5b8428586 100644
--- a/framework/helpers/BaseInflector.php
+++ b/framework/helpers/BaseInflector.php
@@ -293,7 +293,7 @@ class BaseInflector
* Converts a word to its plural form.
* Note that this is for English only!
* For example, 'apple' will become 'apples', and 'child' will become 'children'.
- * @param string $word the word to be pluralized
+ * @param string $word the word to be pluralized
* @return string the pluralized word
*/
public static function pluralize($word)
@@ -312,7 +312,7 @@ class BaseInflector
/**
* Returns the singular of the $word
- * @param string $word the english word to singularize
+ * @param string $word the english word to singularize
* @return string Singular noun.
*/
public static function singularize($word)
@@ -333,8 +333,8 @@ class BaseInflector
/**
* Converts an underscored or CamelCase word into a English
* sentence.
- * @param string $words
- * @param boolean $ucAll whether to set all words to uppercase
+ * @param string $words
+ * @param boolean $ucAll whether to set all words to uppercase
* @return string
*/
public static function titleize($words, $ucAll = false)
@@ -350,7 +350,7 @@ class BaseInflector
* will remove non alphanumeric character from the word, so
* "who's online" will be converted to "WhoSOnline"
* @see variablize()
- * @param string $word the word to CamelCase
+ * @param string $word the word to CamelCase
* @return string
*/
public static function camelize($word)
@@ -361,9 +361,9 @@ class BaseInflector
/**
* Converts a CamelCase name into space-separated words.
* For example, 'PostTag' will be converted to 'Post Tag'.
- * @param string $name the string to be converted
- * @param boolean $ucwords whether to capitalize the first letter in each word
- * @return string the resulting words
+ * @param string $name the string to be converted
+ * @param boolean $ucwords whether to capitalize the first letter in each word
+ * @return string the resulting words
*/
public static function camel2words($name, $ucwords = true)
{
@@ -380,8 +380,8 @@ class BaseInflector
* Converts a CamelCase name into an ID in lowercase.
* Words in the ID may be concatenated using the specified character (defaults to '-').
* For example, 'PostTag' will be converted to 'post-tag'.
- * @param string $name the string to be converted
- * @param string $separator the character used to concatenate the words in the ID
+ * @param string $name the string to be converted
+ * @param string $separator the character used to concatenate the words in the ID
* @return string the resulting ID
*/
public static function camel2id($name, $separator = '-')
@@ -397,8 +397,8 @@ class BaseInflector
* Converts an ID into a CamelCase name.
* Words in the ID separated by `$separator` (defaults to '-') will be concatenated into a CamelCase name.
* For example, 'post-tag' is converted to 'PostTag'.
- * @param string $id the ID to be converted
- * @param string $separator the character used to separate the words in the ID
+ * @param string $id the ID to be converted
+ * @param string $separator the character used to separate the words in the ID
* @return string the resulting CamelCase name
*/
public static function id2camel($id, $separator = '-')
@@ -408,7 +408,7 @@ class BaseInflector
/**
* Converts any "CamelCased" into an "underscored_word".
- * @param string $words the word(s) to underscore
+ * @param string $words the word(s) to underscore
* @return string
*/
public static function underscore($words)
@@ -418,8 +418,8 @@ class BaseInflector
/**
* Returns a human-readable string from $word
- * @param string $word the string to humanize
- * @param boolean $ucAll whether to set all words to uppercase or not
+ * @param string $word the string to humanize
+ * @param boolean $ucAll whether to set all words to uppercase or not
* @return string
*/
public static function humanize($word, $ucAll = false)
@@ -434,7 +434,7 @@ class BaseInflector
* Converts a word like "send_email" to "sendEmail". It
* will remove non alphanumeric character from the word, so
* "who's online" will be converted to "whoSOnline"
- * @param string $word to lowerCamelCase
+ * @param string $word to lowerCamelCase
* @return string
*/
public static function variablize($word)
@@ -447,7 +447,7 @@ class BaseInflector
/**
* Converts a class name to its table name (pluralized)
* naming conventions. For example, converts "Person" to "people"
- * @param string $className the class name for getting related table_name
+ * @param string $className the class name for getting related table_name
* @return string
*/
public static function tableize($className)
@@ -459,10 +459,10 @@ class BaseInflector
* Returns a string with all spaces converted to given replacement and
* non word characters removed. Maps special characters to ASCII using
* [[$transliteration]] array.
- * @param string $string An arbitrary string to convert
- * @param string $replacement The replacement to use for spaces
- * @param boolean $lowercase whether to return the string in lowercase or not. Defaults to `true`.
- * @return string The converted string.
+ * @param string $string An arbitrary string to convert
+ * @param string $replacement The replacement to use for spaces
+ * @param boolean $lowercase whether to return the string in lowercase or not. Defaults to `true`.
+ * @return string The converted string.
*/
public static function slug($string, $replacement = '-', $lowercase = true)
{
@@ -481,7 +481,7 @@ class BaseInflector
/**
* Converts a table name to its class name. For example, converts "people" to "Person"
- * @param string $tableName
+ * @param string $tableName
* @return string
*/
public static function classify($tableName)
@@ -491,7 +491,7 @@ class BaseInflector
/**
* Converts number to its ordinal English form. For example, converts 13 to 13th, 2 to 2nd ...
- * @param integer $number the number to get its ordinal value
+ * @param integer $number the number to get its ordinal value
* @return string
*/
public static function ordinalize($number)
diff --git a/framework/helpers/BaseJson.php b/framework/helpers/BaseJson.php
index 793a1e0f25..fa2e8e32e1 100644
--- a/framework/helpers/BaseJson.php
+++ b/framework/helpers/BaseJson.php
@@ -26,10 +26,10 @@ class BaseJson
* The method enhances `json_encode()` by supporting JavaScript expressions.
* In particular, the method will not encode a JavaScript expression that is
* represented in terms of a [[JsExpression]] object.
- * @param mixed $value the data to be encoded
- * @param integer $options the encoding options. For more details please refer to
- *