From c19b2f7dc8f487f0a867f2cacab68b8e86b7a8f9 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 1 Feb 2017 17:46:29 +0100 Subject: [PATCH] release version 2.0.11 --- composer.json | 2 +- framework/BaseYii.php | 2 +- framework/CHANGELOG.md | 2 +- framework/base/Application.php | 1 + framework/base/Module.php | 3 ++- framework/base/Widget.php | 9 +++++---- framework/caching/Dependency.php | 2 +- framework/caching/ExpressionDependency.php | 2 +- framework/caching/MemCacheServer.php | 2 +- framework/caching/WinCache.php | 2 +- framework/caching/XCache.php | 2 +- framework/classes.php | 4 ++++ framework/console/UnknownCommandException.php | 1 + framework/data/BaseDataProvider.php | 4 ++-- framework/data/Pagination.php | 10 +++++----- framework/db/ActiveRelationTrait.php | 2 +- framework/db/Connection.php | 7 ++++--- framework/db/QueryInterface.php | 2 +- framework/db/QueryTrait.php | 2 +- framework/db/Schema.php | 1 - framework/db/Transaction.php | 4 ++-- framework/di/Container.php | 10 +++++----- framework/helpers/BaseHtml.php | 2 +- framework/helpers/BaseStringHelper.php | 2 +- framework/log/Logger.php | 3 ++- framework/log/SyslogTarget.php | 1 + framework/rbac/CheckAccessInterface.php | 2 +- framework/rest/DeleteAction.php | 2 +- framework/rest/IndexAction.php | 4 ++-- framework/rest/ViewAction.php | 2 +- framework/test/FixtureTrait.php | 2 +- framework/validators/ExistValidator.php | 2 +- framework/validators/UniqueValidator.php | 4 ++-- framework/web/ErrorAction.php | 2 ++ framework/web/RangeNotSatisfiableHttpException.php | 2 +- framework/web/Request.php | 6 +++--- framework/web/Response.php | 14 ++++++-------- framework/web/Session.php | 7 +++---- framework/web/UrlManager.php | 2 +- framework/web/UrlRule.php | 1 + framework/web/User.php | 6 +++--- framework/web/XmlResponseFormatter.php | 1 + framework/widgets/ActiveField.php | 1 + framework/widgets/LinkPager.php | 4 +--- framework/widgets/ListView.php | 1 + 45 files changed, 80 insertions(+), 69 deletions(-) diff --git a/composer.json b/composer.json index d167ec228d..f74a82e06b 100644 --- a/composer.json +++ b/composer.json @@ -76,7 +76,7 @@ "ezyang/htmlpurifier": "~4.6", "cebe/markdown": "~1.0.0 | ~1.1.0", "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", - "bower-asset/jquery.inputmask": "~3.2.2", + "bower-asset/jquery.inputmask": "~3.2.2 | ~3.3.3", "bower-asset/punycode": "1.3.*", "bower-asset/yii2-pjax": "~2.0.1" }, diff --git a/framework/BaseYii.php b/framework/BaseYii.php index 75e728d2c7..02508cfb18 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -93,7 +93,7 @@ class BaseYii */ public static function getVersion() { - return '2.0.11-dev'; + return '2.0.11'; } /** diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 2fc8447629..72452e7daa 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -1,7 +1,7 @@ Yii Framework 2 Change Log ========================== -2.0.11 under development +2.0.11 February 01, 2017 ------------------------ - Bug #4113: Error page stacktrace was generating links to private methods which are not part of the API docs (samdark) diff --git a/framework/base/Application.php b/framework/base/Application.php index 03688807d8..dee8fcbeec 100644 --- a/framework/base/Application.php +++ b/framework/base/Application.php @@ -21,6 +21,7 @@ use Yii; * @property string $basePath The root directory of the application. * @property \yii\caching\Cache $cache The cache application component. Null if the component is not enabled. * This property is read-only. + * @property array $container Values given in terms of name-value pairs. This property is write-only. * @property \yii\db\Connection $db The database connection. This property is read-only. * @property \yii\web\ErrorHandler|\yii\console\ErrorHandler $errorHandler The error handler application * component. This property is read-only. diff --git a/framework/base/Module.php b/framework/base/Module.php index 670d157ece..5c863745bf 100644 --- a/framework/base/Module.php +++ b/framework/base/Module.php @@ -32,8 +32,9 @@ use yii\di\ServiceLocator; * @property string $layoutPath The root directory of layout files. Defaults to "[[viewPath]]/layouts". * @property array $modules The modules (indexed by their IDs). * @property string $uniqueId The unique ID of the module. This property is read-only. + * @property string $version The version of this module. Note that the type of this property differs in getter + * and setter. See [[getVersion()]] and [[setVersion()]] for details. * @property string $viewPath The root directory of view files. Defaults to "[[basePath]]/views". - * @property string|callable $version The version of this module. * * @author Qiang Xue * @since 2.0 diff --git a/framework/base/Widget.php b/framework/base/Widget.php index e19e7b3a6b..61fc3f7a4d 100644 --- a/framework/base/Widget.php +++ b/framework/base/Widget.php @@ -29,7 +29,7 @@ class Widget extends Component implements ViewContextInterface /** * @event Event an event that is triggered when the widget is initialized via [[init()]]. * @since 2.0.11 - */ + */ const EVENT_INIT = 'init'; /** * @event WidgetEvent an event raised right before executing a widget. @@ -42,7 +42,7 @@ class Widget extends Component implements ViewContextInterface * @since 2.0.11 */ const EVENT_AFTER_RUN = 'afterRun'; - + /** * @var int a counter used to generate [[id]] for widgets. * @internal @@ -60,11 +60,12 @@ class Widget extends Component implements ViewContextInterface */ public static $stack = []; + /** * Initializes the object. * This method is called at the end of the constructor. * The default implementation will trigger an [[EVENT_INIT]] event. - */ + */ public function init() { parent::init(); @@ -278,7 +279,7 @@ class Widget extends Component implements ViewContextInterface * } * ``` * - * @return boolean whether the widget should continue to be executed. + * @return bool whether the widget should continue to be executed. * @since 2.0.11 */ public function beforeRun() diff --git a/framework/caching/Dependency.php b/framework/caching/Dependency.php index 0ebf3aa515..3a7e9a25fe 100644 --- a/framework/caching/Dependency.php +++ b/framework/caching/Dependency.php @@ -14,7 +14,7 @@ namespace yii\caching; * the actual dependency data. * * For more details and usage information on Cache, see the [guide article on caching](guide:caching-overview). - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/caching/ExpressionDependency.php b/framework/caching/ExpressionDependency.php index baa54adcc6..33957fc79a 100644 --- a/framework/caching/ExpressionDependency.php +++ b/framework/caching/ExpressionDependency.php @@ -18,7 +18,7 @@ namespace yii\caching; * please refer to the [php manual](http://www.php.net/manual/en/language.expressions.php). * * For more details and usage information on Cache, see the [guide article on caching](guide:caching-overview). - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/caching/MemCacheServer.php b/framework/caching/MemCacheServer.php index df8a3263ab..131ce22f92 100644 --- a/framework/caching/MemCacheServer.php +++ b/framework/caching/MemCacheServer.php @@ -14,7 +14,7 @@ namespace yii\caching; * of each configuration property. * * For more details and usage information on Cache, see the [guide article on caching](guide:caching-overview). - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/caching/WinCache.php b/framework/caching/WinCache.php index 4ac4deab61..3201311b15 100644 --- a/framework/caching/WinCache.php +++ b/framework/caching/WinCache.php @@ -16,7 +16,7 @@ namespace yii\caching; * See [[Cache]] manual for common cache operations that are supported by WinCache. * * For more details and usage information on Cache, see the [guide article on caching](guide:caching-overview). - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/caching/XCache.php b/framework/caching/XCache.php index 63c296d425..e620ba9cea 100644 --- a/framework/caching/XCache.php +++ b/framework/caching/XCache.php @@ -17,7 +17,7 @@ namespace yii\caching; * See [[Cache]] for common cache operations that XCache supports. * * For more details and usage information on Cache, see the [guide article on caching](guide:caching-overview). - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/classes.php b/framework/classes.php index ab9f8575af..4d9a566218 100644 --- a/framework/classes.php +++ b/framework/classes.php @@ -54,6 +54,7 @@ return [ 'yii\base\ViewNotFoundException' => YII2_PATH . '/base/ViewNotFoundException.php', 'yii\base\ViewRenderer' => YII2_PATH . '/base/ViewRenderer.php', 'yii\base\Widget' => YII2_PATH . '/base/Widget.php', + 'yii\base\WidgetEvent' => YII2_PATH . '/base/WidgetEvent.php', 'yii\behaviors\AttributeBehavior' => YII2_PATH . '/behaviors/AttributeBehavior.php', 'yii\behaviors\AttributeTypecastBehavior' => YII2_PATH . '/behaviors/AttributeTypecastBehavior.php', 'yii\behaviors\BlameableBehavior' => YII2_PATH . '/behaviors/BlameableBehavior.php', @@ -142,6 +143,7 @@ return [ 'yii\filters\AccessRule' => YII2_PATH . '/filters/AccessRule.php', 'yii\filters\ContentNegotiator' => YII2_PATH . '/filters/ContentNegotiator.php', 'yii\filters\Cors' => YII2_PATH . '/filters/Cors.php', + 'yii\filters\HostControl' => YII2_PATH . '/filters/HostControl.php', 'yii\filters\HttpCache' => YII2_PATH . '/filters/HttpCache.php', 'yii\filters\PageCache' => YII2_PATH . '/filters/PageCache.php', 'yii\filters\RateLimitInterface' => YII2_PATH . '/filters/RateLimitInterface.php', @@ -159,6 +161,7 @@ return [ 'yii\grid\DataColumn' => YII2_PATH . '/grid/DataColumn.php', 'yii\grid\GridView' => YII2_PATH . '/grid/GridView.php', 'yii\grid\GridViewAsset' => YII2_PATH . '/grid/GridViewAsset.php', + 'yii\grid\RadioButtonColumn' => YII2_PATH . '/grid/RadioButtonColumn.php', 'yii\grid\SerialColumn' => YII2_PATH . '/grid/SerialColumn.php', 'yii\helpers\ArrayHelper' => YII2_PATH . '/helpers/ArrayHelper.php', 'yii\helpers\BaseArrayHelper' => YII2_PATH . '/helpers/BaseArrayHelper.php', @@ -299,6 +302,7 @@ return [ 'yii\web\MultipartFormDataParser' => YII2_PATH . '/web/MultipartFormDataParser.php', 'yii\web\NotAcceptableHttpException' => YII2_PATH . '/web/NotAcceptableHttpException.php', 'yii\web\NotFoundHttpException' => YII2_PATH . '/web/NotFoundHttpException.php', + 'yii\web\RangeNotSatisfiableHttpException' => YII2_PATH . '/web/RangeNotSatisfiableHttpException.php', 'yii\web\Request' => YII2_PATH . '/web/Request.php', 'yii\web\RequestParserInterface' => YII2_PATH . '/web/RequestParserInterface.php', 'yii\web\Response' => YII2_PATH . '/web/Response.php', diff --git a/framework/console/UnknownCommandException.php b/framework/console/UnknownCommandException.php index 51c48c1a82..c8ad38c492 100644 --- a/framework/console/UnknownCommandException.php +++ b/framework/console/UnknownCommandException.php @@ -21,6 +21,7 @@ class UnknownCommandException extends Exception * @var string the name of the command that could not be recognized. */ public $command; + /** * @var Application */ diff --git a/framework/data/BaseDataProvider.php b/framework/data/BaseDataProvider.php index fafd9fcc3e..5883c1852b 100644 --- a/framework/data/BaseDataProvider.php +++ b/framework/data/BaseDataProvider.php @@ -23,8 +23,8 @@ use yii\base\InvalidParamException; * @property Pagination|false $pagination The pagination object. If this is false, it means the pagination is * disabled. Note that the type of this property differs in getter and setter. See [[getPagination()]] and * [[setPagination()]] for details. - * @property Sort|bool $sort The sorting object. If this is false, it means the sorting is disabled. Note - * that the type of this property differs in getter and setter. See [[getSort()]] and [[setSort()]] for details. + * @property Sort|bool $sort The sorting object. If this is false, it means the sorting is disabled. Note that + * the type of this property differs in getter and setter. See [[getSort()]] and [[setSort()]] for details. * @property int $totalCount Total number of possible data models. * * @author Qiang Xue diff --git a/framework/data/Pagination.php b/framework/data/Pagination.php index 408b5cba4e..429a5087ee 100644 --- a/framework/data/Pagination.php +++ b/framework/data/Pagination.php @@ -58,13 +58,13 @@ use yii\web\Request; * * For more details and usage information on Pagination, see the [guide article on pagination](guide:output-pagination). * - * @property int $limit 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. - * This property is read-only. + * @property int $limit 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. This + * property is read-only. * @property array $links 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. This property is read-only. - * @property int $offset 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. This property is read-only. + * @property int $offset 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. This property is read-only. * @property int $page The zero-based current page number. * @property int $pageCount Number of pages. This property is read-only. * @property int $pageSize The number of items per page. If it is less than 1, it means the page size is diff --git a/framework/db/ActiveRelationTrait.php b/framework/db/ActiveRelationTrait.php index e8603af240..3a7ce71187 100644 --- a/framework/db/ActiveRelationTrait.php +++ b/framework/db/ActiveRelationTrait.php @@ -88,7 +88,7 @@ trait ActiveRelationTrait * public function getOrderItems() { * return $this->hasMany(OrderItem::className(), ['order_id' => 'id']); * } - * + * * public function getItems() { * return $this->hasMany(Item::className(), ['id' => 'item_id']) * ->via('orderItems'); diff --git a/framework/db/Connection.php b/framework/db/Connection.php index 2502e3a354..c72b21fd64 100644 --- a/framework/db/Connection.php +++ b/framework/db/Connection.php @@ -114,17 +114,18 @@ use yii\caching\Cache; * @property bool $isActive Whether the DB connection is established. This property is read-only. * @property string $lastInsertID The row ID of the last row inserted, or the last value retrieved from the * sequence object. This property is read-only. + * @property Connection $master The currently active master connection. `null` is returned if there is no + * master available. This property is read-only. * @property PDO $masterPdo The PDO instance for the currently active master connection. This property is * read-only. * @property QueryBuilder $queryBuilder The query builder for the current DB connection. This property is * read-only. * @property Schema $schema The schema information for the database opened by this connection. This property * is read-only. - * @property Connection $master The currently active master connection. `null` is returned if there is no master * @property Connection $slave The currently active slave connection. `null` is returned if there is no slave * available and `$fallbackToMaster` is false. This property is read-only. - * @property PDO $slavePdo The PDO instance for the currently active slave connection. `null` is returned if no - * slave connection is available and `$fallbackToMaster` is false. This property is read-only. + * @property PDO $slavePdo The PDO instance for the currently active slave connection. `null` is returned if + * no slave connection is available and `$fallbackToMaster` is false. This property is read-only. * @property Transaction $transaction The currently active transaction. Null if no active transaction. This * property is read-only. * diff --git a/framework/db/QueryInterface.php b/framework/db/QueryInterface.php index 7503fa3664..6fa5194acc 100644 --- a/framework/db/QueryInterface.php +++ b/framework/db/QueryInterface.php @@ -259,7 +259,7 @@ interface QueryInterface * and so on, will return empty or false values. * You should use this method in case your program logic indicates query should not return any results, like * in case you set false where condition like `0=1`. - * @param boolean $value whether to prevent query execution. + * @param bool $value whether to prevent query execution. * @return $this the query object itself. * @since 2.0.11 */ diff --git a/framework/db/QueryTrait.php b/framework/db/QueryTrait.php index d4ffbe9076..a5331b1244 100644 --- a/framework/db/QueryTrait.php +++ b/framework/db/QueryTrait.php @@ -401,7 +401,7 @@ trait QueryTrait * and so on, will return empty or false values. * You should use this method in case your program logic indicates query should not return any results, like * in case you set false where condition like `0=1`. - * @param boolean $value whether to prevent query execution. + * @param bool $value whether to prevent query execution. * @return $this the query object itself. * @since 2.0.11 */ diff --git a/framework/db/Schema.php b/framework/db/Schema.php index 2d67008be1..0d1bdcac61 100644 --- a/framework/db/Schema.php +++ b/framework/db/Schema.php @@ -74,7 +74,6 @@ abstract class Schema extends Object public $exceptionMap = [ 'SQLSTATE[23' => 'yii\db\IntegrityException', ]; - /** * @var string column schema class * @since 2.0.11 diff --git a/framework/db/Transaction.php b/framework/db/Transaction.php index 85aca05fd3..93558ba984 100644 --- a/framework/db/Transaction.php +++ b/framework/db/Transaction.php @@ -38,8 +38,8 @@ use yii\base\InvalidConfigException; * > with PHP 5.x and PHP 7.x. `\Exception` implements the [`\Throwable` interface](http://php.net/manual/en/class.throwable.php) * > since PHP 7.0, so you can skip the part with `\Exception` if your app uses only PHP 7.0 and higher. * - * @property bool $isActive Whether this transaction is active. Only an active transaction can [[commit()]] - * or [[rollBack()]]. This property is read-only. + * @property bool $isActive Whether this transaction is active. Only an active transaction can [[commit()]] or + * [[rollBack()]]. This property is read-only. * @property string $isolationLevel The transaction isolation level to use for this transaction. This can be * one of [[READ_UNCOMMITTED]], [[READ_COMMITTED]], [[REPEATABLE_READ]] and [[SERIALIZABLE]] but also a string * containing DBMS specific syntax to be used after `SET TRANSACTION ISOLATION LEVEL`. This property is diff --git a/framework/di/Container.php b/framework/di/Container.php index 5446126d43..7726c93efb 100644 --- a/framework/di/Container.php +++ b/framework/di/Container.php @@ -573,10 +573,10 @@ class Container extends Component * @param array $definitions array of definitions. There are two allowed formats of array. * The first format: * - key: class name, interface name or alias name. The key will be passed to the [[set()]] method - * as a first argument `$class`. + * as a first argument `$class`. * - value: the definition associated with `$class`. Possible values are described in - * [[set()]] documentation for the `$definition` parameter. Will be passed to the [[set()]] method - * as the second argument `$definition`. + * [[set()]] documentation for the `$definition` parameter. Will be passed to the [[set()]] method + * as the second argument `$definition`. * * Example: * ```php @@ -596,9 +596,9 @@ class Container extends Component * * The second format: * - key: class name, interface name or alias name. The key will be passed to the [[set()]] method - * as a first argument `$class`. + * as a first argument `$class`. * - value: array of two elements. The first element will be passed the [[set()]] method as the - * second argument `$definition`, the second one — as `$params`. + * second argument `$definition`, the second one — as `$params`. * * Example: * ```php diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index 92b7b281c1..a3fbbed6fb 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -663,7 +663,7 @@ class BaseHtml * The following special options are recognized: * * - `doubleEncode`: whether to double encode HTML entities in `$value`. If `false`, HTML entities in `$value` will not - * be further encoded. This option is available since version 2.0.11. + * be further encoded. This option is available since version 2.0.11. * * @return string the generated text area tag */ diff --git a/framework/helpers/BaseStringHelper.php b/framework/helpers/BaseStringHelper.php index 1b8fd81b39..bbee388da6 100644 --- a/framework/helpers/BaseStringHelper.php +++ b/framework/helpers/BaseStringHelper.php @@ -198,7 +198,7 @@ class BaseStringHelper * * @param string $string Input string * @param string $with Part to search inside the $string - * @param bool $caseSensitive Case sensitive search. Default is true. When case sensitive is enabled, $with must exactly match the starting of the string in order to get a true value. + * @param bool $caseSensitive Case sensitive search. Default is true. When case sensitive is enabled, $with must exactly match the starting of the string in order to get a true value. * @return bool Returns true if first input starts with second input, false otherwise */ public static function startsWith($string, $with, $caseSensitive = true) diff --git a/framework/log/Logger.php b/framework/log/Logger.php index ec55341de3..a912717212 100644 --- a/framework/log/Logger.php +++ b/framework/log/Logger.php @@ -35,7 +35,8 @@ use yii\base\Component; * @property float $elapsedTime The total elapsed time in seconds for current request. This property is * read-only. * @property array $profiling The profiling results. Each element is an array consisting of these elements: - * `info`, `category`, `timestamp`, `trace`, `level`, `duration`, `memory`, `memoryDiff`. This property is read-only. + * `info`, `category`, `timestamp`, `trace`, `level`, `duration`, `memory`, `memoryDiff`. The `memory` and + * `memoryDiff` values are available since version 2.0.11. This property is read-only. * * @author Qiang Xue * @since 2.0 diff --git a/framework/log/SyslogTarget.php b/framework/log/SyslogTarget.php index 5db3721b89..2c817b7847 100644 --- a/framework/log/SyslogTarget.php +++ b/framework/log/SyslogTarget.php @@ -47,6 +47,7 @@ class SyslogTarget extends Target Logger::LEVEL_ERROR => LOG_ERR, ]; + /** * @inheritdoc */ diff --git a/framework/rbac/CheckAccessInterface.php b/framework/rbac/CheckAccessInterface.php index 366088a8f4..9a2a598566 100644 --- a/framework/rbac/CheckAccessInterface.php +++ b/framework/rbac/CheckAccessInterface.php @@ -9,7 +9,7 @@ namespace yii\rbac; /** * For more details and usage information on CheckAccessInterface, see the [guide article on security authorization](guide:security-authorization). - * + * * @author Sam Mousa * @since 2.0.9 */ diff --git a/framework/rest/DeleteAction.php b/framework/rest/DeleteAction.php index fe9708bbde..4326a6104d 100644 --- a/framework/rest/DeleteAction.php +++ b/framework/rest/DeleteAction.php @@ -14,7 +14,7 @@ use yii\web\ServerErrorHttpException; * DeleteAction implements the API endpoint for deleting a model. * * For more details and usage information on DeleteAction, see the [guide article on rest controllers](guide:rest-controllers). - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/rest/IndexAction.php b/framework/rest/IndexAction.php index 4147cb1cf4..168b5f00b5 100644 --- a/framework/rest/IndexAction.php +++ b/framework/rest/IndexAction.php @@ -12,9 +12,9 @@ use yii\data\ActiveDataProvider; /** * IndexAction implements the API endpoint for listing multiple models. - * + * * For more details and usage information on IndexAction, see the [guide article on rest controllers](guide:rest-controllers). - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/rest/ViewAction.php b/framework/rest/ViewAction.php index a3f6a4c8f2..3cd11f4ad5 100644 --- a/framework/rest/ViewAction.php +++ b/framework/rest/ViewAction.php @@ -13,7 +13,7 @@ use Yii; * ViewAction implements the API endpoint for returning the detailed information about a model. * * For more details and usage information on ViewAction, see the [guide article on rest controllers](guide:rest-controllers). - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/test/FixtureTrait.php b/framework/test/FixtureTrait.php index 60558b75c8..3e1c9da012 100644 --- a/framework/test/FixtureTrait.php +++ b/framework/test/FixtureTrait.php @@ -20,7 +20,7 @@ use yii\base\InvalidConfigException; * through the syntax `$this->fixtureName('model name')`. * * For more details and usage information on FixtureTrait, see the [guide article on fixtures](guide:test-fixtures). - * + * * @author Qiang Xue * @since 2.0 */ diff --git a/framework/validators/ExistValidator.php b/framework/validators/ExistValidator.php index a58e65c0c1..260bc6539e 100644 --- a/framework/validators/ExistValidator.php +++ b/framework/validators/ExistValidator.php @@ -64,13 +64,13 @@ class ExistValidator extends Validator * @var bool whether to allow array type attribute. */ public $allowArray = false; - /** * @var string and|or define how target attributes are related * @since 2.0.11 */ public $targetAttributeJunction = 'and'; + /** * @inheritdoc */ diff --git a/framework/validators/UniqueValidator.php b/framework/validators/UniqueValidator.php index be3f2889e3..344b8c18d2 100644 --- a/framework/validators/UniqueValidator.php +++ b/framework/validators/UniqueValidator.php @@ -83,13 +83,13 @@ class UniqueValidator extends Validator * to setup custom message for multiple target attributes. */ public $comboNotUnique; - /** * @var string and|or define how target attributes are related * @since 2.0.11 */ public $targetAttributeJunction = 'and'; + /** * @inheritdoc */ @@ -218,7 +218,7 @@ class UniqueValidator extends Validator * If the key and the value are the same, you can just specify the value. * @param Model $model the data model to be validated * @param string $attribute the name of the attribute to be validated in the $model - + * * @return array conditions, compatible with [[\yii\db\Query::where()|Query::where()]] key-value format. */ private function prepareConditions($targetAttribute, $model, $attribute) diff --git a/framework/web/ErrorAction.php b/framework/web/ErrorAction.php index 4dbf49c7a1..ff3d5fad04 100644 --- a/framework/web/ErrorAction.php +++ b/framework/web/ErrorAction.php @@ -66,6 +66,7 @@ class ErrorAction extends Action * Defaults to "An internal server error occurred.". */ public $defaultMessage; + /** * @var \Exception the exception object, normally is filled on [[init()]] method call. * @see [[findException()]] to know default way of obtaining exception. @@ -73,6 +74,7 @@ class ErrorAction extends Action */ protected $exception; + /** * {@inheritdoc} */ diff --git a/framework/web/RangeNotSatisfiableHttpException.php b/framework/web/RangeNotSatisfiableHttpException.php index c1ccbca572..18c1ebb550 100644 --- a/framework/web/RangeNotSatisfiableHttpException.php +++ b/framework/web/RangeNotSatisfiableHttpException.php @@ -25,7 +25,7 @@ class RangeNotSatisfiableHttpException extends HttpException /** * Constructor. * @param string $message error message - * @param integer $code error code + * @param int $code error code * @param \Exception $previous The previous exception used for the exception chaining. */ public function __construct($message = null, $code = 0, \Exception $previous = null) diff --git a/framework/web/Request.php b/framework/web/Request.php index 8fa5461d4b..d914bec835 100644 --- a/framework/web/Request.php +++ b/framework/web/Request.php @@ -44,13 +44,13 @@ use yii\helpers\StringHelper; * @property array $eTags The entity tags. This property is read-only. * @property HeaderCollection $headers The header collection. This property is read-only. * @property string|null $hostInfo Schema and hostname part (with port number if needed) of the request URL - * (e.g. `http://www.yiiframework.com`), null if can't be obtained from `$_SERVER` and wasn't set. + * (e.g. `http://www.yiiframework.com`), null if can't be obtained from `$_SERVER` and wasn't set. See + * [[getHostInfo()]] for security related notes on this property. * @property string|null $hostName Hostname part of the request URL (e.g. `www.yiiframework.com`). This * property is read-only. * @property bool $isAjax Whether this is an AJAX (XMLHttpRequest) request. This property is read-only. * @property bool $isDelete Whether this is a DELETE request. This property is read-only. - * @property bool $isFlash Whether this is an Adobe Flash or Adobe Flex request. This property is - * read-only. + * @property bool $isFlash Whether this is an Adobe Flash or Adobe Flex request. This property is read-only. * @property bool $isGet Whether this is a GET request. This property is read-only. * @property bool $isHead Whether this is a HEAD request. This property is read-only. * @property bool $isOptions Whether this is a OPTIONS request. This property is read-only. diff --git a/framework/web/Response.php b/framework/web/Response.php index 539966ed69..dc63fc9ec1 100644 --- a/framework/web/Response.php +++ b/framework/web/Response.php @@ -40,19 +40,17 @@ use yii\helpers\StringHelper; * @property CookieCollection $cookies The cookie collection. This property is read-only. * @property string $downloadHeaders The attachment file name. This property is write-only. * @property HeaderCollection $headers The header collection. This property is read-only. - * @property bool $isClientError Whether this response indicates a client error. This property is - * read-only. + * @property bool $isClientError Whether this response indicates a client error. This property is read-only. * @property bool $isEmpty Whether this response is empty. This property is read-only. - * @property bool $isForbidden Whether this response indicates the current request is forbidden. This - * property is read-only. + * @property bool $isForbidden Whether this response indicates the current request is forbidden. This property + * is read-only. * @property bool $isInformational Whether this response is informational. This property is read-only. * @property bool $isInvalid Whether this response has a valid [[statusCode]]. This property is read-only. - * @property bool $isNotFound Whether this response indicates the currently requested resource is not - * found. This property is read-only. + * @property bool $isNotFound Whether this response indicates the currently requested resource is not found. + * This property is read-only. * @property bool $isOk Whether this response is OK. This property is read-only. * @property bool $isRedirection Whether this response is a redirection. This property is read-only. - * @property bool $isServerError Whether this response indicates a server error. This property is - * read-only. + * @property bool $isServerError Whether this response indicates a server error. This property is read-only. * @property bool $isSuccessful Whether this response is successful. This property is read-only. * @property int $statusCode The HTTP status code to send with the response. * diff --git a/framework/web/Session.php b/framework/web/Session.php index 1969b64263..923f97f2fe 100644 --- a/framework/web/Session.php +++ b/framework/web/Session.php @@ -61,10 +61,9 @@ use yii\base\InvalidParamException; * read-only. * @property string $name The current session name. * @property string $savePath The current session save path, defaults to '/tmp'. - * @property int $timeout The number of seconds after which data will be seen as 'garbage' and cleaned up. - * The default value is 1440 seconds (or the value of "session.gc_maxlifetime" set in php.ini). - * @property bool|null $useCookies The value indicating whether cookies should be used to store session - * IDs. + * @property int $timeout The number of seconds after which data will be seen as 'garbage' and cleaned up. The + * default value is 1440 seconds (or the value of "session.gc_maxlifetime" set in php.ini). + * @property bool|null $useCookies The value indicating whether cookies should be used to store session IDs. * @property bool $useCustomStorage Whether to use custom storage. This property is read-only. * @property bool $useTransparentSessionID Whether transparent sid support is enabled or not, defaults to * false. diff --git a/framework/web/UrlManager.php b/framework/web/UrlManager.php index 9d23367abe..524fca7588 100644 --- a/framework/web/UrlManager.php +++ b/framework/web/UrlManager.php @@ -38,7 +38,7 @@ use yii\helpers\Url; * For more details and usage information on UrlManager, see the [guide article on routing](guide:runtime-routing). * * @property string $baseUrl The base URL that is used by [[createUrl()]] to prepend to created URLs. - * @property string $hostInfo The host info (e.g. "http://www.example.com") that is used by + * @property string $hostInfo The host info (e.g. `http://www.example.com`) that is used by * [[createAbsoluteUrl()]] to prepend to created URLs. * @property string $scriptUrl The entry script URL that is used by [[createUrl()]] to prepend to created * URLs. diff --git a/framework/web/UrlRule.php b/framework/web/UrlRule.php index d195de4c18..6e264985d2 100644 --- a/framework/web/UrlRule.php +++ b/framework/web/UrlRule.php @@ -126,6 +126,7 @@ class UrlRule extends Object implements UrlRuleInterface */ private $_routeParams = []; + /** * @return string * @since 2.0.11 diff --git a/framework/web/User.php b/framework/web/User.php index 6256036151..d671d3808d 100644 --- a/framework/web/User.php +++ b/framework/web/User.php @@ -46,8 +46,8 @@ use yii\rbac\CheckAccessInterface; * ] * ``` * - * @property string|int $id The unique identifier for the user. If `null`, it means the user is a guest. - * This property is read-only. + * @property string|int $id The unique identifier for the user. If `null`, it means the user is a guest. This + * property is read-only. * @property IdentityInterface|null $identity The identity object associated with the currently logged-in * user. `null` is returned if the user is not logged in (not authenticated). * @property bool $isGuest Whether the current user is a guest. This property is read-only. @@ -226,7 +226,7 @@ class User extends Component * - the identity information will be stored in session and be available in the next requests * - in case of `$duration == 0`: as long as the session remains active or till the user closes the browser * - in case of `$duration > 0`: as long as the session remains active or as long as the cookie - * remains valid by it's `$duration` in seconds when [[enableAutoLogin]] is set `true`. + * remains valid by it's `$duration` in seconds when [[enableAutoLogin]] is set `true`. * * If [[enableSession]] is `false`: * - the `$duration` parameter will be ignored diff --git a/framework/web/XmlResponseFormatter.php b/framework/web/XmlResponseFormatter.php index f77d141dee..c07a07ca0c 100644 --- a/framework/web/XmlResponseFormatter.php +++ b/framework/web/XmlResponseFormatter.php @@ -56,6 +56,7 @@ class XmlResponseFormatter extends Component implements ResponseFormatterInterfa */ public $useObjectTags = true; + /** * Formats the specified response. * @param Response $response the response to be formatted. diff --git a/framework/widgets/ActiveField.php b/framework/widgets/ActiveField.php index 5bac679997..3030a2ddf5 100644 --- a/framework/widgets/ActiveField.php +++ b/framework/widgets/ActiveField.php @@ -163,6 +163,7 @@ class ActiveField extends Component */ private $_skipLabelFor = false; + /** * PHP magic method that returns the string representation of this object. * @return string the string representation of this object. diff --git a/framework/widgets/LinkPager.php b/framework/widgets/LinkPager.php index 1f92e0a116..484404ec61 100644 --- a/framework/widgets/LinkPager.php +++ b/framework/widgets/LinkPager.php @@ -75,18 +75,16 @@ class LinkPager extends Widget * @var string the CSS class for the disabled page buttons. */ public $disabledPageCssClass = 'disabled'; - /** * @var array the options for the disabled tag to be generated inside the disabled list element. * In order to customize the html tag, please use the tag key. - * + * * ```php * $disabledListItemSubTagOptions = ['tag' => 'div', 'class' => 'disabled-div']; * ``` * @since 2.0.11 */ public $disabledListItemSubTagOptions = []; - /** * @var int maximum number of page buttons that can be displayed. Defaults to 10. */ diff --git a/framework/widgets/ListView.php b/framework/widgets/ListView.php index dfb848ccc0..17a862ddb5 100644 --- a/framework/widgets/ListView.php +++ b/framework/widgets/ListView.php @@ -105,6 +105,7 @@ class ListView extends BaseListView */ public $afterItem; + /** * Renders all data models. * @return string the rendering result