Browse Source

Fixes #12055: Changed `boolean` to `bool` and `integer` to `int` in phpdoc

tags/2.0.11
Robert Korulczyk 8 years ago committed by Alexander Makarov
parent
commit
4aa935e69e
  1. 2
      build/controllers/PhpDocController.php
  2. 2
      docs/guide-es/caching-http.md
  3. 2
      docs/guide-es/input-validation.md
  4. 4
      docs/guide-es/security-authorization.md
  5. 2
      docs/guide-fr/input-validation.md
  6. 4
      docs/guide-fr/security-authentication.md
  7. 4
      docs/guide-fr/security-authorization.md
  8. 2
      docs/guide-ja/caching-http.md
  9. 2
      docs/guide-ja/input-validation.md
  10. 4
      docs/guide-ja/security-authentication.md
  11. 4
      docs/guide-ja/security-authorization.md
  12. 2
      docs/guide-pl/caching-http.md
  13. 2
      docs/guide-pl/input-validation.md
  14. 2
      docs/guide-pt-BR/caching-http.md
  15. 4
      docs/guide-pt-BR/security-authentication.md
  16. 4
      docs/guide-pt-BR/security-authorization.md
  17. 2
      docs/guide-ru/caching-http.md
  18. 2
      docs/guide-ru/input-validation.md
  19. 4
      docs/guide-ru/security-authentication.md
  20. 4
      docs/guide-ru/security-authorization.md
  21. 2
      docs/guide-zh-CN/caching-http.md
  22. 2
      docs/guide-zh-CN/input-validation.md
  23. 2
      docs/guide/caching-http.md
  24. 2
      docs/guide/input-validation.md
  25. 4
      docs/guide/security-authentication.md
  26. 4
      docs/guide/security-authorization.md
  27. 6
      docs/internals-ja/core-code-style.md
  28. 2
      docs/internals-pl/core-code-style.md
  29. 2
      docs/internals-ru/core-code-style.md
  30. 2
      docs/internals-uk/core-code-style.md
  31. 6
      docs/internals/core-code-style.md
  32. 6
      framework/BaseYii.php
  33. 2
      framework/base/Action.php
  34. 2
      framework/base/ActionEvent.php
  35. 4
      framework/base/ActionFilter.php
  36. 8
      framework/base/Application.php
  37. 8
      framework/base/ArrayAccessTrait.php
  38. 2
      framework/base/Arrayable.php
  39. 2
      framework/base/ArrayableTrait.php
  40. 32
      framework/base/Component.php
  41. 4
      framework/base/Controller.php
  42. 2
      framework/base/ErrorException.php
  43. 16
      framework/base/ErrorHandler.php
  44. 8
      framework/base/Event.php
  45. 6
      framework/base/ExitException.php
  46. 26
      framework/base/Model.php
  47. 2
      framework/base/ModelEvent.php
  48. 14
      framework/base/Module.php
  49. 16
      framework/base/Object.php
  50. 6
      framework/base/Request.php
  51. 2
      framework/base/Response.php
  52. 36
      framework/base/Security.php
  53. 10
      framework/base/View.php
  54. 2
      framework/base/ViewEvent.php
  55. 4
      framework/base/Widget.php
  56. 2
      framework/behaviors/AttributeBehavior.php
  57. 10
      framework/behaviors/AttributeTypecastBehavior.php
  58. 10
      framework/behaviors/SluggableBehavior.php
  59. 20
      framework/caching/ApcCache.php
  60. 48
      framework/caching/Cache.php
  61. 4
      framework/caching/ChainedDependency.php
  62. 18
      framework/caching/DbCache.php
  63. 4
      framework/caching/Dependency.php
  64. 12
      framework/caching/DummyCache.php
  65. 28
      framework/caching/FileCache.php
  66. 16
      framework/caching/MemCache.php
  67. 12
      framework/caching/MemCacheServer.php
  68. 2
      framework/caching/TagDependency.php
  69. 20
      framework/caching/WinCache.php
  70. 14
      framework/caching/XCache.php
  71. 12
      framework/caching/ZendDataCache.php
  72. 26
      framework/captcha/CaptchaAction.php
  73. 4
      framework/captcha/CaptchaValidator.php
  74. 4
      framework/console/Application.php
  75. 18
      framework/console/Controller.php
  76. 6
      framework/console/controllers/AssetController.php
  77. 30
      framework/console/controllers/BaseMigrateController.php
  78. 6
      framework/console/controllers/CacheController.php
  79. 6
      framework/console/controllers/FixtureController.php
  80. 6
      framework/console/controllers/HelpController.php
  81. 46
      framework/console/controllers/MessageController.php
  82. 4
      framework/console/controllers/MigrateController.php
  83. 4
      framework/console/controllers/ServeController.php
  84. 22
      framework/data/BaseDataProvider.php
  85. 6
      framework/data/DataProviderInterface.php
  86. 48
      framework/data/Pagination.php
  87. 14
      framework/data/Sort.php
  88. 4
      framework/db/ActiveQuery.php
  89. 2
      framework/db/ActiveQueryInterface.php
  90. 4
      framework/db/ActiveQueryTrait.php
  91. 28
      framework/db/ActiveRecord.php
  92. 34
      framework/db/ActiveRecordInterface.php
  93. 4
      framework/db/ActiveRelationTrait.php
  94. 64
      framework/db/BaseActiveRecord.php
  95. 10
      framework/db/BatchQueryResult.php
  96. 14
      framework/db/ColumnSchema.php
  97. 12
      framework/db/ColumnSchemaBuilder.php
  98. 30
      framework/db/Command.php
  99. 30
      framework/db/Connection.php
  100. 30
      framework/db/DataReader.php
  101. Some files were not shown because too many files have changed in this diff Show More

2
build/controllers/PhpDocController.php

@ -23,7 +23,7 @@ class PhpDocController extends Controller
{
public $defaultAction = 'property';
/**
* @var boolean whether to update class docs directly. Setting this to false will just output docs
* @var bool whether to update class docs directly. Setting this to false will just output docs
* for copy and paste.
*/
public $updateFiles = true;

2
docs/guide-es/caching-http.md

@ -28,7 +28,7 @@ la página. El formato de la función de llamada de retorno debe ser el siguient
/**
* @param Action $action el objeto acción que se está controlando actualmente
* @param array $params el valor de la propiedad "params"
* @return integer un sello de tiempo UNIX que representa el tiempo de modificación de la página
* @return int un sello de tiempo UNIX que representa el tiempo de modificación de la página
*/
function ($action, $params)
```

2
docs/guide-es/input-validation.md

@ -176,7 +176,7 @@ La propiedad [[yii\validators\Validator::when|when]] toma un método invocable P
/**
* @param Model $model el modelo siendo validado
* @param string $attribute al atributo siendo validado
* @return boolean si la regla debe ser aplicada o no
* @return bool si la regla debe ser aplicada o no
*/
function ($model, $attribute)
```

4
docs/guide-es/security-authorization.md

@ -362,10 +362,10 @@ class AuthorRule extends Rule
public $name = 'isAuthor';
/**
* @param string|integer $user el ID de usuario.
* @param string|int $user el ID de usuario.
* @param Item $item el rol o permiso asociado a la regla
* @param array $params parámetros pasados a ManagerInterface::checkAccess().
* @return boolean un valor indicando si la regla permite al rol o permiso con el que está asociado.
* @return bool un valor indicando si la regla permite al rol o permiso con el que está asociado.
*/
public function execute($user, $item, $params)
{

2
docs/guide-fr/input-validation.md

@ -145,7 +145,7 @@ La propriété [[yii\validators\Validator::when|when]] accepte une fonction de r
/**
* @param Model $model le modèle en cours de validation
* @param string $attribute l'attribut en cours de validation
* @return boolean `true` si la règle doit être appliqué, `false` si non
* @return bool `true` si la règle doit être appliqué, `false` si non
*/
function ($model, $attribute)
```

4
docs/guide-fr/security-authentication.md

@ -55,7 +55,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* Trouve une identité à partir de l'identifiant donné.
*
* @param string|integer $id l'identifiant à rechercher
* @param string|int $id l'identifiant à rechercher
* @return IdentityInterface|null l'objet identité qui correspond à l'identifiant donné
*/
public static function findIdentity($id)
@ -92,7 +92,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* @param string $authKey
* @return boolean si la clé d'authentification est valide pour l'utilisateur courant
* @return bool si la clé d'authentification est valide pour l'utilisateur courant
*/
public function validateAuthKey($authKey)
{

4
docs/guide-fr/security-authorization.md

@ -311,10 +311,10 @@ class AuthorRule extends Rule
public $name = 'isAuthor';
/**
* @param string|integer $user l'identifiant de l'utilisateur.
* @param string|int $user l'identifiant de l'utilisateur.
* @param Item $item le rôle ou la permission avec laquelle cette règle est associée
* @param array $params les paramètres passés à ManagerInterface::checkAccess().
* @return boolean une valeur indiquant si la règles autorise le rôle ou la permission qui lui est associé.
* @return bool une valeur indiquant si la règles autorise le rôle ou la permission qui lui est associé.
*/
public function execute($user, $item, $params)
{

2
docs/guide-ja/caching-http.md

@ -23,7 +23,7 @@ HTTP キャッシュ
/**
* @param Action $action 現在扱っているアクションオブジェクト
* @param array $params "params" プロパティの値
* @return integer ページの更新時刻を表す UNIX タイムスタンプ
* @return int ページの更新時刻を表す UNIX タイムスタンプ
*/
function ($action, $params)
```

2
docs/guide-ja/input-validation.md

@ -162,7 +162,7 @@ public function rules()
/**
* @param Model $model 検証されるモデル
* @param string $attribute 検証される属性
* @return boolean 規則が適用されるか否か
* @return bool 規則が適用されるか否か
*/
function ($model, $attribute)
```

4
docs/guide-ja/security-authentication.md

@ -63,7 +63,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* 与えられた ID によってユーザ識別情報を探す
*
* @param string|integer $id 探すための ID
* @param string|int $id 探すための ID
* @return IdentityInterface|null 与えられた ID に合致する Identity オブジェクト
*/
public static function findIdentity($id)
@ -100,7 +100,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* @param string $authKey
* @return boolean 認証キーが現在のユーザに対して有効か否か
* @return bool 認証キーが現在のユーザに対して有効か否か
*/
public function validateAuthKey($authKey)
{

4
docs/guide-ja/security-authorization.md

@ -363,10 +363,10 @@ class AuthorRule extends Rule
public $name = 'isAuthor';
/**
* @param string|integer $user ユーザ ID
* @param string|int $user ユーザ ID
* @param Item $item この規則が関連付けられているロールまたは許可
* @param array $params ManagerInterface::checkAccess() に渡されたパラメータ
* @return boolean 関連付けられたロールまたは許可を認めるか否かを示す値
* @return bool 関連付けられたロールまたは許可を認めるか否かを示す値
*/
public function execute($user, $item, $params)
{

2
docs/guide-pl/caching-http.md

@ -26,7 +26,7 @@ typu PHP callable i zwracać uniksowy znacznik czasu informujący o czasie modyf
/**
* @param Action $action aktualnie przetwarzany obiekt akcji
* @param array $params wartość właściwości "params"
* @return integer uniksowy znacznik czasu modyfikacji strony
* @return int uniksowy znacznik czasu modyfikacji strony
*/
function ($action, $params)
```

2
docs/guide-pl/input-validation.md

@ -166,7 +166,7 @@ Właściwość [[yii\validators\Validator::when|when]] pobiera możliwą do wywo
/**
* @param Model $model model, który podlega walidacji
* @param string $attribute atrybut, który podlega walidacji
* @return boolean wartość zwrotna; czy reguła powinna zostać zastosowana
* @return bool wartość zwrotna; czy reguła powinna zostać zastosowana
*/
function ($model, $attribute)
```

2
docs/guide-pt-BR/caching-http.md

@ -21,7 +21,7 @@ Você pode configurar a propriedade [[yii\filters\HttpCache::lastModified]] para
/**
* @param Action $action O Objeto da ação que está sendo manipulada no momento
* @param array $params o valor da propriedade "params"
* @return integer uma data(timestamp) UNIX timestamp representando o tempo da
* @return int uma data(timestamp) UNIX timestamp representando o tempo da
* última modificação na página
*/
function ($action, $params)

4
docs/guide-pt-BR/security-authentication.md

@ -57,7 +57,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* Localiza uma identidade pelo ID informado
*
* @param string|integer $id o ID a ser localizado
* @param string|int $id o ID a ser localizado
* @return IdentityInterface|null o objeto da identidade que corresponde ao ID informado
*/
public static function findIdentity($id)
@ -94,7 +94,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* @param string $authKey
* @return boolean se a chave de autenticação do usuário atual for válida
* @return bool se a chave de autenticação do usuário atual for válida
*/
public function validateAuthKey($authKey)
{

4
docs/guide-pt-BR/security-authorization.md

@ -314,10 +314,10 @@ class AuthorRule extends Rule
public $name = 'isAuthor';
/**
* @param string|integer $user the user ID.
* @param string|int $user the user ID.
* @param Item $item the role or permission that this rule is associated with
* @param array $params parameters passed to ManagerInterface::checkAccess().
* @return boolean a value indicating whether the rule permits the role or permission it is associated with.
* @return bool a value indicating whether the rule permits the role or permission it is associated with.
*/
public function execute($user, $item, $params)
{

2
docs/guide-ru/caching-http.md

@ -20,7 +20,7 @@ HTTP кэширование
/**
* @param Action $action объект действия, которое в настоящее время обрабатывается
* @param array $params значение свойства "params"
* @return integer временная метка UNIX timestamp, возвращающая время последнего изменения страницы
* @return int временная метка UNIX timestamp, возвращающая время последнего изменения страницы
*/
function ($action, $params)
```

2
docs/guide-ru/input-validation.md

@ -162,7 +162,7 @@ public function rules()
/**
* @param Model $model модель используемая для проверки
* @param string $attribute атрибут для проверки
* @return boolean следует ли применять правило
* @return bool следует ли применять правило
*/
function ($model, $attribute)
```

4
docs/guide-ru/security-authentication.md

@ -71,7 +71,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* Finds an identity by the given ID.
*
* @param string|integer $id the ID to be looked for
* @param string|int $id the ID to be looked for
* @return IdentityInterface|null the identity object that matches the given ID.
*/
public static function findIdentity($id)
@ -108,7 +108,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* @param string $authKey
* @return boolean if auth key is valid for current user
* @return bool if auth key is valid for current user
*/
public function validateAuthKey($authKey)
{

4
docs/guide-ru/security-authorization.md

@ -358,10 +358,10 @@ class AuthorRule extends Rule
public $name = 'isAuthor';
/**
* @param string|integer $user the user ID.
* @param string|int $user the user ID.
* @param Item $item the role or permission that this rule is associated width.
* @param array $params parameters passed to ManagerInterface::checkAccess().
* @return boolean a value indicating whether the rule permits the role or permission it is associated with.
* @return bool a value indicating whether the rule permits the role or permission it is associated with.
*/
public function execute($user, $item, $params)
{

2
docs/guide-zh-CN/caching-http.md

@ -20,7 +20,7 @@ HTTP 缓存
/**
* @param Action $action 当前处理的操作对象
* @param array $params “params” 属性的值
* @return integer 页面修改时的 Unix 时间戳
* @return int 页面修改时的 Unix 时间戳
*/
function ($action, $params)
```

2
docs/guide-zh-CN/input-validation.md

@ -126,7 +126,7 @@ public function rules()
/**
* @param Model $model 要验证的模型对象
* @param string $attribute 待测特性名
* @return boolean 返回是否启用该规则
* @return bool 返回是否启用该规则
*/
function ($model, $attribute)
```

2
docs/guide/caching-http.md

@ -25,7 +25,7 @@ the page modification time. The signature of the PHP callable should be as follo
/**
* @param Action $action the action object that is being handled currently
* @param array $params the value of the "params" property
* @return integer a UNIX timestamp representing the page modification time
* @return int a UNIX timestamp representing the page modification time
*/
function ($action, $params)
```

2
docs/guide/input-validation.md

@ -176,7 +176,7 @@ The [[yii\validators\Validator::when|when]] property takes a PHP callable with t
/**
* @param Model $model the model being validated
* @param string $attribute the attribute being validated
* @return boolean whether the rule should be applied
* @return bool whether the rule should be applied
*/
function ($model, $attribute)
```

4
docs/guide/security-authentication.md

@ -71,7 +71,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* Finds an identity by the given ID.
*
* @param string|integer $id the ID to be looked for
* @param string|int $id the ID to be looked for
* @return IdentityInterface|null the identity object that matches the given ID.
*/
public static function findIdentity($id)
@ -108,7 +108,7 @@ class User extends ActiveRecord implements IdentityInterface
/**
* @param string $authKey
* @return boolean if auth key is valid for current user
* @return bool if auth key is valid for current user
*/
public function validateAuthKey($authKey)
{

4
docs/guide/security-authorization.md

@ -362,10 +362,10 @@ class AuthorRule extends Rule
public $name = 'isAuthor';
/**
* @param string|integer $user the user ID.
* @param string|int $user the user ID.
* @param Item $item the role or permission that this rule is associated with
* @param array $params parameters passed to ManagerInterface::checkAccess().
* @return boolean a value indicating whether the rule permits the role or permission it is associated with.
* @return bool a value indicating whether the rule permits the role or permission it is associated with.
*/
public function execute($user, $item, $params)
{

6
docs/internals-ja/core-code-style.md

@ -145,7 +145,7 @@ class Foo
### 4.4 Doc ブロック
`@param`、`@var`、`@property` および `@return``boolean`、`integer`、`string`、`array` または `null` として型を宣言しなければなりません。
`@param`、`@var`、`@property` および `@return``bool`、`int`、`string`、`array` または `null` として型を宣言しなければなりません。
`Model` または `ActiveRecord` のようなクラス名を使うことも出来ます。
型付きの配列に対しては `ClassName[]` を使います。
@ -301,10 +301,10 @@ switch ($this->phpType) {
break;
case 'integer':
case 'int':
$a = (integer)$value;
$a = (int) $value;
break;
case 'boolean':
$a = (boolean)$value;
$a = (bool) $value;
break;
default:
$a = null;

2
docs/internals-pl/core-code-style.md

@ -143,7 +143,7 @@ class Foo
### 4.4 Bloki dokumentacji
`@param`, `@var`, `@property` oraz `@return` muszą używać typów zadeklarowanych jako `boolean`, `integer`, `string`, `array` lub `null`.
`@param`, `@var`, `@property` oraz `@return` muszą używać typów zadeklarowanych jako `bool`, `int`, `string`, `array` lub `null`.
Można również używać nazw klas jak `Model` lub `ActiveRecord`. Dla typowanych tablic należy używać `ClassName[]`.
### 4.5 Konstruktory

2
docs/internals-ru/core-code-style.md

@ -137,7 +137,7 @@ class Foo
### 4.4 Блоки Документации
`@param`, `@var`, `@property` и `@return` должны описывать типы `boolean`, `integer`, `string`, `array` или `null`. Вы можете использовать и имена классов, например `Model` или `ActiveRecord`. Для типизированных массивов используйте `ClassName[]`.
`@param`, `@var`, `@property` и `@return` должны описывать типы `bool`, `int`, `string`, `array` или `null`. Вы можете использовать и имена классов, например `Model` или `ActiveRecord`. Для типизированных массивов используйте `ClassName[]`.
### 4.5 Конструкторы

2
docs/internals-uk/core-code-style.md

@ -134,7 +134,7 @@ class Foo
### 4.4 Блоки документації PHPDoc (Doc-блоки)
`@param`, `@var`, `@property` та `@return` повинні оголошувати типи як `boolean`, `integer`, `string`, `array` чи `null`. Також можна використовувати імена класів, як наприклад: `Model` або `ActiveRecord`. Для типізованих масивів використовуйте `ClassName[]`.
`@param`, `@var`, `@property` та `@return` повинні оголошувати типи як `bool`, `int`, `string`, `array` чи `null`. Також можна використовувати імена класів, як наприклад: `Model` або `ActiveRecord`. Для типізованих масивів використовуйте `ClassName[]`.
### 4.5 Конструктори

6
docs/internals/core-code-style.md

@ -144,7 +144,7 @@ class Foo
### 4.4 PHPDoc blocks
- `@param`, `@var`, `@property` and `@return` must declare types as `boolean`, `integer`, `string`, `array` or `null`.
- `@param`, `@var`, `@property` and `@return` must declare types as `bool`, `int`, `string`, `array` or `null`.
You can use a class names as well such as `Model` or `ActiveRecord`.
- For a typed arrays use `ClassName[]`.
- The first line of the PHPDoc must describe the purpose of the method.
@ -156,9 +156,9 @@ class Foo
* Checkes whether the IP is in subnet range
*
* @param string $ip an IPv4 or IPv6 address
* @param integer $cidr the CIDR lendth
* @param int $cidr the CIDR lendth
* @param string $range subnet in CIDR format e.g. `10.0.0.0/8` or `2001:af::/64`
* @return boolean whether the IP is in subnet range
* @return bool whether the IP is in subnet range
*/
private function inRange($ip, $cidr, $range)
{

6
framework/BaseYii.php

@ -120,9 +120,9 @@ 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.
* @param bool $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.
* @return string|bool 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()
*/
@ -160,7 +160,7 @@ class BaseYii
* 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
* @return string|boolean the root alias, or false if no root alias is found
* @return string|bool the root alias, or false if no root alias is found
*/
public static function getRootAlias($alias)
{

2
framework/base/Action.php

@ -105,7 +105,7 @@ class Action extends Component
* You may override this method to do preparation work for the action run.
* If the method returns false, it will cancel the action.
*
* @return boolean whether to run the action.
* @return bool whether to run the action.
*/
protected function beforeRun()
{

2
framework/base/ActionEvent.php

@ -26,7 +26,7 @@ class ActionEvent extends Event
*/
public $result;
/**
* @var boolean whether to continue running the action. Event handlers of
* @var bool whether to continue running the action. Event handlers of
* [[Controller::EVENT_BEFORE_ACTION]] may set this property to decide whether
* to continue running the current action.
*/

4
framework/base/ActionFilter.php

@ -95,7 +95,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.
* @return boolean whether the action should continue to be executed.
* @return bool whether the action should continue to be executed.
*/
public function beforeAction($action)
{
@ -138,7 +138,7 @@ class ActionFilter extends Behavior
/**
* Returns a value indicating whether the filter is active for the given action.
* @param Action $action the action being filtered
* @return boolean whether the filter is active for the given action.
* @return bool whether the filter is active for the given action.
*/
protected function isActive($action)
{

8
framework/base/Application.php

@ -118,7 +118,7 @@ abstract class Application extends Module
*/
public $controller;
/**
* @var string|boolean the layout that should be applied for views in this application. Defaults to 'main'.
* @var string|bool the layout that should be applied for views in this application. Defaults to 'main'.
* If this is false, layout will be disabled.
*/
public $layout = 'main';
@ -174,7 +174,7 @@ abstract class Application extends Module
*/
public $bootstrap = [];
/**
* @var integer the current application state during a request handling life cycle.
* @var int the current application state during a request handling life cycle.
* This property is managed by the application. Do not modify this property.
*/
public $state;
@ -360,7 +360,7 @@ abstract class Application extends Module
/**
* Runs the application.
* This is the main entrance of an application.
* @return integer the exit status (0 means normal, non-zero values mean abnormal)
* @return int the exit status (0 means normal, non-zero values mean abnormal)
*/
public function run()
{
@ -629,7 +629,7 @@ abstract class Application extends Module
* Terminates the application.
* This method replaces the `exit()` function by ensuring the application life cycle is completed
* before terminating the application.
* @param integer $status the exit status (value 0 means normal exit while other values mean abnormal exit).
* @param int $status the exit status (value 0 means normal exit while other values mean abnormal exit).
* @param Response $response the response to be sent. If not set, the default application [[response]] component will be used.
* @throws ExitException if the application is in testing mode
*/

8
framework/base/ArrayAccessTrait.php

@ -34,7 +34,7 @@ trait ArrayAccessTrait
/**
* Returns the number of data items.
* This method is required by Countable interface.
* @return integer number of data elements.
* @return int number of data elements.
*/
public function count()
{
@ -44,7 +44,7 @@ trait ArrayAccessTrait
/**
* This method is required by the interface [[\ArrayAccess]].
* @param mixed $offset the offset to check on
* @return boolean
* @return bool
*/
public function offsetExists($offset)
{
@ -53,7 +53,7 @@ trait ArrayAccessTrait
/**
* This method is required by the interface [[\ArrayAccess]].
* @param integer $offset the offset to retrieve element.
* @param int $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)
@ -63,7 +63,7 @@ trait ArrayAccessTrait
/**
* This method is required by the interface [[\ArrayAccess]].
* @param integer $offset the offset to set element
* @param int $offset the offset to set element
* @param mixed $item the element value
*/
public function offsetSet($offset, $item)

2
framework/base/Arrayable.php

@ -85,7 +85,7 @@ interface Arrayable
* @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.
* @param bool $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);

2
framework/base/ArrayableTrait.php

@ -110,7 +110,7 @@ trait ArrayableTrait
* @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.
* @param bool $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)

32
framework/base/Component.php

@ -211,7 +211,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
* @return boolean whether the named property is set
* @return bool whether the named property is set
* @see http://php.net/manual/en/function.isset.php
*/
public function __isset($name)
@ -307,9 +307,9 @@ class Component extends Object
* - 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
* @return boolean whether the property is defined
* @param bool $checkVars whether to treat member variables as properties
* @param bool $checkBehaviors whether to treat behaviors' properties as properties of this component
* @return bool whether the property is defined
* @see canGetProperty()
* @see canSetProperty()
*/
@ -328,9 +328,9 @@ class Component extends Object
* - 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
* @return boolean whether the property can be read
* @param bool $checkVars whether to treat member variables as properties
* @param bool $checkBehaviors whether to treat behaviors' properties as properties of this component
* @return bool whether the property can be read
* @see canSetProperty()
*/
public function canGetProperty($name, $checkVars = true, $checkBehaviors = true)
@ -358,9 +358,9 @@ class Component extends Object
* - 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
* @return boolean whether the property can be written
* @param bool $checkVars whether to treat member variables as properties
* @param bool $checkBehaviors whether to treat behaviors' properties as properties of this component
* @return bool whether the property can be written
* @see canGetProperty()
*/
public function canSetProperty($name, $checkVars = true, $checkBehaviors = true)
@ -386,8 +386,8 @@ class Component extends Object
* - 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
* @return boolean whether the property is defined
* @param bool $checkBehaviors whether to treat behaviors' methods as methods of this component
* @return bool whether the property is defined
*/
public function hasMethod($name, $checkBehaviors = true)
{
@ -437,7 +437,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
* @return boolean whether there is any handler attached to the event.
* @return bool whether there is any handler attached to the event.
*/
public function hasEventHandlers($name)
{
@ -470,7 +470,7 @@ class Component extends Object
* @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 boolean $append whether to append new event handler to the end of the existing
* @param bool $append whether to append new event handler to the end of the existing
* handler list. If false, the new handler will be inserted at the beginning of the existing
* handler list.
* @see off()
@ -491,7 +491,7 @@ class Component extends Object
* @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
* @return bool if a handler is found and detached
* @see on()
*/
public function off($name, $handler = null)
@ -652,7 +652,7 @@ class Component extends Object
/**
* Attaches a behavior to this component.
* @param string|integer $name the name of the behavior. If this is an integer, it means the behavior
* @param string|int $name the name of the behavior. If this is an integer, it means the behavior
* is an anonymous one. Otherwise, the behavior is a named one and any existing behavior with the same name
* will be detached first.
* @param string|array|Behavior $behavior the behavior to be attached

4
framework/base/Controller.php

@ -263,7 +263,7 @@ class Controller extends Component implements ViewContextInterface
* ```
*
* @param Action $action the action to be executed.
* @return boolean whether the action should continue to run.
* @return bool whether the action should continue to run.
*/
public function beforeAction($action)
{
@ -475,7 +475,7 @@ 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.
* @return string|bool 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.
*/

2
framework/base/ErrorException.php

@ -78,7 +78,7 @@ class ErrorException extends \ErrorException
* Returns if error is one of fatal type.
*
* @param array $error error got from error_get_last()
* @return boolean if error is one of fatal type
* @return bool if error is one of fatal type
*/
public static function isFatalError($error)
{

16
framework/base/ErrorHandler.php

@ -27,11 +27,11 @@ use yii\web\HttpException;
abstract class ErrorHandler extends Component
{
/**
* @var boolean whether to discard any existing page output before error display. Defaults to true.
* @var bool whether to discard any existing page output before error display. Defaults to true.
*/
public $discardExistingOutput = true;
/**
* @var integer the size of the reserved memory. A portion of memory is pre-allocated so that
* @var int the size of the reserved memory. A portion of memory is pre-allocated so that
* when an out-of-memory issue occurs, the error handler is able to handle the error with
* the help of this reserved memory. If you set this value to be 0, no memory will be reserved.
* Defaults to 256KB.
@ -161,13 +161,13 @@ abstract class ErrorHandler extends Component
* This method is used as a HHVM error handler. It will store exception that will
* be used in fatal error handler
*
* @param integer $code the level of the error raised.
* @param int $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 int $line the line number the error was raised at.
* @param mixed $context
* @param mixed $backtrace trace of error
* @return boolean whether the normal error handler continues.
* @return bool whether the normal error handler continues.
*
* @throws ErrorException
* @since 2.0.6
@ -192,11 +192,11 @@ abstract class ErrorHandler extends Component
*
* 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 int $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.
* @return boolean whether the normal error handler continues.
* @param int $line the line number the error was raised at.
* @return bool whether the normal error handler continues.
*
* @throws ErrorException
*/

8
framework/base/Event.php

@ -39,7 +39,7 @@ class Event extends Object
*/
public $sender;
/**
* @var boolean whether the event is handled. Defaults to `false`.
* @var bool whether the event is handled. Defaults to `false`.
* When a handler sets this to be `true`, the event processing will stop and
* ignore the rest of the uninvoked event handlers.
*/
@ -80,7 +80,7 @@ class Event extends Object
* @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 boolean $append whether to append new event handler to the end of the existing
* @param bool $append whether to append new event handler to the end of the existing
* handler list. If `false`, the new handler will be inserted at the beginning of the existing
* handler list.
* @see off()
@ -104,7 +104,7 @@ class Event extends Object
* @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.
* @return bool whether a handler is found and detached.
* @see on()
*/
public static function off($class, $name, $handler = null)
@ -149,7 +149,7 @@ class Event extends Object
* 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.
* @return bool whether there is any handler attached to the event.
*/
public static function hasHandlers($class, $name)
{

6
framework/base/ExitException.php

@ -18,16 +18,16 @@ namespace yii\base;
class ExitException extends \Exception
{
/**
* @var integer the exit status code
* @var int the exit status code
*/
public $statusCode;
/**
* Constructor.
* @param integer $status the exit status code
* @param int $status the exit status code
* @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($status = 0, $message = null, $code = 0, \Exception $previous = null)

26
framework/base/Model.php

@ -330,8 +330,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* @param array $attributeNames list of attribute names 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 bool $clearErrors whether to call [[clearErrors()]] before performing validation
* @return bool whether the validation is successful without any error.
* @throws InvalidParamException if the current scenario is unknown.
*/
public function validate($attributeNames = null, $clearErrors = true)
@ -367,7 +367,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* The default implementation raises a `beforeValidate` event.
* 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.
* @return bool whether the validation should be executed. Defaults to true.
* If false is returned, the validation will stop and the model is considered invalid.
*/
public function beforeValidate()
@ -465,7 +465,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* before the model is loaded with data.
*
* @param string $attribute attribute name
* @return boolean whether the attribute is required
* @return bool whether the attribute is required
*/
public function isAttributeRequired($attribute)
{
@ -480,7 +480,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
* @return boolean whether the attribute is safe for massive assignments
* @return bool whether the attribute is safe for massive assignments
* @see safeAttributes()
*/
public function isAttributeSafe($attribute)
@ -491,7 +491,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
* @return boolean whether the attribute is active in the current scenario
* @return bool whether the attribute is active in the current scenario
* @see activeAttributes()
*/
public function isAttributeActive($attribute)
@ -528,7 +528,7 @@ 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.
* @return bool whether there is any error.
*/
public function hasErrors($attribute = null)
{
@ -686,7 +686,7 @@ 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 boolean $safeOnly whether the assignments should only be done to the safe attributes.
* @param bool $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]].
* @see safeAttributes()
* @see attributes()
@ -816,7 +816,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* @param array $data the data array to load, typically `$_POST` or `$_GET`.
* @param string $formName the form name to use to load the data into the model.
* If not set, [[formName()]] is used.
* @return boolean whether `load()` found the expected form in `$data`.
* @return bool whether `load()` found the expected form in `$data`.
*/
public function load($data, $formName = null)
{
@ -847,7 +847,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* @param string $formName the form name to be used for loading the data into the models.
* If not set, it will use the [[formName()]] value of the first model in `$models`.
* This parameter is available since version 2.0.1.
* @return boolean whether at least one of the models is successfully populated.
* @return bool whether at least one of the models is successfully populated.
*/
public static function loadMultiple($models, $data, $formName = null)
{
@ -885,7 +885,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* @param array $attributeNames list of attribute names 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
* @return bool whether all models are valid. False will be returned if one
* or multiple models have validation error.
*/
public static function validateMultiple($models, $attributeNames = null)
@ -967,7 +967,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 `isset($model[$offset])`.
* @param mixed $offset the offset to check on.
* @return boolean whether or not an offset exists.
* @return bool whether or not an offset exists.
*/
public function offsetExists($offset)
{
@ -990,7 +990,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* Sets the element at the specified offset.
* 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 int $offset the offset to set element
* @param mixed $item the element value
*/
public function offsetSet($offset, $item)

2
framework/base/ModelEvent.php

@ -16,7 +16,7 @@ namespace yii\base;
class ModelEvent extends Event
{
/**
* @var boolean whether the model is in valid status. Defaults to true.
* @var bool whether the model is in valid status. Defaults to true.
* A model is in valid status if it passes validations or certain checks.
*/
public $isValid = true;

14
framework/base/Module.php

@ -63,7 +63,7 @@ class Module extends ServiceLocator
*/
public $module;
/**
* @var string|boolean the layout that should be applied for views within this module. This refers to a view name
* @var string|bool the layout that should be applied for views within this module. This refers to a view name
* relative to [[layoutPath]]. If this is not set, it means the layout value of the [[module|parent module]]
* will be taken. If this is `false`, layout will be disabled within this module.
*/
@ -133,7 +133,7 @@ class Module extends ServiceLocator
*
* ```php
* function (Module $module) {
* //return string|integer
* //return string|int
* }
* ```
*
@ -381,7 +381,7 @@ 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`).
* @return boolean whether the named module exists. Both loaded and unloaded modules
* @return bool whether the named module exists. Both loaded and unloaded modules
* are considered.
*/
public function hasModule($id)
@ -401,7 +401,7 @@ class Module extends ServiceLocator
* 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 bool $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()
*/
@ -451,7 +451,7 @@ 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`,
* @param bool $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).
@ -551,7 +551,7 @@ class Module extends ServiceLocator
* 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
* @return array|bool 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.
*/
@ -670,7 +670,7 @@ class Module extends ServiceLocator
* ```
*
* @param Action $action the action to be executed.
* @return boolean whether the action should continue to be executed.
* @return bool whether the action should continue to be executed.
*/
public function beforeAction($action)
{

16
framework/base/Object.php

@ -170,7 +170,7 @@ class Object implements Configurable
*
* Note that if the property is not defined, false will be returned.
* @param string $name the property name or the event name
* @return boolean whether the named property is set (not null).
* @return bool whether the named property is set (not null).
* @see http://php.net/manual/en/function.isset.php
*/
public function __isset($name)
@ -229,8 +229,8 @@ class Object implements Configurable
* - 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
* @return boolean whether the property is defined
* @param bool $checkVars whether to treat member variables as properties
* @return bool whether the property is defined
* @see canGetProperty()
* @see canSetProperty()
*/
@ -248,8 +248,8 @@ class Object implements Configurable
* - 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
* @return boolean whether the property can be read
* @param bool $checkVars whether to treat member variables as properties
* @return bool whether the property can be read
* @see canSetProperty()
*/
public function canGetProperty($name, $checkVars = true)
@ -266,8 +266,8 @@ class Object implements Configurable
* - 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
* @return boolean whether the property can be written
* @param bool $checkVars whether to treat member variables as properties
* @return bool whether the property can be written
* @see canGetProperty()
*/
public function canSetProperty($name, $checkVars = true)
@ -281,7 +281,7 @@ class Object implements Configurable
* 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 method name
* @return boolean whether the method is defined
* @return bool whether the method is defined
*/
public function hasMethod($name)
{

6
framework/base/Request.php

@ -14,7 +14,7 @@ use Yii;
*
* For more details and usage information on Request, see the [guide article on requests](guide:runtime-requests).
*
* @property boolean $isConsoleRequest The value indicating whether the current request is made via console.
* @property bool $isConsoleRequest The value indicating whether the current request is made via console.
* @property string $scriptFile Entry script file path (processed w/ realpath()).
*
* @author Qiang Xue <qiang.xue@gmail.com>
@ -34,7 +34,7 @@ abstract class Request extends Component
/**
* Returns a value indicating whether the current request is made via command line
* @return boolean the value indicating whether the current request is made via console
* @return bool the value indicating whether the current request is made via console
*/
public function getIsConsoleRequest()
{
@ -43,7 +43,7 @@ abstract class Request extends Component
/**
* Sets the value indicating whether the current request is made via command line
* @param boolean $value the value indicating whether the current request is made via command line
* @param bool $value the value indicating whether the current request is made via command line
*/
public function setIsConsoleRequest($value)
{

2
framework/base/Response.php

@ -18,7 +18,7 @@ namespace yii\base;
class Response extends Component
{
/**
* @var integer the exit status. Exit statuses should be in the range 0 to 254.
* @var int the exit status. Exit statuses should be in the range 0 to 254.
* The status 0 means the program terminates successfully.
*/
public $exitStatus = 0;

36
framework/base/Security.php

@ -69,7 +69,7 @@ class Security extends Component
*/
public $authKeyInfo = 'AuthorizationKey';
/**
* @var integer derivation iterations count.
* @var int derivation iterations count.
* Set as high as possible to hinder dictionary password attacks.
*/
public $derivationIterations = 100000;
@ -84,7 +84,7 @@ class Security extends Component
*/
public $passwordHashStrategy;
/**
* @var integer Default cost used for password hashing.
* @var int Default cost used for password hashing.
* Allowed value is between 4 and 31.
* @see generatePasswordHash()
* @since 2.0.6
@ -136,7 +136,7 @@ class Security extends Component
* Verifies and decrypts data encrypted with [[encryptByPassword()]].
* @param string $data the encrypted data to decrypt
* @param string $password the password to use for decryption
* @return boolean|string the decrypted data or false on authentication failure
* @return bool|string the decrypted data or false on authentication failure
* @see encryptByPassword()
*/
public function decryptByPassword($data, $password)
@ -149,7 +149,7 @@ class Security extends Component
* @param string $data the encrypted data to decrypt
* @param string $inputKey the input to use for encryption and authentication
* @param string $info optional context and application specific information, see [[hkdf()]]
* @return boolean|string the decrypted data or false on authentication failure
* @return bool|string the decrypted data or false on authentication failure
* @see encryptByKey()
*/
public function decryptByKey($data, $inputKey, $info = null)
@ -161,7 +161,7 @@ class Security extends Component
* Encrypts data.
*
* @param string $data data to be encrypted
* @param boolean $passwordBased set true to use password-based key derivation
* @param bool $passwordBased set true to use password-based key derivation
* @param string $secret the encryption password or key
* @param string $info context/application specific information, e.g. a user ID
* See [RFC 5869 Section 3.2](https://tools.ietf.org/html/rfc5869#section-3.2) for more details.
@ -212,11 +212,11 @@ class Security extends Component
* Decrypts data.
*
* @param string $data encrypted data to be decrypted.
* @param boolean $passwordBased set true to use password-based key derivation
* @param bool $passwordBased set true to use password-based key derivation
* @param string $secret the decryption password or key
* @param string $info context/application specific information, @see encrypt()
*
* @return boolean|string the decrypted data or false on authentication failure
* @return bool|string the decrypted data or false on authentication failure
* @throws InvalidConfigException on OpenSSL not loaded
* @throws Exception on OpenSSL error
* @see encrypt()
@ -266,7 +266,7 @@ class Security extends Component
* @param string $info optional info to bind the derived key material to application-
* and context-specific information, e.g. a user ID or API version, see
* [RFC 5869](https://tools.ietf.org/html/rfc5869)
* @param integer $length length of the output key in bytes. If 0, the output key is
* @param int $length length of the output key in bytes. If 0, the output key is
* the length of the hash algorithm output.
* @throws InvalidParamException when HMAC generation fails.
* @return string the derived key
@ -311,9 +311,9 @@ class Security extends Component
* @param string $algo a hash algorithm supported by `hash_hmac()`, e.g. 'SHA-256'
* @param string $password the source password
* @param string $salt the random salt
* @param integer $iterations the number of iterations of the hash algorithm. Set as high as
* @param int $iterations the number of iterations of the hash algorithm. Set as high as
* possible to hinder dictionary password attacks.
* @param integer $length length of the output key in bytes. If 0, the output key is
* @param int $length length of the output key in bytes. If 0, the output key is
* the length of the hash algorithm output.
* @return string the derived key
* @throws InvalidParamException when hash generation fails due to invalid params given.
@ -372,7 +372,7 @@ class Security extends Component
* @param string $data the data to be protected
* @param string $key the secret key to be used for generating hash. Should be a secure
* cryptographic key.
* @param boolean $rawHash whether the generated hash value is in raw binary format. If false, lowercase
* @param bool $rawHash whether the generated hash value is in raw binary format. If false, lowercase
* hex digits will be generated.
* @return string the data prefixed with the keyed hash
* @throws InvalidConfigException when HMAC generation fails.
@ -397,7 +397,7 @@ class Security extends Component
* @param string $key the secret key that was previously used to generate the hash for the data in [[hashData()]].
* function to see the supported hashing algorithms on your system. This must be the same
* as the value passed to [[hashData()]] when generating the hash for the data.
* @param boolean $rawHash this should take the same value as when you generate the data using [[hashData()]].
* @param bool $rawHash this should take the same value as when you generate the data using [[hashData()]].
* It indicates whether the hash value in the data is in binary format. If false, it means the hash value consists
* of lowercase hex digits only.
* hex digits will be generated.
@ -433,7 +433,7 @@ class Security extends Component
* Note that output may not be ASCII.
* @see generateRandomString() if you need a string.
*
* @param integer $length the number of bytes to generate
* @param int $length the number of bytes to generate
* @return string the generated random bytes
* @throws InvalidParamException if wrong length is specified
* @throws Exception on failure.
@ -544,7 +544,7 @@ class Security extends Component
* Generates a random string of specified length.
* The string generated matches [A-Za-z0-9_-]+ and is transparent to URL-encoding.
*
* @param integer $length the length of the key in characters
* @param int $length the length of the key in characters
* @return string the generated random key
* @throws Exception on failure.
*/
@ -585,7 +585,7 @@ class Security extends Component
* ```
*
* @param string $password The password to be hashed.
* @param integer $cost Cost parameter used by the Blowfish hash algorithm.
* @param int $cost Cost parameter used by the Blowfish hash algorithm.
* The higher the value of cost,
* the longer it takes to generate the hash and to verify a password against it. Higher cost
* therefore slows down a brute-force attack. For best protection against brute-force attacks,
@ -622,7 +622,7 @@ class Security extends Component
* Verifies a password against a hash.
* @param string $password The password to verify.
* @param string $hash The hash to verify the password against.
* @return boolean whether the password is correct.
* @return bool whether the password is correct.
* @throws InvalidParamException on bad password/hash parameters or if crypt() with Blowfish hash is not available.
* @see generatePasswordHash()
*/
@ -660,7 +660,7 @@ class Security extends Component
* "$2a$", "$2x$" or "$2y$", a two digit cost parameter, "$", and 22 characters
* from the alphabet "./0-9A-Za-z".
*
* @param integer $cost the cost parameter
* @param int $cost the cost parameter
* @return string the random salt value.
* @throws InvalidParamException if the cost parameter is out of the range of 4 to 31.
*/
@ -686,7 +686,7 @@ class Security extends Component
* @see http://codereview.stackexchange.com/questions/13512
* @param string $expected string to compare.
* @param string $actual user-supplied string.
* @return boolean whether strings are equal.
* @return bool whether strings are equal.
*/
public function compareString($expected, $actual)
{

10
framework/base/View.php

@ -20,7 +20,7 @@ use yii\widgets\FragmentCache;
*
* For more details and usage information on View, see the [guide article on views](guide:structure-views).
*
* @property string|boolean $viewFile The view file currently being rendered. False if no view file is being
* @property string|bool $viewFile The view file currently being rendered. False if no view file is being
* rendered. This property is read-only.
*
* @author Qiang Xue <qiang.xue@gmail.com>
@ -259,7 +259,7 @@ class View extends Component
}
/**
* @return string|boolean the view file currently being rendered. False if no view file is being rendered.
* @return string|bool the view file currently being rendered. False if no view file is being rendered.
*/
public function getViewFile()
{
@ -272,7 +272,7 @@ class View extends Component
* If you override this method, make sure you call the parent implementation first.
* @param string $viewFile the view file to be rendered.
* @param array $params the parameter array passed to the [[render()]] method.
* @return boolean whether to continue rendering the view file.
* @return bool whether to continue rendering the view file.
*/
public function beforeRender($viewFile, $params)
{
@ -381,7 +381,7 @@ 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.
* @param bool $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
*/
@ -452,7 +452,7 @@ class View extends Component
*
* @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.
* @return bool whether you should generate the content for caching.
* False if the cached version is available.
*/
public function beginCache($id, $properties = [])

2
framework/base/ViewEvent.php

@ -31,7 +31,7 @@ class ViewEvent extends Event
*/
public $output;
/**
* @var boolean whether to continue rendering the view file. Event handlers of
* @var bool whether to continue rendering the view file. Event handlers of
* [[View::EVENT_BEFORE_RENDER]] may set this property to decide whether
* to continue rendering the current view file.
*/

4
framework/base/Widget.php

@ -27,7 +27,7 @@ use ReflectionClass;
class Widget extends Component implements ViewContextInterface
{
/**
* @var integer a counter used to generate [[id]] for widgets.
* @var int a counter used to generate [[id]] for widgets.
* @internal
*/
public static $counter = 0;
@ -117,7 +117,7 @@ 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
* @param bool $autoGenerate whether to generate an ID if it is not set previously
* @return string ID of the widget.
*/
public function getId($autoGenerate = true)

2
framework/behaviors/AttributeBehavior.php

@ -81,7 +81,7 @@ class AttributeBehavior extends Behavior
*/
public $value;
/**
* @var boolean whether to skip this behavior when the `$owner` has not been
* @var bool whether to skip this behavior when the `$owner` has not been
* modified
* @since 2.0.8
*/

10
framework/behaviors/AttributeTypecastBehavior.php

@ -140,20 +140,20 @@ class AttributeTypecastBehavior extends Behavior
*/
public $attributeTypes;
/**
* @var boolean whether to skip typecasting of `null` values.
* @var bool whether to skip typecasting of `null` values.
* If enabled attribute value which equals to `null` will not be type-casted (e.g. `null` remains `null`),
* otherwise it will be converted according to the type configured at [[attributeTypes]].
*/
public $skipOnNull = true;
/**
* @var boolean whether to perform typecasting after owner model validation.
* @var bool whether to perform typecasting after owner model validation.
* Note that typecasting will be performed only if validation was successful, e.g.
* owner model has no errors.
* Note that changing this option value will have no effect after this behavior has been attached to the model.
*/
public $typecastAfterValidate = true;
/**
* @var boolean whether to perform typecasting before saving owner model (insert or update).
* @var bool whether to perform typecasting before saving owner model (insert or update).
* This option may be disabled in order to achieve better performance.
* For example, in case of [[\yii\db\ActiveRecord]] usage, typecasting before save
* will grant no benefit an thus can be disabled.
@ -161,7 +161,7 @@ class AttributeTypecastBehavior extends Behavior
*/
public $typecastBeforeSave = false;
/**
* @var boolean whether to perform typecasting after retrieving owner model data from
* @var bool whether to perform typecasting after retrieving owner model data from
* the database (after find or refresh).
* This option may be disabled in order to achieve better performance.
* For example, in case of [[\yii\db\ActiveRecord]] usage, typecasting after find
@ -251,7 +251,7 @@ class AttributeTypecastBehavior extends Behavior
case self::TYPE_FLOAT:
return (float) $value;
case self::TYPE_BOOLEAN:
return (boolean)$value;
return (bool) $value;
case self::TYPE_STRING:
return (string) $value;
default:

10
framework/behaviors/SluggableBehavior.php

@ -81,13 +81,13 @@ class SluggableBehavior extends AttributeBehavior
*/
public $value;
/**
* @var boolean whether to generate a new slug if it has already been generated before.
* @var bool whether to generate a new slug if it has already been generated before.
* If true, the behavior will not generate a new slug even if [[attribute]] is changed.
* @since 2.0.2
*/
public $immutable = false;
/**
* @var boolean whether to ensure generated slug value to be unique among owner class records.
* @var bool whether to ensure generated slug value to be unique among owner class records.
* If enabled behavior will validate slug uniqueness automatically. If validation fails it will attempt
* generating unique slug value from based one until success.
*/
@ -157,7 +157,7 @@ class SluggableBehavior extends AttributeBehavior
* Checks whether the new slug generation is needed
* This method is called by [[getValue]] to check whether the new slug generation is needed.
* You may override it to customize checking.
* @return boolean
* @return bool
* @since 2.0.7
*/
protected function isNewSlugNeeded()
@ -215,7 +215,7 @@ class SluggableBehavior extends AttributeBehavior
/**
* Checks if given slug value is unique.
* @param string $slug slug value
* @return boolean whether slug is unique.
* @return bool whether slug is unique.
*/
protected function validateSlug($slug)
{
@ -239,7 +239,7 @@ class SluggableBehavior extends AttributeBehavior
/**
* Generates slug using configured callback or increment of iteration.
* @param string $baseSlug base slug value
* @param integer $iteration iteration number
* @param int $iteration iteration number
* @return string new slug value
* @throws \yii\base\InvalidConfigException
*/

20
framework/caching/ApcCache.php

@ -26,7 +26,7 @@ use yii\base\InvalidConfigException;
class ApcCache extends Cache
{
/**
* @var boolean whether to use apcu or apc as the underlying caching extension.
* @var bool whether to use apcu or apc as the underlying caching extension.
* If true, [apcu](http://pecl.php.net/package/apcu) will be used.
* If false, [apc](http://pecl.php.net/package/apc) will be used.
* Defaults to false.
@ -56,7 +56,7 @@ class ApcCache extends Cache
* 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.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
* @return bool true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
{
@ -94,8 +94,8 @@ class ApcCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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.
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise.
*/
protected function setValue($key, $value, $duration)
{
@ -105,7 +105,7 @@ 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.
* @param int $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)
@ -120,8 +120,8 @@ class ApcCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
{
@ -131,7 +131,7 @@ 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.
* @param int $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)
@ -144,7 +144,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
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
protected function deleteValue($key)
{
@ -154,7 +154,7 @@ class ApcCache extends Cache
/**
* Deletes all values from cache.
* This is the implementation of the method declared in the parent class.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
protected function flushValues()
{

48
framework/caching/Cache.php

@ -129,7 +129,7 @@ abstract class Cache extends Component implements \ArrayAccess
* 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.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
* @return bool true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
{
@ -202,11 +202,11 @@ abstract class Cache extends Component implements \ArrayAccess
* @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 int $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
* @return bool whether the value is successfully stored into cache
*/
public function set($key, $value, $duration = 0, $dependency = null)
{
@ -229,11 +229,11 @@ abstract class Cache extends Component implements \ArrayAccess
* 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 int $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
* @return bool whether the items are successfully stored into cache
* @deprecated This method is an alias for [[multiSet()]] and will be removed in 2.1.0.
*/
public function mset($items, $duration = 0, $dependency = null)
@ -247,11 +247,11 @@ abstract class Cache extends Component implements \ArrayAccess
* 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 int $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
* @return bool whether the items are successfully stored into cache
* @since 2.0.7
*/
public function multiSet($items, $duration = 0, $dependency = null)
@ -280,11 +280,11 @@ abstract class Cache extends Component implements \ArrayAccess
* 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 int $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
* @return bool whether the items are successfully stored into cache
* @deprecated This method is an alias for [[multiAdd()]] and will be removed in 2.1.0.
*/
public function madd($items, $duration = 0, $dependency = null)
@ -297,11 +297,11 @@ abstract class Cache extends Component implements \ArrayAccess
* 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 int $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
* @return bool whether the items are successfully stored into cache
* @since 2.0.7
*/
public function multiAdd($items, $duration = 0, $dependency = null)
@ -331,11 +331,11 @@ abstract class Cache extends Component implements \ArrayAccess
* @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 int $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
* @return bool whether the value is successfully stored into cache
*/
public function add($key, $value, $duration = 0, $dependency = null)
{
@ -356,7 +356,7 @@ 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.
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
public function delete($key)
{
@ -368,7 +368,7 @@ abstract class Cache extends Component implements \ArrayAccess
/**
* Deletes all values from cache.
* Be careful of performing this operation if the cache is shared among multiple applications.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
public function flush()
{
@ -392,8 +392,8 @@ abstract class Cache extends Component implements \ArrayAccess
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
abstract protected function setValue($key, $value, $duration);
@ -404,8 +404,8 @@ abstract class Cache extends Component implements \ArrayAccess
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
abstract protected function addValue($key, $value, $duration);
@ -413,14 +413,14 @@ 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
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
abstract protected function deleteValue($key);
/**
* Deletes all values from cache.
* Child classes may implement this method to realize the flush operation.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
abstract protected function flushValues();
@ -447,7 +447,7 @@ abstract class Cache extends Component implements \ArrayAccess
* 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.
* @param int $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)
@ -467,7 +467,7 @@ abstract class Cache extends Component implements \ArrayAccess
* 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.
* @param int $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)
@ -486,7 +486,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
* @return boolean
* @return bool
*/
public function offsetExists($key)
{

4
framework/caching/ChainedDependency.php

@ -27,7 +27,7 @@ class ChainedDependency extends Dependency
*/
public $dependencies = [];
/**
* @var boolean whether this dependency is depending on every dependency in [[dependencies]].
* @var bool whether this dependency is depending on every dependency in [[dependencies]].
* Defaults to true, meaning if any of the dependencies has changed, this dependency is considered changed.
* When it is set false, it means if one of the dependencies has NOT changed, this dependency
* is considered NOT changed.
@ -62,7 +62,7 @@ class ChainedDependency extends Dependency
* 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
* @return boolean whether the dependency is changed or not.
* @return bool whether the dependency is changed or not.
*/
public function getHasChanged($cache)
{

18
framework/caching/DbCache.php

@ -69,7 +69,7 @@ class DbCache extends Cache
*/
public $cacheTable = '{{%cache}}';
/**
* @var integer the probability (parts per million) that garbage collection (GC) should be performed
* @var int the probability (parts per million) that garbage collection (GC) should be performed
* when storing a piece of data in the cache. Defaults to 100, meaning 0.01% chance.
* This number should be between 0 and 1000000. A value 0 meaning no GC will be performed at all.
*/
@ -95,7 +95,7 @@ class DbCache extends Cache
* 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.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
* @return bool true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
{
@ -182,8 +182,8 @@ class DbCache extends Cache
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached. Other types (if you have disabled [[serializer]]) cannot be saved.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
{
@ -208,8 +208,8 @@ class DbCache extends Cache
*
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached. Other types (if you have disabled [[serializer]]) cannot be saved.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
{
@ -233,7 +233,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
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
protected function deleteValue($key)
{
@ -246,7 +246,7 @@ class DbCache extends Cache
/**
* Removes the expired data values.
* @param boolean $force whether to enforce the garbage collection regardless of [[gcProbability]].
* @param bool $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]].
*/
public function gc($force = false)
@ -261,7 +261,7 @@ class DbCache extends Cache
/**
* Deletes all values from cache.
* This is the implementation of the method declared in the parent class.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
protected function flushValues()
{

4
framework/caching/Dependency.php

@ -26,7 +26,7 @@ abstract class Dependency extends \yii\base\Object
*/
public $data;
/**
* @var boolean whether this dependency is reusable or not. True value means that dependent
* @var bool whether this dependency is reusable or not. True value means that dependent
* data for this cache dependency will be generated only once per request. This allows you
* to use the same cache dependency for multiple separate cache calls while generating the same
* page without an overhead of re-evaluating dependency data each time. Defaults to false.
@ -60,7 +60,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
* @return boolean whether the dependency has changed.
* @return bool whether the dependency has changed.
*/
public function getHasChanged($cache)
{

12
framework/caching/DummyCache.php

@ -39,8 +39,8 @@ class DummyCache extends Cache
*
* @param string $key the key identifying the value to be cached
* @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.
* @return boolean true if the value is successfully stored into cache, false otherwise
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
{
@ -52,8 +52,8 @@ class DummyCache extends 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 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.
* @return boolean true if the value is successfully stored into cache, false otherwise
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
{
@ -64,7 +64,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
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
protected function deleteValue($key)
{
@ -74,7 +74,7 @@ class DummyCache extends Cache
/**
* Deletes all values from cache.
* This is the implementation of the method declared in the parent class.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
protected function flushValues()
{

28
framework/caching/FileCache.php

@ -44,26 +44,26 @@ class FileCache extends Cache
*/
public $cacheFileSuffix = '.bin';
/**
* @var integer the level of sub-directories to store cache files. Defaults to 1.
* @var int the level of sub-directories to store cache files. Defaults to 1.
* If the system has huge number of cache files (e.g. one million), you may use a bigger value
* (usually no bigger than 3). Using sub-directories is mainly to ensure the file system
* is not over burdened with a single directory having too many files.
*/
public $directoryLevel = 1;
/**
* @var integer the probability (parts per million) that garbage collection (GC) should be performed
* @var int the probability (parts per million) that garbage collection (GC) should be performed
* when storing a piece of data in the cache. Defaults to 10, meaning 0.001% chance.
* This number should be between 0 and 1000000. A value 0 means no GC will be performed at all.
*/
public $gcProbability = 10;
/**
* @var integer the permission to be set for newly created cache files.
* @var int the permission to be set for newly created cache files.
* This value will be used by PHP chmod() function. No umask will be applied.
* If not set, the permission will be determined by the current environment.
*/
public $fileMode;
/**
* @var integer the permission to be set for newly created directories.
* @var int the permission to be set for newly created directories.
* This value will be used by PHP chmod() function. No umask will be applied.
* Defaults to 0775, meaning the directory is read-writable by owner and group,
* but read-only for other users.
@ -91,7 +91,7 @@ class FileCache extends Cache
* 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.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
* @return bool true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
{
@ -131,8 +131,8 @@ class FileCache extends Cache
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached. Other types (If you have disabled [[serializer]]) unable to get is
* correct in [[getValue()]].
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
{
@ -164,8 +164,8 @@ class FileCache extends Cache
* @param string $key the key identifying the value to be cached
* @param string $value the value to be cached. Other types (if you have disabled [[serializer]]) unable to get is
* correct in [[getValue()]].
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
{
@ -181,7 +181,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
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
protected function deleteValue($key)
{
@ -214,7 +214,7 @@ class FileCache extends Cache
/**
* Deletes all values from cache.
* This is the implementation of the method declared in the parent class.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
protected function flushValues()
{
@ -225,9 +225,9 @@ class FileCache extends Cache
/**
* Removes expired cache files.
* @param boolean $force whether to enforce the garbage collection regardless of [[gcProbability]].
* @param bool $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.
* @param bool $expiredOnly whether to removed expired cache files only.
* If false, all cache files under [[cachePath]] will be removed.
*/
public function gc($force = false, $expiredOnly = true)
@ -241,7 +241,7 @@ 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 boolean $expiredOnly whether to only remove expired cache files. If false, all files
* @param bool $expiredOnly whether to only remove expired cache files. If false, all files
* under `$path` will be removed.
*/
protected function gcRecursive($path, $expiredOnly)

16
framework/caching/MemCache.php

@ -66,7 +66,7 @@ use yii\base\InvalidConfigException;
class MemCache extends Cache
{
/**
* @var boolean whether to use memcached or memcache as the underlying caching extension.
* @var bool whether to use memcached or memcache as the underlying caching extension.
* If true, [memcached](http://pecl.php.net/package/memcached) will be used.
* If false, [memcache](http://pecl.php.net/package/memcache) will be used.
* Defaults to false.
@ -287,8 +287,8 @@ class MemCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached.
* @see \MemcachePool::set()
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
{
@ -303,7 +303,7 @@ class MemCache 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.
* @param int $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)
@ -328,8 +328,8 @@ class MemCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached
* @see \MemcachePool::set()
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
{
@ -345,7 +345,7 @@ class MemCache 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
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
protected function deleteValue($key)
{
@ -355,7 +355,7 @@ class MemCache extends Cache
/**
* Deletes all values from cache.
* This is the implementation of the method declared in the parent class.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
protected function flushValues()
{

12
framework/caching/MemCacheServer.php

@ -25,29 +25,29 @@ class MemCacheServer extends \yii\base\Object
*/
public $host;
/**
* @var integer memcache server port
* @var int memcache server port
*/
public $port = 11211;
/**
* @var integer probability of using this server among all servers.
* @var int probability of using this server among all servers.
*/
public $weight = 1;
/**
* @var boolean whether to use a persistent connection. This is used by memcache only.
* @var bool whether to use a persistent connection. This is used by memcache only.
*/
public $persistent = true;
/**
* @var integer timeout in milliseconds which will be used for connecting to the server.
* @var int timeout in milliseconds which will be used for connecting to the server.
* This is used by memcache only. For old versions of memcache that only support specifying
* timeout in seconds this will be rounded up to full seconds.
*/
public $timeout = 1000;
/**
* @var integer how often a failed server will be retried (in seconds). This is used by memcache only.
* @var int how often a failed server will be retried (in seconds). This is used by memcache only.
*/
public $retryInterval = 15;
/**
* @var boolean if the server should be flagged as online upon a failure. This is used by memcache only.
* @var bool if the server should be flagged as online upon a failure. This is used by memcache only.
*/
public $status = true;
/**

2
framework/caching/TagDependency.php

@ -60,7 +60,7 @@ class TagDependency 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.
* @return bool whether the dependency is changed or not.
*/
public function getHasChanged($cache)
{

20
framework/caching/WinCache.php

@ -30,7 +30,7 @@ class WinCache extends Cache
* 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.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
* @return bool true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
{
@ -43,7 +43,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
* @return string|boolean the value stored in cache, false if the value is not in the cache or expired.
* @return string|bool the value stored in cache, false if the value is not in the cache or expired.
*/
protected function getValue($key)
{
@ -67,8 +67,8 @@ class WinCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
{
@ -78,7 +78,7 @@ 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.
* @param int $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)
@ -93,8 +93,8 @@ class WinCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
{
@ -106,7 +106,7 @@ class WinCache extends 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.
* @param int $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)
@ -118,7 +118,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
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
protected function deleteValue($key)
{
@ -128,7 +128,7 @@ class WinCache extends Cache
/**
* Deletes all values from cache.
* This is the implementation of the method declared in the parent class.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
protected function flushValues()
{

14
framework/caching/XCache.php

@ -31,7 +31,7 @@ class XCache extends Cache
* 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.
* @return boolean true if a value exists in cache, false if the value is not in the cache or expired.
* @return bool true if a value exists in cache, false if the value is not in the cache or expired.
*/
public function exists($key)
{
@ -58,8 +58,8 @@ class XCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
{
@ -73,8 +73,8 @@ class XCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
{
@ -85,7 +85,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
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
protected function deleteValue($key)
{
@ -95,7 +95,7 @@ class XCache extends Cache
/**
* Deletes all values from cache.
* This is the implementation of the method declared in the parent class.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
protected function flushValues()
{

12
framework/caching/ZendDataCache.php

@ -42,8 +42,8 @@ class ZendDataCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function setValue($key, $value, $duration)
{
@ -57,8 +57,8 @@ class ZendDataCache extends Cache
* @param string $key the key identifying the value to be cached
* @param mixed $value the value to be cached. Most often it's a string. If you have disabled [[serializer]],
* it could be something else.
* @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
* @param int $duration the number of seconds in which the cached value will expire. 0 means never expire.
* @return bool true if the value is successfully stored into cache, false otherwise
*/
protected function addValue($key, $value, $duration)
{
@ -69,7 +69,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
* @return boolean if no error happens during deletion
* @return bool if no error happens during deletion
*/
protected function deleteValue($key)
{
@ -79,7 +79,7 @@ class ZendDataCache extends Cache
/**
* Deletes all values from cache.
* This is the implementation of the method declared in the parent class.
* @return boolean whether the flush operation was successful.
* @return bool whether the flush operation was successful.
*/
protected function flushValues()
{

26
framework/captcha/CaptchaAction.php

@ -44,45 +44,45 @@ class CaptchaAction extends Action
const REFRESH_GET_VAR = 'refresh';
/**
* @var integer how many times should the same CAPTCHA be displayed. Defaults to 3.
* @var int how many times should the same CAPTCHA be displayed. Defaults to 3.
* A value less than or equal to 0 means the test is unlimited (available since version 1.1.2).
*/
public $testLimit = 3;
/**
* @var integer the width of the generated CAPTCHA image. Defaults to 120.
* @var int the width of the generated CAPTCHA image. Defaults to 120.
*/
public $width = 120;
/**
* @var integer the height of the generated CAPTCHA image. Defaults to 50.
* @var int the height of the generated CAPTCHA image. Defaults to 50.
*/
public $height = 50;
/**
* @var integer padding around the text. Defaults to 2.
* @var int padding around the text. Defaults to 2.
*/
public $padding = 2;
/**
* @var integer the background color. For example, 0x55FF00.
* @var int the background color. For example, 0x55FF00.
* Defaults to 0xFFFFFF, meaning white color.
*/
public $backColor = 0xFFFFFF;
/**
* @var integer the font color. For example, 0x55FF00. Defaults to 0x2040A0 (blue color).
* @var int the font color. For example, 0x55FF00. Defaults to 0x2040A0 (blue color).
*/
public $foreColor = 0x2040A0;
/**
* @var boolean whether to use transparent background. Defaults to false.
* @var bool whether to use transparent background. Defaults to false.
*/
public $transparent = false;
/**
* @var integer the minimum length for randomly generated word. Defaults to 6.
* @var int the minimum length for randomly generated word. Defaults to 6.
*/
public $minLength = 6;
/**
* @var integer the maximum length for randomly generated word. Defaults to 7.
* @var int the maximum length for randomly generated word. Defaults to 7.
*/
public $maxLength = 7;
/**
* @var integer the offset between characters. Defaults to -2. You can adjust this property
* @var int the offset between characters. Defaults to -2. You can adjust this property
* in order to decrease or increase the readability of the captcha.
*/
public $offset = -2;
@ -157,7 +157,7 @@ class CaptchaAction extends Action
/**
* Gets the verification code.
* @param boolean $regenerate whether the verification code should be regenerated.
* @param bool $regenerate whether the verification code should be regenerated.
* @return string the verification code.
*/
public function getVerifyCode($regenerate = false)
@ -180,8 +180,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
* @return boolean whether the input is valid
* @param bool $caseSensitive whether the comparison should be case-sensitive
* @return bool whether the input is valid
*/
public function validate($input, $caseSensitive)
{

4
framework/captcha/CaptchaValidator.php

@ -27,11 +27,11 @@ use yii\validators\Validator;
class CaptchaValidator extends Validator
{
/**
* @var boolean whether to skip this validator if the input is empty.
* @var bool whether to skip this validator if the input is empty.
*/
public $skipOnEmpty = false;
/**
* @var boolean whether the comparison is case sensitive. Defaults to false.
* @var bool whether the comparison is case sensitive. Defaults to false.
*/
public $caseSensitive = false;
/**

4
framework/console/Application.php

@ -70,7 +70,7 @@ class Application extends \yii\base\Application
*/
public $defaultRoute = 'help';
/**
* @var boolean whether to enable the commands provided by the core framework.
* @var bool whether to enable the commands provided by the core framework.
* Defaults to true.
*/
public $enableCoreCommands = true;
@ -170,7 +170,7 @@ class Application extends \yii\base\Application
*
* @param string $route the route that specifies the action.
* @param array $params the parameters to be passed to the action
* @return integer|Response the result of the action. This can be either an exit code or Response object.
* @return int|Response the result of the action. This can be either an exit code or Response object.
* Exit code 0 means normal, and other values mean abnormal. Exit code of `null` is treaded as `0` as well.
* @throws Exception if the route is invalid
*/

18
framework/console/Controller.php

@ -43,16 +43,16 @@ class Controller extends \yii\base\Controller
const EXIT_CODE_ERROR = 1;
/**
* @var boolean whether to run the command interactively.
* @var bool whether to run the command interactively.
*/
public $interactive = true;
/**
* @var boolean whether to enable ANSI color in the output.
* @var bool whether to enable ANSI color in the output.
* If not set, ANSI color will only be enabled for terminals that support it.
*/
public $color;
/**
* @var boolean whether to display help information about current command.
* @var bool whether to display help information about current command.
* @since 2.0.10
*/
public $help;
@ -70,7 +70,7 @@ class Controller extends \yii\base\Controller
* and the terminal supports ANSI color.
*
* @param resource $stream the stream to check.
* @return boolean Whether to enable ANSI style in output.
* @return bool Whether to enable ANSI style in output.
*/
public function isColorEnabled($stream = \STDOUT)
{
@ -82,7 +82,7 @@ class Controller extends \yii\base\Controller
* 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.
* @return int 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
* @see createAction
@ -206,7 +206,7 @@ class Controller extends \yii\base\Controller
* ```
*
* @param string $string the string to print
* @return integer|boolean Number of bytes printed or false on error
* @return int|bool Number of bytes printed or false on error
*/
public function stdout($string)
{
@ -231,7 +231,7 @@ class Controller extends \yii\base\Controller
* ```
*
* @param string $string the string to print
* @return integer|boolean Number of bytes printed or false on error
* @return int|bool Number of bytes printed or false on error
*/
public function stderr($string)
{
@ -283,8 +283,8 @@ 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.
* @return boolean whether user confirmed.
* @param bool $default this value is returned if no selection is made.
* @return bool whether user confirmed.
* Will return true if [[interactive]] is false.
*/
public function confirm($message, $default = false)

6
framework/console/controllers/AssetController.php

@ -122,7 +122,7 @@ class AssetController extends Controller
*/
public $cssCompressor = 'java -jar yuicompressor.jar --type css {from} -o {to}';
/**
* @var boolean whether to delete asset source files after compression.
* @var bool whether to delete asset source files after compression.
* This option affects only those bundles, which have [[\yii\web\AssetBundle::sourcePath]] is set.
* @since 2.0.10
*/
@ -677,7 +677,7 @@ EOD;
/**
* Creates template of configuration file for [[actionCompress]].
* @param string $configFile output file name.
* @return integer CLI exit code
* @return int CLI exit code
* @throws \yii\console\Exception on failure.
*/
public function actionTemplate($configFile)
@ -762,7 +762,7 @@ EOD;
/**
* @param AssetBundle $bundle
* @return boolean whether asset bundle external or not.
* @return bool whether asset bundle external or not.
*/
private function isBundleExternal($bundle)
{

30
framework/console/controllers/BaseMigrateController.php

@ -83,7 +83,7 @@ abstract class BaseMigrateController extends Controller
* It checks the existence of the [[migrationPath]].
* @param \yii\base\Action $action the action to be executed.
* @throws InvalidConfigException if directory specified in migrationPath doesn't exist and action isn't "create".
* @return boolean whether the action should continue to be executed.
* @return bool whether the action should continue to be executed.
*/
public function beforeAction($action)
{
@ -125,10 +125,10 @@ abstract class BaseMigrateController extends Controller
* yii migrate 3 # apply the first 3 new migrations
* ```
*
* @param integer $limit the number of new migrations to be applied. If 0, it means
* @param int $limit the number of new migrations to be applied. If 0, it means
* applying all available new migrations.
*
* @return integer the status of the action execution. 0 means normal, other values mean abnormal.
* @return int the status of the action execution. 0 means normal, other values mean abnormal.
*/
public function actionUp($limit = 0)
{
@ -184,11 +184,11 @@ abstract class BaseMigrateController extends Controller
* yii migrate/down all # revert all migrations
* ```
*
* @param integer $limit the number of migrations to be reverted. Defaults to 1,
* @param int $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.
*
* @return integer the status of the action execution. 0 means normal, other values mean abnormal.
* @return int the status of the action execution. 0 means normal, other values mean abnormal.
*/
public function actionDown($limit = 1)
{
@ -246,11 +246,11 @@ abstract class BaseMigrateController extends Controller
* yii migrate/redo all # redo all migrations
* ```
*
* @param integer $limit the number of migrations to be redone. Defaults to 1,
* @param int $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.
*
* @return integer the status of the action execution. 0 means normal, other values mean abnormal.
* @return int the status of the action execution. 0 means normal, other values mean abnormal.
*/
public function actionRedo($limit = 1)
{
@ -352,7 +352,7 @@ abstract class BaseMigrateController extends Controller
*
* @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.
* @return integer CLI exit code
* @return int CLI exit code
* @throws Exception if the version argument is invalid or the version cannot be found.
*/
public function actionMark($version)
@ -443,7 +443,7 @@ abstract class BaseMigrateController extends Controller
* yii migrate/history all # showing the whole history
* ```
*
* @param integer $limit the maximum number of migrations to be displayed.
* @param int $limit the maximum number of migrations to be displayed.
* If it is "all", the whole migration history will be displayed.
* @throws \yii\console\Exception if invalid limit value passed
*/
@ -487,7 +487,7 @@ abstract class BaseMigrateController extends Controller
* yii migrate/new all # showing all new migrations
* ```
*
* @param integer $limit the maximum number of new migrations to be displayed.
* @param int $limit the maximum number of new migrations to be displayed.
* If it is `all`, all available new migrations will be displayed.
* @throws \yii\console\Exception if invalid limit value passed
*/
@ -637,7 +637,7 @@ abstract class BaseMigrateController extends Controller
/**
* Upgrades with the specified migration class.
* @param string $class the migration class name
* @return boolean whether the migration is successful
* @return bool whether the migration is successful
*/
protected function migrateUp($class)
{
@ -665,7 +665,7 @@ abstract class BaseMigrateController extends Controller
/**
* Downgrades with the specified migration class.
* @param string $class the migration class name
* @return boolean whether the migration is successful
* @return bool whether the migration is successful
*/
protected function migrateDown($class)
{
@ -708,7 +708,7 @@ abstract class BaseMigrateController extends Controller
/**
* Migrates to the specified apply time in the past.
* @param integer $time UNIX timestamp value.
* @param int $time UNIX timestamp value.
*/
protected function migrateToTime($time)
{
@ -727,7 +727,7 @@ abstract class BaseMigrateController extends Controller
/**
* Migrates to the certain version.
* @param string $version name in the full format.
* @return integer CLI exit code
* @return int CLI exit code
* @throws Exception if the provided version cannot be found.
*/
protected function migrateToVersion($version)
@ -827,7 +827,7 @@ abstract class BaseMigrateController extends Controller
/**
* Returns the migration history.
* @param integer $limit the maximum number of records in the history to be returned. `null` for "no limit".
* @param int $limit the maximum number of records in the history to be returned. `null` for "no limit".
* @return array the migration history
*/
abstract protected function getMigrationHistory($limit);

6
framework/console/controllers/CacheController.php

@ -139,7 +139,7 @@ class CacheController extends Controller
* ```
*
* @param string $db id connection component
* @return integer exit code
* @return int exit code
* @throws Exception
* @throws \yii\base\InvalidConfigException
*
@ -231,7 +231,7 @@ class CacheController extends Controller
/**
* Prompts user with confirmation if caches should be flushed.
* @param array $cachesNames
* @return boolean
* @return bool
*/
private function confirmFlush($cachesNames)
{
@ -275,7 +275,7 @@ class CacheController extends Controller
/**
* Checks if given class is a Cache class.
* @param string $className class name.
* @return boolean
* @return bool
*/
private function isCacheClass($className)
{

6
framework/console/controllers/FixtureController.php

@ -310,7 +310,7 @@ class FixtureController extends Controller
* Prompts user with confirmation if fixtures should be loaded.
* @param array $fixtures
* @param array $except
* @return boolean
* @return bool
*/
private function confirmLoad($fixtures, $except)
{
@ -342,7 +342,7 @@ class FixtureController extends Controller
* Prompts user with confirmation for fixtures that should be unloaded.
* @param array $fixtures
* @param array $except
* @return boolean
* @return bool
*/
private function confirmUnload($fixtures, $except)
{
@ -381,7 +381,7 @@ class FixtureController extends Controller
/**
* Checks if needed to apply all fixtures.
* @param string $fixture
* @return boolean
* @return bool
*/
public function needToApplyAll($fixture)
{

6
framework/console/controllers/HelpController.php

@ -43,7 +43,7 @@ class HelpController extends Controller
*
* @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
* @return int the exit status
* @throws Exception if the command for help is unknown
*/
public function actionIndex($command = null)
@ -164,7 +164,7 @@ class HelpController extends Controller
/**
* Validates if the given class is a valid console controller class.
* @param string $controllerClass
* @return boolean
* @return bool
*/
protected function validateControllerClass($controllerClass)
{
@ -370,7 +370,7 @@ 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 bool $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

46
framework/console/controllers/MessageController.php

@ -62,22 +62,22 @@ class MessageController extends Controller
*/
public $translator = 'Yii::t';
/**
* @var boolean whether to sort messages by keys when merging new messages
* @var bool whether to sort messages by keys when merging new messages
* with the existing ones. Defaults to false, which means the new (untranslated)
* messages will be separated from the old (translated) ones.
*/
public $sort = false;
/**
* @var boolean whether the message file should be overwritten with the merged messages
* @var bool whether the message file should be overwritten with the merged messages
*/
public $overwrite = true;
/**
* @var boolean whether to remove messages that no longer appear in the source code.
* @var bool whether to remove messages that no longer appear in the source code.
* Defaults to false, which means these messages will NOT be removed.
*/
public $removeUnused = false;
/**
* @var boolean whether to mark messages that no longer appear in the source code.
* @var bool whether to mark messages that no longer appear in the source code.
* Defaults to true, which means each of these messages will be enclosed with a pair of '@@' marks.
*/
public $markUnused = true;
@ -188,7 +188,7 @@ class MessageController extends Controller
* You may use this configuration file with the "extract" command.
*
* @param string $filePath output file name or alias.
* @return integer CLI exit code
* @return int CLI exit code
* @throws Exception on failure.
*/
public function actionConfig($filePath)
@ -234,7 +234,7 @@ EOD;
* you may use this configuration file with the "extract" command.
*
* @param string $filePath output file name or alias.
* @return integer CLI exit code
* @return int CLI exit code
* @throws Exception on failure.
*/
public function actionConfigTemplate($filePath)
@ -353,9 +353,9 @@ EOD;
* @param \yii\db\Connection $db
* @param string $sourceMessageTable
* @param string $messageTable
* @param boolean $removeUnused
* @param bool $removeUnused
* @param array $languages
* @param boolean $markUnused
* @param bool $markUnused
*/
protected function saveMessagesToDb($messages, $db, $sourceMessageTable, $messageTable, $removeUnused, $languages, $markUnused)
{
@ -549,7 +549,7 @@ EOD;
*
* @param string $category category that is checked
* @param array $ignoreCategories message categories to ignore.
* @return boolean
* @return bool
* @since 2.0.7
*/
protected function isCategoryIgnored($category, array $ignoreCategories)
@ -577,7 +577,7 @@ EOD;
*
* @param array|string $a
* @param array|string $b
* @return boolean
* @return bool
* @since 2.0.1
*/
protected function tokensEqual($a, $b)
@ -594,7 +594,7 @@ EOD;
* Finds out a line of the first non-char PHP token found
*
* @param array $tokens
* @return integer|string
* @return int|string
* @since 2.0.1
*/
protected function getLine($tokens)
@ -612,10 +612,10 @@ EOD;
*
* @param array $messages
* @param string $dirName name of the directory 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 boolean $markUnused if obsolete translations should be marked
* @param bool $overwrite if existing file should be overwritten without backup
* @param bool $removeUnused if obsolete translations should be removed
* @param bool $sort if translations should be sorted
* @param bool $markUnused if obsolete translations should be marked
*/
protected function saveMessagesToPHP($messages, $dirName, $overwrite, $removeUnused, $sort, $markUnused)
{
@ -635,11 +635,11 @@ EOD;
*
* @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 bool $overwrite if existing file should be overwritten without backup
* @param bool $removeUnused if obsolete translations should be removed
* @param bool $sort if translations should be sorted
* @param string $category message category
* @param boolean $markUnused if obsolete translations should be marked
* @param bool $markUnused if obsolete translations should be marked
* @return int exit code
*/
protected function saveMessagesCategoryToPHP($messages, $fileName, $overwrite, $removeUnused, $sort, $category, $markUnused)
@ -734,11 +734,11 @@ EOD;
*
* @param array $messages
* @param string $dirName name of the directory 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 bool $overwrite if existing file should be overwritten without backup
* @param bool $removeUnused if obsolete translations should be removed
* @param bool $sort if translations should be sorted
* @param string $catalog message catalog
* @param boolean $markUnused if obsolete translations should be marked
* @param bool $markUnused if obsolete translations should be marked
*/
protected function saveMessagesToPO($messages, $dirName, $overwrite, $removeUnused, $sort, $catalog, $markUnused)
{

4
framework/console/controllers/MigrateController.php

@ -101,7 +101,7 @@ class MigrateController extends BaseMigrateController
'create_junction' => '@yii/views/createTableMigration.php',
];
/**
* @var boolean indicates whether the table names generated should consider
* @var bool indicates whether the table names generated should consider
* the `tablePrefix` setting of the DB connection. For example, if the table
* name is `post` the generator wil return `{{%post}}`.
* @since 2.0.8
@ -161,7 +161,7 @@ class MigrateController extends BaseMigrateController
* 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.
* @return boolean whether the action should continue to be executed.
* @return bool whether the action should continue to be executed.
*/
public function beforeAction($action)
{

4
framework/console/controllers/ServeController.php

@ -47,7 +47,7 @@ class ServeController extends Controller
*
* @param string $address address to serve on. Either "host" or "host:port".
*
* @return integer
* @return int
*/
public function actionIndex($address = 'localhost')
{
@ -109,7 +109,7 @@ class ServeController extends Controller
/**
* @param string $address server address
* @return boolean if address is already in use
* @return bool if address is already in use
*/
protected function isAddressTaken($address)
{

22
framework/data/BaseDataProvider.php

@ -16,16 +16,16 @@ use yii\base\InvalidParamException;
*
* For more details and usage information on BaseDataProvider, see the [guide article on data providers](guide:output-data-providers).
*
* @property integer $count The number of data models in the current page. This property is read-only.
* @property int $count The number of data models in the current page. This property is read-only.
* @property array $keys The list of key values corresponding to [[models]]. Each data model in [[models]] is
* uniquely identified by the corresponding key value in this array.
* @property array $models The list of data models in the current page.
* @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|boolean $sort The sorting object. If this is false, it means the sorting is disabled. Note
* @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 integer $totalCount Total number of possible data models.
* @property int $totalCount Total number of possible data models.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
@ -61,7 +61,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
/**
* Returns a value indicating the total number of data models in this data provider.
* @return integer total number of data models in this data provider.
* @return int total number of data models in this data provider.
*/
abstract protected function prepareTotalCount();
@ -73,7 +73,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
*
* This method will be implicitly called by [[getModels()]] and [[getKeys()]] if it has not been called before.
*
* @param boolean $forcePrepare whether to force data preparation even if it has been done before.
* @param bool $forcePrepare whether to force data preparation even if it has been done before.
*/
public function prepare($forcePrepare = false)
{
@ -128,7 +128,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
/**
* Returns the number of data models in the current page.
* @return integer the number of data models in the current page.
* @return int the number of data models in the current page.
*/
public function getCount()
{
@ -139,7 +139,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
* Returns the total number of data models.
* When [[pagination]] is false, this returns the same value as [[count]].
* Otherwise, it will call [[prepareTotalCount()]] to get the count.
* @return integer total number of possible data models.
* @return int total number of possible data models.
*/
public function getTotalCount()
{
@ -154,7 +154,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
/**
* Sets the total number of data models.
* @param integer $value the total number of data models.
* @param int $value the total number of data models.
*/
public function setTotalCount($value)
{
@ -178,7 +178,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.
* @param array|Pagination|bool $value the pagination to be used by this data provider.
* This can be one of the following:
*
* - a configuration array for creating the pagination object. The "class" element defaults
@ -206,7 +206,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
/**
* Returns the sorting object used by this data provider.
* @return Sort|boolean the sorting object. If this is false, it means the sorting is disabled.
* @return Sort|bool the sorting object. If this is false, it means the sorting is disabled.
*/
public function getSort()
{
@ -219,7 +219,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.
* @param array|Sort|bool $value the sort definition to be used by this data provider.
* This can be one of the following:
*
* - a configuration array for creating the sort definition object. The "class" element defaults

6
framework/data/DataProviderInterface.php

@ -28,7 +28,7 @@ interface DataProviderInterface
*
* This method will be implicitly called by [[getModels()]] and [[getKeys()]] if it has not been called before.
*
* @param boolean $forcePrepare whether to force data preparation even if it has been done before.
* @param bool $forcePrepare whether to force data preparation even if it has been done before.
*/
public function prepare($forcePrepare = false);
@ -36,14 +36,14 @@ interface DataProviderInterface
* Returns the number of data models in the current page.
* This is equivalent to `count($provider->getModels())`.
* When [[getPagination|pagination]] is false, this is the same as [[getTotalCount|totalCount]].
* @return integer the number of data models in the current page.
* @return int the number of data models in the current page.
*/
public function getCount();
/**
* Returns the total number of data models.
* When [[getPagination|pagination]] is false, this is the same as [[getCount|count]].
* @return integer total number of possible data models.
* @return int total number of possible data models.
*/
public function getTotalCount();

48
framework/data/Pagination.php

@ -58,16 +58,16 @@ use yii\web\Request;
*
* For more details and usage information on Pagination, see the [guide article on pagination](guide:output-pagination).
*
* @property integer $limit The limit of the data. This may be used to set the LIMIT value for a SQL statement
* @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 integer $offset The offset of the data. This may be used to set the OFFSET value for a SQL
* @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 integer $page The zero-based current page number.
* @property integer $pageCount Number of pages. This property is read-only.
* @property integer $pageSize The number of items per page. If it is less than 1, it means the page size is
* @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
* infinite, and thus a single page contains all items.
*
* @author Qiang Xue <qiang.xue@gmail.com>
@ -91,7 +91,7 @@ class Pagination extends Object implements Linkable
*/
public $pageSizeParam = 'per-page';
/**
* @var boolean whether to always have the page parameter in the URL created by [[createUrl()]].
* @var bool whether to always have the page parameter in the URL created by [[createUrl()]].
* If false and [[page]] is 0, the page parameter will not be put in the URL.
*/
public $forcePageParam = true;
@ -116,7 +116,7 @@ class Pagination extends Object implements Linkable
*/
public $urlManager;
/**
* @var boolean whether to check if [[page]] is within valid range.
* @var bool whether to check if [[page]] is within valid range.
* When this property is true, the value of [[page]] will always be between 0 and ([[pageCount]]-1).
* Because [[pageCount]] relies on the correct value of [[totalCount]] which may not be available
* in some cases (e.g. MongoDB), you may want to set this property to be false to disable the page
@ -124,11 +124,11 @@ class Pagination extends Object implements Linkable
*/
public $validatePage = true;
/**
* @var integer total number of items.
* @var int total number of items.
*/
public $totalCount = 0;
/**
* @var integer the default page size. This property will be returned by [[pageSize]] when page size
* @var int the default page size. This property will be returned by [[pageSize]] when page size
* cannot be determined by [[pageSizeParam]] from [[params]].
*/
public $defaultPageSize = 20;
@ -139,14 +139,14 @@ class Pagination extends Object implements Linkable
public $pageSizeLimit = [1, 50];
/**
* @var integer number of items on each page.
* @var int number of items on each page.
* If it is less than 1, it means the page size is infinite, and thus a single page contains all items.
*/
private $_pageSize;
/**
* @return integer number of pages
* @return int number of pages
*/
public function getPageCount()
{
@ -164,8 +164,8 @@ 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.
* @return integer the zero-based current page number.
* @param bool $recalculate whether to recalculate the current page based on the page size and item count.
* @return int the zero-based current page number.
*/
public function getPage($recalculate = false)
{
@ -179,8 +179,8 @@ class Pagination extends Object implements Linkable
/**
* Sets the current page number.
* @param integer $value the zero-based index of the current page.
* @param boolean $validatePage whether to validate the page number. Note that in order
* @param int $value the zero-based index of the current page.
* @param bool $validatePage whether to validate the page number. Note that in order
* to validate the page number, both [[validatePage]] and this parameter must be true.
*/
public function setPage($value, $validatePage = false)
@ -206,7 +206,7 @@ class Pagination extends Object implements Linkable
* Returns the number of items per page.
* By default, this method will try to determine the page size by [[pageSizeParam]] in [[params]].
* If the page size cannot be determined this way, [[defaultPageSize]] will be returned.
* @return integer the number of items per page. If it is less than 1, it means the page size is infinite,
* @return int the number of items per page. If it is less than 1, it means the page size is infinite,
* and thus a single page contains all items.
* @see pageSizeLimit
*/
@ -226,8 +226,8 @@ class Pagination extends Object implements Linkable
}
/**
* @param integer $value the number of items per page.
* @param boolean $validatePageSize whether to validate page size.
* @param int $value the number of items per page.
* @param bool $validatePageSize whether to validate page size.
*/
public function setPageSize($value, $validatePageSize = false)
{
@ -249,9 +249,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 integer $pageSize the number of items on each page. If not set, the value of [[pageSize]] will be used.
* @param boolean $absolute whether to create an absolute URL. Defaults to `false`.
* @param int $page the zero-based page number that the URL should point to.
* @param int $pageSize the number of items on each page. If not set, the value of [[pageSize]] will be used.
* @param bool $absolute whether to create an absolute URL. Defaults to `false`.
* @return string the created URL
* @see params
* @see forcePageParam
@ -287,7 +287,7 @@ class Pagination extends Object implements Linkable
}
/**
* @return integer the offset of the data. This may be used to set the
* @return int 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.
*/
public function getOffset()
@ -298,7 +298,7 @@ class Pagination extends Object implements Linkable
}
/**
* @return integer the limit of the data. This may be used to set the
* @return int 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.
*/
@ -311,7 +311,7 @@ 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.
* @param bool $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.
*/

14
framework/data/Sort.php

@ -80,7 +80,7 @@ use yii\web\Request;
class Sort extends Object
{
/**
* @var boolean whether the sorting can be applied to multiple attributes simultaneously.
* @var bool whether the sorting can be applied to multiple attributes simultaneously.
* Defaults to `false`, which means each time the data can only be sorted by one attribute.
*/
public $enableMultiSort = false;
@ -204,7 +204,7 @@ class Sort extends Object
/**
* Returns the columns and their corresponding sort directions.
* @param boolean $recalculate whether to recalculate the sort directions
* @param bool $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.
*/
@ -230,7 +230,7 @@ class Sort extends Object
/**
* Returns the currently requested sort information.
* @param boolean $recalculate whether to recalculate the sort directions
* @param bool $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.
@ -273,7 +273,7 @@ class Sort extends Object
* @param array|null $attributeOrders sort directions indexed by attribute names.
* Sort direction can be either `SORT_ASC` for ascending order or
* `SORT_DESC` for descending order.
* @param boolean $validate whether to validate given attribute orders against [[attributes]] and [[enableMultiSort]].
* @param bool $validate whether to validate given attribute orders against [[attributes]] and [[enableMultiSort]].
* If validation is enabled incorrect entries will be removed.
* @since 2.0.10
*/
@ -297,7 +297,7 @@ class Sort extends Object
/**
* Returns the sort direction of the specified attribute in the current request.
* @param string $attribute the attribute name
* @return boolean|null Sort direction of the attribute. Can be either `SORT_ASC`
* @return bool|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.
*/
@ -355,7 +355,7 @@ class Sort extends Object
* 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`.
* @param bool $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
@ -416,7 +416,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
* @return boolean whether the sort definition supports sorting by the named attribute.
* @return bool whether the sort definition supports sorting by the named attribute.
*/
public function hasAttribute($name)
{

4
framework/db/ActiveQuery.php

@ -389,7 +389,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
*
* The alias syntax is available since version 2.0.7.
*
* @param boolean|array $eagerLoading whether to eager load the relations specified in `$with`.
* @param bool|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. Defaults to `true`.
* @param string|array $joinType the join type of the relations specified in `$with`.
@ -476,7 +476,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* 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 string|array $with the relations to be joined with.
* @param boolean|array $eagerLoading whether to eager loading the relations.
* @param bool|array $eagerLoading whether to eager loading the relations.
* @return $this the query object itself
* @see joinWith()
*/

2
framework/db/ActiveQueryInterface.php

@ -24,7 +24,7 @@ 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.
* @param bool $value whether to return the query results in terms of arrays instead of Active Records.
* @return $this the query object itself
*/
public function asArray($value = true);

4
framework/db/ActiveQueryTrait.php

@ -25,7 +25,7 @@ trait ActiveQueryTrait
*/
public $with;
/**
* @var boolean whether to return each record as an array. If false (default), an object
* @var bool whether to return each record as an array. If false (default), an object
* of [[modelClass]] will be created to represent each record.
*/
public $asArray;
@ -33,7 +33,7 @@ trait ActiveQueryTrait
/**
* Sets the [[asArray]] property.
* @param boolean $value whether to return the query results in terms of arrays instead of Active Records.
* @param bool $value whether to return the query results in terms of arrays instead of Active Records.
* @return $this the query object itself
*/
public function asArray($value = true)

28
framework/db/ActiveRecord.php

@ -108,7 +108,7 @@ class ActiveRecord extends BaseActiveRecord
* $customer->loadDefaultValues();
* ```
*
* @param boolean $skipIfSet whether existing value should be preserved.
* @param bool $skipIfSet whether existing value should be preserved.
* This will only set defaults for attributes that are `null`.
* @return $this the model instance itself.
*/
@ -200,7 +200,7 @@ class ActiveRecord extends BaseActiveRecord
* @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
* @return int the number of rows updated
*/
public static function updateAll($attributes, $condition = '', $params = [])
{
@ -224,7 +224,7 @@ class ActiveRecord extends BaseActiveRecord
* 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
* @return int the number of rows updated
*/
public static function updateAllCounters($counters, $condition = '', $params = [])
{
@ -252,7 +252,7 @@ class ActiveRecord extends BaseActiveRecord
* @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
* @return int the number of rows deleted
*/
public static function deleteAll($condition = '', $params = [])
{
@ -408,12 +408,12 @@ class ActiveRecord extends BaseActiveRecord
* $customer->insert();
* ```
*
* @param boolean $runValidation whether to perform validation (calling [[validate()]])
* @param bool $runValidation whether to perform validation (calling [[validate()]])
* before saving the record. Defaults to `true`. If the validation fails, the record
* will not be saved to the database and this method will return `false`.
* @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.
* @return bool whether the attributes are valid and the record is inserted successfully.
* @throws \Exception in case insert failed.
*/
public function insert($runValidation = true, $attributes = null)
@ -446,7 +446,7 @@ 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.
* @return boolean whether the record is inserted successfully.
* @return bool whether the record is inserted successfully.
*/
protected function insertInternal($attributes = null)
{
@ -511,12 +511,12 @@ class ActiveRecord extends BaseActiveRecord
* }
* ```
*
* @param boolean $runValidation whether to perform validation (calling [[validate()]])
* @param bool $runValidation whether to perform validation (calling [[validate()]])
* before saving the record. Defaults to `true`. If the validation fails, the record
* will not be saved to the database and this method will return `false`.
* @param array $attributeNames list of attributes that need to be saved. Defaults to `null`,
* meaning all attributes that are loaded from DB will be saved.
* @return integer|false the number of rows affected, or false if validation fails
* @return int|false 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.
@ -561,7 +561,7 @@ 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|false the number of rows deleted, or `false` if the deletion is unsuccessful for some reason.
* @return int|false 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.
@ -590,7 +590,7 @@ class ActiveRecord extends BaseActiveRecord
/**
* Deletes an ActiveRecord without considering transaction.
* @return integer|false the number of rows deleted, or `false` if the deletion is unsuccessful for some reason.
* @return int|false 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
*/
@ -622,7 +622,7 @@ class ActiveRecord extends BaseActiveRecord
* 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.
* @return bool whether the two active records refer to the same row in the same database table.
*/
public function equals($record)
{
@ -635,8 +635,8 @@ 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]].
* @return boolean whether the specified operation is transactional in the current [[scenario]].
* @param int $operation the operation to check. Possible values are [[OP_INSERT]], [[OP_UPDATE]] and [[OP_DELETE]].
* @return bool whether the specified operation is transactional in the current [[scenario]].
*/
public function isTransactional($operation)
{

34
framework/db/ActiveRecordInterface.php

@ -54,13 +54,13 @@ interface ActiveRecordInterface
/**
* Returns a value indicating whether the record has an attribute with the specified name.
* @param string $name the name of the attribute
* @return boolean whether the record has an attribute with the specified name.
* @return bool 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,
* @param bool $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
@ -74,7 +74,7 @@ interface ActiveRecordInterface
* This refers to the primary key value that is populated into the record
* after executing a find method (e.g. find(), findOne()).
* 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,
* @param bool $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
@ -89,7 +89,7 @@ interface 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
* @return boolean whether the given set of attributes represents the primary key for this model
* @return bool whether the given set of attributes represents the primary key for this model
*/
public static function isPrimaryKey($keys);
@ -240,7 +240,7 @@ interface ActiveRecordInterface
* @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
* @return int the number of rows updated
*/
public static function updateAll($attributes, $condition = null);
@ -257,7 +257,7 @@ interface ActiveRecordInterface
* @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
* @return int the number of rows deleted
*/
public static function deleteAll($condition = null);
@ -276,12 +276,12 @@ interface ActiveRecordInterface
* $customer->save();
* ```
*
* @param boolean $runValidation whether to perform validation (calling [[Model::validate()|validate()]])
* @param bool $runValidation whether to perform validation (calling [[Model::validate()|validate()]])
* before saving the record. Defaults to `true`. If the validation fails, the record
* will not be saved to the database and this method will return `false`.
* @param array $attributeNames list of attribute names that need to be saved. Defaults to `null`,
* meaning all attributes that are loaded from DB will be saved.
* @return boolean whether the saving succeeded (i.e. no validation errors occurred).
* @return bool whether the saving succeeded (i.e. no validation errors occurred).
*/
public function save($runValidation = true, $attributeNames = null);
@ -297,12 +297,12 @@ interface ActiveRecordInterface
* $customer->insert();
* ```
*
* @param boolean $runValidation whether to perform validation (calling [[Model::validate()|validate()]])
* @param bool $runValidation whether to perform validation (calling [[Model::validate()|validate()]])
* before saving the record. Defaults to `true`. If the validation fails, the record
* will not be saved to the database and this method will return `false`.
* @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.
* @return bool whether the attributes are valid and the record is inserted successfully.
*/
public function insert($runValidation = true, $attributes = null);
@ -318,12 +318,12 @@ interface ActiveRecordInterface
* $customer->update();
* ```
*
* @param boolean $runValidation whether to perform validation (calling [[Model::validate()|validate()]])
* @param bool $runValidation whether to perform validation (calling [[Model::validate()|validate()]])
* before saving the record. Defaults to `true`. If the validation fails, the record
* will not be saved to the database and this method will return `false`.
* @param array $attributeNames 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
* @return int|bool 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.
@ -333,14 +333,14 @@ 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.
* @return int|bool 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.
*/
public function delete();
/**
* Returns a value indicating whether the current record is new (not saved in the database).
* @return boolean whether the record is new and should be inserted when calling [[save()]].
* @return bool whether the record is new and should be inserted when calling [[save()]].
*/
public function getIsNewRecord();
@ -348,7 +348,7 @@ interface ActiveRecordInterface
* Returns a value indicating whether the given active record is the same as the current one.
* Two [[getIsNewRecord()|new]] records are considered to be not equal.
* @param static $record record to compare to
* @return boolean whether the two active records refer to the same row in the same database table.
* @return bool whether the two active records refer to the same row in the same database table.
*/
public function equals($record);
@ -358,7 +358,7 @@ interface ActiveRecordInterface
* (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, e.g. `orders` for a relation defined via `getOrders()` method (case-sensitive).
* @param boolean $throwException whether to throw exception if the relation does not exist.
* @param bool $throwException whether to throw exception if the relation does not exist.
* @return ActiveQueryInterface the relational query object
*/
public function getRelation($name, $throwException = true);
@ -400,7 +400,7 @@ interface ActiveRecordInterface
*
* @param string $name the case sensitive name of the relationship, e.g. `orders` for a relation defined via `getOrders()` method.
* @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.
* @param bool $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.
*/

4
framework/db/ActiveRelationTrait.php

@ -24,7 +24,7 @@ use yii\base\InvalidParamException;
trait ActiveRelationTrait
{
/**
* @var boolean whether this query represents a relation to more than one record.
* @var bool whether this query represents a relation to more than one record.
* This property is only used in relational context. If true, this relation will
* populate all query results into AR instances using [[Query::all()|all()]].
* If false, only the first row of the results will be retrieved using [[Query::one()|one()]].
@ -347,7 +347,7 @@ trait ActiveRelationTrait
* @param array $link
* @param array $viaModels
* @param array $viaLink
* @param boolean $checkMultiple
* @param bool $checkMultiple
* @return array
*/
private function buildBuckets($models, $link, $viaModels = null, $viaLink = null, $checkMultiple = true)

64
framework/db/BaseActiveRecord.php

@ -24,7 +24,7 @@ use yii\helpers\ArrayHelper;
*
* @property array $dirtyAttributes The changed attribute values (name-value pairs). This property is
* read-only.
* @property boolean $isNewRecord Whether the record is new and should be inserted when calling [[save()]].
* @property bool $isNewRecord Whether the record is new and should be inserted when calling [[save()]].
* @property array $oldAttributes The old attribute values (name-value pairs). Note that the type of this
* property differs in getter and setter. See [[getOldAttributes()]] and [[setOldAttributes()]] for details.
* @property mixed $oldPrimaryKey The old primary key value. An array (column name => column value) is
@ -152,7 +152,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* @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
* @return int the number of rows updated
* @throws NotSupportedException if not overridden
*/
public static function updateAll($attributes, $condition = '')
@ -172,7 +172,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* 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
* @return int the number of rows updated
* @throws NotSupportedException if not overrided
*/
public static function updateAllCounters($counters, $condition = '')
@ -193,7 +193,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* @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
* @return int the number of rows deleted
* @throws NotSupportedException if not overrided
*/
public static function deleteAll($condition = '', $params = [])
@ -311,7 +311,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
* @return boolean whether the property value is null
* @return bool whether the property value is null
*/
public function __isset($name)
{
@ -436,7 +436,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Check whether the named relation has been populated with records.
* @param string $name the relation name, e.g. `orders` for a relation defined via `getOrders()` method (case-sensitive).
* @return boolean whether relation has been populated with records.
* @return bool whether relation has been populated with records.
* @see getRelation()
*/
public function isRelationPopulated($name)
@ -457,7 +457,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
* @return boolean whether the model has an attribute with the specified name.
* @return bool whether the model has an attribute with the specified name.
*/
public function hasAttribute($name)
{
@ -557,10 +557,10 @@ 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 boolean $identical whether the comparison of new and old value is made for
* @param bool $identical whether the comparison of new and old value is made for
* identical values using `===`, defaults to `true`. Otherwise `==` is used for comparison.
* This parameter is available since version 2.0.4.
* @return boolean whether the attribute has been changed
* @return bool whether the attribute has been changed
*/
public function isAttributeChanged($name, $identical = true)
{
@ -622,12 +622,12 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* $customer->save();
* ```
*
* @param boolean $runValidation whether to perform validation (calling [[validate()]])
* @param bool $runValidation whether to perform validation (calling [[validate()]])
* before saving the record. Defaults to `true`. If the validation fails, the record
* will not be saved to the database and this method will return `false`.
* @param array $attributeNames list of attribute names that need to be saved. Defaults to null,
* meaning all attributes that are loaded from DB will be saved.
* @return boolean whether the saving succeeded (i.e. no validation errors occurred).
* @return bool whether the saving succeeded (i.e. no validation errors occurred).
*/
public function save($runValidation = true, $attributeNames = null)
{
@ -679,12 +679,12 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* }
* ```
*
* @param boolean $runValidation whether to perform validation (calling [[validate()]])
* @param bool $runValidation whether to perform validation (calling [[validate()]])
* before saving the record. Defaults to `true`. If the validation fails, the record
* will not be saved to the database and this method will return `false`.
* @param array $attributeNames list of attribute names that need to be saved. Defaults to null,
* meaning all attributes that are loaded from DB will be saved.
* @return integer|false the number of rows affected, or `false` if validation fails
* @return int|false 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.
@ -711,7 +711,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* Note that this method will **not** perform data validation and will **not** trigger events.
*
* @param array $attributes the attributes (names or name-value pairs) to be updated
* @return integer the number of rows affected.
* @return int the number of rows affected.
*/
public function updateAttributes($attributes)
{
@ -742,7 +742,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* @see update()
* @param array $attributes attributes to update
* @return integer|false the number of rows affected, or false if [[beforeSave()]] stops the updating process.
* @return int|false the number of rows affected, or false if [[beforeSave()]] stops the updating process.
* @throws StaleObjectException
*/
protected function updateInternal($attributes = null)
@ -797,7 +797,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
*
* @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
* @return bool whether the saving is successful
* @see updateAllCounters()
*/
public function updateCounters($counters)
@ -830,7 +830,7 @@ 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|false the number of rows deleted, or `false` if the deletion is unsuccessful for some reason.
* @return int|false 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.
@ -860,7 +860,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Returns a value indicating whether the current record is new.
* @return boolean whether the record is new and should be inserted when calling [[save()]].
* @return bool whether the record is new and should be inserted when calling [[save()]].
*/
public function getIsNewRecord()
{
@ -869,7 +869,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Sets the value indicating whether the record is new.
* @param boolean $value whether the record is new and should be inserted when calling [[save()]].
* @param bool $value whether the record is new and should be inserted when calling [[save()]].
* @see getIsNewRecord()
*/
public function setIsNewRecord($value)
@ -919,9 +919,9 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* }
* ```
*
* @param boolean $insert whether this method called while inserting a record.
* @param bool $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.
* @return bool whether the insertion or updating should continue.
* If `false`, the insertion or updating will be cancelled.
*/
public function beforeSave($insert)
@ -938,7 +938,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* or an [[EVENT_AFTER_UPDATE]] event if `$insert` is `false`. The event class used is [[AfterSaveEvent]].
* 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.
* @param bool $insert whether this method called while inserting a record.
* If `false`, it means the method is called while updating a record.
* @param array $changedAttributes The old values of attributes that had changed and were saved.
* You can use this parameter to take action based on the changes made for example send an email
@ -970,7 +970,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* }
* ```
*
* @return boolean whether the record should be deleted. Defaults to `true`.
* @return bool whether the record should be deleted. Defaults to `true`.
*/
public function beforeDelete()
{
@ -997,7 +997,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* If the refresh is successful, an [[EVENT_AFTER_REFRESH]] event will be triggered.
* This event is available since version 2.0.8.
*
* @return boolean whether the row still exists in the database. If `true`, the latest data
* @return bool 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.
*/
public function refresh()
@ -1034,7 +1034,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* 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.
* @return bool whether the two active records refer to the same row in the same database table.
*/
public function equals($record)
{
@ -1047,7 +1047,7 @@ 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`,
* @param bool $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
@ -1077,7 +1077,7 @@ 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(), findOne()).
* 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`,
* @param bool $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
@ -1155,7 +1155,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
* @return boolean whether there is an element at the specified offset.
* @return bool whether there is an element at the specified offset.
*/
public function offsetExists($offset)
{
@ -1167,7 +1167,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* 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, e.g. `orders` for a relation defined via `getOrders()` method (case-sensitive).
* @param boolean $throwException whether to throw exception if the relation does not exist.
* @param bool $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.
@ -1316,7 +1316,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* @param ActiveRecordInterface $model the model to be unlinked from the current one.
* You have to make sure that the model is really related with the current model as this method
* does not check this.
* @param boolean $delete whether to delete the model that contains the foreign key.
* @param bool $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
@ -1414,7 +1414,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
* Note that to destroy the relationship without removing records make sure your keys can be set to null
*
* @param string $name the case sensitive name of the relationship, e.g. `orders` for a relation defined via `getOrders()` method.
* @param boolean $delete whether to delete the model that contains the foreign key.
* @param bool $delete whether to delete the model that contains the foreign key.
*/
public function unlinkAll($name, $delete = false)
{
@ -1509,7 +1509,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
* @return boolean whether the given set of attributes represents the primary key for this model
* @return bool whether the given set of attributes represents the primary key for this model
*/
public static function isPrimaryKey($keys)
{

10
framework/db/BatchQueryResult.php

@ -41,11 +41,11 @@ class BatchQueryResult extends Object implements \Iterator
*/
public $query;
/**
* @var integer the number of rows to be returned in each batch.
* @var int the number of rows to be returned in each batch.
*/
public $batchSize = 100;
/**
* @var boolean whether to return a single row during each iteration.
* @var bool whether to return a single row during each iteration.
* If false, a whole batch of rows will be returned in each iteration.
*/
public $each = false;
@ -63,7 +63,7 @@ class BatchQueryResult extends Object implements \Iterator
*/
private $_value;
/**
* @var string|integer the key for the current iteration
* @var string|int the key for the current iteration
*/
private $_key;
@ -150,7 +150,7 @@ class BatchQueryResult extends Object implements \Iterator
/**
* Returns the index of the current dataset.
* This method is required by the interface [[\Iterator]].
* @return integer the index of the current row.
* @return int the index of the current row.
*/
public function key()
{
@ -170,7 +170,7 @@ class BatchQueryResult extends Object implements \Iterator
/**
* Returns whether there is a valid dataset at the current position.
* This method is required by the interface [[\Iterator]].
* @return boolean whether there is a valid dataset at the current position.
* @return bool whether there is a valid dataset at the current position.
*/
public function valid()
{

14
framework/db/ColumnSchema.php

@ -22,7 +22,7 @@ class ColumnSchema extends Object
*/
public $name;
/**
* @var boolean whether this column can be null.
* @var bool whether this column can be null.
*/
public $allowNull;
/**
@ -49,27 +49,27 @@ class ColumnSchema extends Object
*/
public $enumValues;
/**
* @var integer display size of the column.
* @var int display size of the column.
*/
public $size;
/**
* @var integer precision of the column data, if it is numeric.
* @var int precision of the column data, if it is numeric.
*/
public $precision;
/**
* @var integer scale of the column data, if it is numeric.
* @var int scale of the column data, if it is numeric.
*/
public $scale;
/**
* @var boolean whether this column is a primary key
* @var bool whether this column is a primary key
*/
public $isPrimaryKey;
/**
* @var boolean whether this column is auto-incremental
* @var bool whether this column is auto-incremental
*/
public $autoIncrement = false;
/**
* @var boolean whether this column is unsigned. This is only meaningful
* @var bool whether this column is unsigned. This is only meaningful
* when [[type]] is `smallint`, `integer` or `bigint`.
*/
public $unsigned;

12
framework/db/ColumnSchemaBuilder.php

@ -34,18 +34,18 @@ class ColumnSchemaBuilder extends Object
*/
protected $type;
/**
* @var integer|string|array column size or precision definition. This is what goes into the parenthesis after
* @var int|string|array column size or precision definition. This is what goes into the parenthesis after
* the column type. This can be either a string, an integer or an array. If it is an array, the array values will
* be joined into a string separated by comma.
*/
protected $length;
/**
* @var boolean|null whether the column is or not nullable. If this is `true`, a `NOT NULL` constraint will be added.
* @var bool|null whether the column is or not nullable. If this is `true`, a `NOT NULL` constraint will be added.
* If this is `false`, a `NULL` constraint will be added.
*/
protected $isNotNull;
/**
* @var boolean whether the column values should be unique. If this is `true`, a `UNIQUE` constraint will be added.
* @var bool whether the column values should be unique. If this is `true`, a `UNIQUE` constraint will be added.
*/
protected $isUnique = false;
/**
@ -62,7 +62,7 @@ class ColumnSchemaBuilder extends Object
*/
protected $append;
/**
* @var boolean whether the column values should be unsigned. If this is `true`, an `UNSIGNED` keyword will be added.
* @var bool whether the column values should be unsigned. If this is `true`, an `UNSIGNED` keyword will be added.
* @since 2.0.7
*/
protected $isUnsigned = false;
@ -72,7 +72,7 @@ class ColumnSchemaBuilder extends Object
*/
protected $after;
/**
* @var boolean whether this column is to be inserted at the beginning of the table.
* @var bool whether this column is to be inserted at the beginning of the table.
* @since 2.0.8
*/
protected $isFirst;
@ -120,7 +120,7 @@ class ColumnSchemaBuilder extends Object
* Create a column schema builder instance giving the type and value precision.
*
* @param string $type type of the column. See [[$type]].
* @param integer|string|array $length length or precision of the column. See [[$length]].
* @param int|string|array $length length or precision of the column. See [[$length]].
* @param \yii\db\Connection $db the current database connection. See [[$db]].
* @param array $config name-value pairs that will be used to initialize the object properties
*/

30
framework/db/Command.php

@ -65,7 +65,7 @@ class Command extends Component
*/
public $pdoStatement;
/**
* @var integer the default fetch mode for this command.
* @var int the default fetch mode for this command.
* @see http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php
*/
public $fetchMode = \PDO::FETCH_ASSOC;
@ -76,7 +76,7 @@ class Command extends Component
*/
public $params = [];
/**
* @var integer the default number of seconds that query results can remain valid in cache.
* @var int the default number of seconds that query results can remain valid in cache.
* Use 0 to indicate that the cached data will never expire. And use a negative number to indicate
* query cache should not be used.
* @see cache()
@ -104,7 +104,7 @@ class Command extends Component
/**
* Enables query cache for this command.
* @param integer $duration the number of seconds that query result of this command can remain valid in the cache.
* @param int $duration the number of seconds that query result of this command can remain valid in the cache.
* If this is not set, the value of [[Connection::queryCacheDuration]] will be used instead.
* Use 0 to indicate that the cached data will never expire.
* @param \yii\caching\Dependency $dependency the cache dependency associated with the cached query result.
@ -198,7 +198,7 @@ class Command extends Component
* this may improve performance.
* For SQL statement with binding parameters, this method is invoked
* automatically.
* @param boolean $forRead whether this method is called for a read query. If null, it means
* @param bool $forRead whether this method is called for a read query. If null, it means
* the SQL statement should be used to determine whether it is for read or write.
* @throws Exception if there is any DB error
*/
@ -242,13 +242,13 @@ class Command extends Component
/**
* Binds a parameter to the SQL statement to be executed.
* @param string|integer $name parameter identifier. For a prepared statement
* @param string|int $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 PHP variable to bind to the SQL statement parameter (passed by reference)
* @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 int $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value.
* @param int $length length of the data type
* @param mixed $driverOptions the driver-specific options
* @return $this the current command being executed
* @see http://www.php.net/manual/en/function.PDOStatement-bindParam.php
@ -286,12 +286,12 @@ class Command extends Component
/**
* Binds a value to a parameter.
* @param string|integer $name Parameter identifier. For a prepared statement
* @param string|int $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.
* @param int $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value.
* @return $this the current command being executed
* @see http://www.php.net/manual/en/function.PDOStatement-bindValue.php
*/
@ -351,7 +351,7 @@ class Command extends 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)
* @param int $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.
@ -365,7 +365,7 @@ class Command extends 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)
* @param int $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|false the first row (in terms of an array) of the query result. False is returned if the query
* results in nothing.
@ -700,7 +700,7 @@ class Command extends Component
* @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.
* @param bool $unique whether to add UNIQUE constraint on the created index.
* @return $this the command object itself
*/
public function createIndex($name, $table, $columns, $unique = false)
@ -742,7 +742,7 @@ class Command extends Component
/**
* Builds a SQL command for enabling or disabling integrity check.
* @param boolean $check whether to turn on or off the integrity check.
* @param bool $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.
@ -820,7 +820,7 @@ class Command extends 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 int number of rows affected by the execution.
* @throws Exception execution failed
*/
public function execute()
@ -858,7 +858,7 @@ class Command extends 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)
* @param int $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

30
framework/db/Connection.php

@ -111,7 +111,7 @@ use yii\caching\Cache;
* ```
*
* @property string $driverName Name of the DB driver.
* @property boolean $isActive Whether the DB connection is established. This property is read-only.
* @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 PDO $masterPdo The PDO instance for the currently active master connection. This property is
@ -184,7 +184,7 @@ class Connection extends Component
*/
public $pdo;
/**
* @var boolean whether to enable schema caching.
* @var bool whether to enable schema caching.
* Note that in order to enable truly schema caching, a valid cache component as specified
* by [[schemaCache]] must be enabled and [[enableSchemaCache]] must be set true.
* @see schemaCacheDuration
@ -193,7 +193,7 @@ class Connection extends Component
*/
public $enableSchemaCache = false;
/**
* @var integer number of seconds that table metadata can remain valid in cache.
* @var int number of seconds that table metadata can remain valid in cache.
* Use 0 to indicate that the cached data will never expire.
* @see enableSchemaCache
*/
@ -211,7 +211,7 @@ class Connection extends Component
*/
public $schemaCache = 'cache';
/**
* @var boolean whether to enable query caching.
* @var bool whether to enable query caching.
* Note that in order to enable query caching, a valid cache component as specified
* by [[queryCache]] must be enabled and [[enableQueryCache]] must be set true.
* Also, only the results of the queries enclosed within [[cache()]] will be cached.
@ -221,7 +221,7 @@ class Connection extends Component
*/
public $enableQueryCache = true;
/**
* @var integer the default number of seconds that query results can remain valid in cache.
* @var int the default number of seconds that query results can remain valid in cache.
* Defaults to 3600, meaning 3600 seconds, or one hour. Use 0 to indicate that the cached data will never expire.
* The value of this property will be used when [[cache()]] is called without a cache duration.
* @see enableQueryCache
@ -247,7 +247,7 @@ class Connection extends Component
*/
public $charset;
/**
* @var boolean whether to turn on prepare emulation. Defaults to false, meaning PDO
* @var bool whether to turn on prepare emulation. Defaults to false, meaning PDO
* will use the native prepare support if available. For some databases (such as MySQL),
* this may need to be set true so that PDO can emulate the prepare support to bypass
* the buggy native prepare support.
@ -295,7 +295,7 @@ class Connection extends Component
*/
public $commandClass = 'yii\db\Command';
/**
* @var boolean whether to enable [savepoint](http://en.wikipedia.org/wiki/Savepoint).
* @var bool whether to enable [savepoint](http://en.wikipedia.org/wiki/Savepoint).
* Note that if the underlying DBMS does not support savepoint, setting this property to be true will have no effect.
*/
public $enableSavepoint = true;
@ -306,12 +306,12 @@ class Connection extends Component
*/
public $serverStatusCache = 'cache';
/**
* @var integer the retry interval in seconds for dead servers listed in [[masters]] and [[slaves]].
* @var int the retry interval in seconds for dead servers listed in [[masters]] and [[slaves]].
* This is used together with [[serverStatusCache]].
*/
public $serverRetryInterval = 600;
/**
* @var boolean whether to enable read/write splitting by using [[slaves]] to read data.
* @var bool whether to enable read/write splitting by using [[slaves]] to read data.
* Note that if [[slaves]] is empty, read/write splitting will NOT be enabled no matter what value this property takes.
*/
public $enableSlaves = true;
@ -389,7 +389,7 @@ class Connection extends Component
/**
* Returns a value indicating whether the DB connection is established.
* @return boolean whether the DB connection is established
* @return bool whether the DB connection is established
*/
public function getIsActive()
{
@ -415,7 +415,7 @@ class Connection extends Component
*
* @param callable $callable a PHP callable that contains DB queries which will make use of query cache.
* The signature of the callable is `function (Connection $db)`.
* @param integer $duration the number of seconds that query results can remain valid in the cache. If this is
* @param int $duration the number of seconds that query results can remain valid in the cache. If this is
* not set, the value of [[queryCacheDuration]] will be used instead.
* Use 0 to indicate that the cached data will never expire.
* @param \yii\caching\Dependency $dependency the cache dependency associated with the cached query results.
@ -478,7 +478,7 @@ class Connection extends Component
/**
* Returns the current query cache information.
* This method is used internally by [[Command]].
* @param integer $duration the preferred caching duration. If null, it will be ignored.
* @param int $duration the preferred caching duration. If null, it will be ignored.
* @param \yii\caching\Dependency $dependency the preferred caching dependency. If null, it will be ignored.
* @return array the current query cache information, or null if query cache is not enabled.
* @internal
@ -728,7 +728,7 @@ 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 bool $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)
@ -839,7 +839,7 @@ class Connection extends Component
* Returns the PDO instance for the currently active slave connection.
* When [[enableSlaves]] is true, one of the slaves will be used for read queries, and its PDO instance
* will be returned by this method.
* @param boolean $fallbackToMaster whether to return a master PDO in case none of the slave connections is available.
* @param bool $fallbackToMaster whether to return a master PDO in case none of the slave connections is available.
* @return PDO the PDO instance for the currently active slave connection. Null is returned if no slave connection
* is available and `$fallbackToMaster` is false.
*/
@ -867,7 +867,7 @@ class Connection extends Component
/**
* Returns the currently active slave connection.
* If this method is called the first time, it will try to open a slave connection when [[enableSlaves]] is true.
* @param boolean $fallbackToMaster whether to return a master connection in case there is no slave connection available.
* @param bool $fallbackToMaster whether to return a master connection in case there is no slave connection available.
* @return Connection the currently active slave connection. Null is returned if there is slave available and
* `$fallbackToMaster` is false.
*/

30
framework/db/DataReader.php

@ -40,10 +40,10 @@ use yii\base\InvalidCallException;
* [[fetchMode]]. See the [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
* for more details about possible fetch mode.
*
* @property integer $columnCount The number of columns in the result set. This property is read-only.
* @property integer $fetchMode Fetch mode. This property is write-only.
* @property boolean $isClosed Whether the reader is closed or not. This property is read-only.
* @property integer $rowCount Number of rows contained in the result. This property is read-only.
* @property int $columnCount The number of columns in the result set. This property is read-only.
* @property int $fetchMode Fetch mode. This property is write-only.
* @property bool $isClosed Whether the reader is closed or not. This property is read-only.
* @property int $rowCount Number of rows contained in the result. This property is read-only.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
@ -75,11 +75,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
* @param int|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 int $dataType Data type of the parameter
* @see http://www.php.net/manual/en/function.PDOStatement-bindColumn.php
*/
public function bindColumn($column, &$value, $dataType = null)
@ -93,7 +93,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
/**
* Set the default fetch mode for this statement
* @param integer $mode fetch mode
* @param int $mode fetch mode
* @see http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php
*/
public function setFetchMode($mode)
@ -113,7 +113,7 @@ 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
* @param int $columnIndex zero-based column index
* @return mixed the column of the current row, false if no more rows available
*/
public function readColumn($columnIndex)
@ -146,7 +146,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
* Advances the reader to the next result when reading the results of a batch of statements.
* This method is only useful when there are multiple result sets
* returned by the query. Not all DBMS support this feature.
* @return boolean Returns true on success or false on failure.
* @return bool Returns true on success or false on failure.
*/
public function nextResult()
{
@ -170,7 +170,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
/**
* whether the reader is closed or not.
* @return boolean whether the reader is closed or not.
* @return bool whether the reader is closed or not.
*/
public function getIsClosed()
{
@ -181,7 +181,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
* Returns the number of rows in the result set.
* Note, most DBMS may not give a meaningful count.
* In this case, use "SELECT COUNT(*) FROM tableName" to obtain the number of rows.
* @return integer number of rows contained in the result.
* @return int number of rows contained in the result.
*/
public function getRowCount()
{
@ -193,7 +193,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
* This method is required by the Countable interface.
* Note, most DBMS may not give a meaningful count.
* In this case, use "SELECT COUNT(*) FROM tableName" to obtain the number of rows.
* @return integer number of rows contained in the result.
* @return int number of rows contained in the result.
*/
public function count()
{
@ -203,7 +203,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
/**
* Returns the number of columns in the result set.
* Note, even there's no row in the reader, this still gives correct column number.
* @return integer the number of columns in the result set.
* @return int the number of columns in the result set.
*/
public function getColumnCount()
{
@ -228,7 +228,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
/**
* Returns the index of the current row.
* This method is required by the interface [[\Iterator]].
* @return integer the index of the current row.
* @return int the index of the current row.
*/
public function key()
{
@ -258,7 +258,7 @@ class DataReader extends \yii\base\Object implements \Iterator, \Countable
/**
* Returns whether there is a row of data at current position.
* This method is required by the interface [[\Iterator]].
* @return boolean whether there is a row of data at current position.
* @return bool whether there is a row of data at current position.
*/
public function valid()
{

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save