From 899b778994f19f7c7f7fdc12c615784020a9c6bc Mon Sep 17 00:00:00 2001 From: Alexander Mohorev Date: Sat, 25 Oct 2014 16:35:50 +0300 Subject: [PATCH] Correct type declarations --- extensions/bootstrap/ActiveField.php | 8 ++++---- framework/base/Security.php | 10 +++++----- framework/console/controllers/AssetController.php | 2 +- framework/console/controllers/BaseMigrateController.php | 4 ++-- framework/console/controllers/FixtureController.php | 2 +- framework/console/controllers/MessageController.php | 2 +- framework/grid/CheckboxColumn.php | 2 +- framework/helpers/BaseConsole.php | 2 +- framework/web/UrlRule.php | 2 +- tests/unit/data/ar/Type.php | 6 +++--- tests/unit/framework/base/SecurityTest.php | 6 +++--- tests/unit/framework/caching/CacheTestCase.php | 2 +- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/extensions/bootstrap/ActiveField.php b/extensions/bootstrap/ActiveField.php index 9bf7ec3..ac7de5f 100644 --- a/extensions/bootstrap/ActiveField.php +++ b/extensions/bootstrap/ActiveField.php @@ -92,7 +92,7 @@ use yii\helpers\ArrayHelper; class ActiveField extends \yii\widgets\ActiveField { /** - * @var bool whether to render [[checkboxList()]] and [[radioList()]] inline. + * @var boolean whether to render [[checkboxList()]] and [[radioList()]] inline. */ public $inline = false; /** @@ -137,11 +137,11 @@ class ActiveField extends \yii\widgets\ActiveField */ public $inlineRadioListTemplate = "{label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint}"; /** - * @var bool whether to render the error. Default is `true` except for layout `inline`. + * @var boolean whether to render the error. Default is `true` except for layout `inline`. */ public $enableError = true; /** - * @var bool whether to render the label. Default is `true`. + * @var boolean whether to render the label. Default is `true`. */ public $enableLabel = true; @@ -303,7 +303,7 @@ class ActiveField extends \yii\widgets\ActiveField } /** - * @param bool $value whether to render a inline list + * @param boolean $value whether to render a inline list * @return static the field object itself * Make sure you call this method before [[checkboxList()]] or [[radioList()]] to have any effect. */ diff --git a/framework/base/Security.php b/framework/base/Security.php index 7061a90..6fa5939 100644 --- a/framework/base/Security.php +++ b/framework/base/Security.php @@ -176,7 +176,7 @@ class Security extends Component /** * Encrypts data. * @param string $data data to be encrypted - * @param bool $passwordBased set true to use password-based key derivation + * @param boolean $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. @@ -217,7 +217,7 @@ class Security extends Component /** * Decrypts data. * @param string $data encrypted data to be decrypted. - * @param bool $passwordBased set true to use password-based key derivation + * @param boolean $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 bool|string the decrypted data or false on authentication failure @@ -290,7 +290,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 int $length length of the output key in bytes. If 0, the output key is + * @param integer $length length of the output key in bytes. If 0, the output key is * the length of the hash algorithm output. * @throws InvalidParamException * @return string the derived key @@ -335,9 +335,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 int $iterations the number of iterations of the hash algorithm. Set as high as + * @param integer $iterations the number of iterations of the hash algorithm. Set as high as * possible to hinder dictionary password attacks. - * @param int $length length of the output key in bytes. If 0, the output key is + * @param integer $length length of the output key in bytes. If 0, the output key is * the length of the hash algorithm output. * @throws InvalidParamException * @return string the derived key diff --git a/framework/console/controllers/AssetController.php b/framework/console/controllers/AssetController.php index 95a43ae..fb1dc78 100644 --- a/framework/console/controllers/AssetController.php +++ b/framework/console/controllers/AssetController.php @@ -601,7 +601,7 @@ EOD; /** * Creates template of configuration file for [[actionCompress]]. * @param string $configFile output file name. - * @return int CLI exit code + * @return integer CLI exit code * @throws \yii\console\Exception on failure. */ public function actionTemplate($configFile) diff --git a/framework/console/controllers/BaseMigrateController.php b/framework/console/controllers/BaseMigrateController.php index 7cf8e3a..bf49f01 100644 --- a/framework/console/controllers/BaseMigrateController.php +++ b/framework/console/controllers/BaseMigrateController.php @@ -302,7 +302,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 int CLI exit code + * @return integer CLI exit code * @throws Exception if the version argument is invalid or the version cannot be found. */ public function actionMark($version) @@ -562,7 +562,7 @@ abstract class BaseMigrateController extends Controller /** * Migrates to the certain version. * @param string $version name in the full format. - * @return int CLI exit code + * @return integer CLI exit code * @throws Exception if the provided version cannot be found. */ protected function migrateToVersion($version) diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php index 27cf47e..15a2b4a 100644 --- a/framework/console/controllers/FixtureController.php +++ b/framework/console/controllers/FixtureController.php @@ -55,7 +55,7 @@ class FixtureController extends Controller */ public $namespace = 'tests\unit\fixtures'; /** - * @var bool whether to append new fixture data to the existing ones. + * @var boolean whether to append new fixture data to the existing ones. * Defaults to false, meaning if there is any existing fixture data, it will be removed. */ public $append = false; diff --git a/framework/console/controllers/MessageController.php b/framework/console/controllers/MessageController.php index e5ab688..8c52010 100644 --- a/framework/console/controllers/MessageController.php +++ b/framework/console/controllers/MessageController.php @@ -50,7 +50,7 @@ class MessageController extends Controller * you may use this configuration file with the "extract" command. * * @param string $filePath output file name or alias. - * @return int CLI exit code + * @return integer CLI exit code * @throws Exception on failure. */ public function actionConfig($filePath) diff --git a/framework/grid/CheckboxColumn.php b/framework/grid/CheckboxColumn.php index 7be244d..32e8f7b 100644 --- a/framework/grid/CheckboxColumn.php +++ b/framework/grid/CheckboxColumn.php @@ -50,7 +50,7 @@ class CheckboxColumn extends Column */ public $checkboxOptions = []; /** - * @var bool whether it is possible to select multiple rows. Defaults to `true`. + * @var boolean whether it is possible to select multiple rows. Defaults to `true`. */ public $multiple = true; diff --git a/framework/helpers/BaseConsole.php b/framework/helpers/BaseConsole.php index 2b78fe0..dc65a0a 100644 --- a/framework/helpers/BaseConsole.php +++ b/framework/helpers/BaseConsole.php @@ -332,7 +332,7 @@ class BaseConsole /** * Returns the length of the string without ANSI color codes. * @param string $string the string to measure - * @return int the length of the string not counting ANSI format characters + * @return integer the length of the string not counting ANSI format characters */ public static function ansiStrlen($string) { return mb_strlen(static::stripAnsiFormat($string)); diff --git a/framework/web/UrlRule.php b/framework/web/UrlRule.php index b195319..8979803 100644 --- a/framework/web/UrlRule.php +++ b/framework/web/UrlRule.php @@ -84,7 +84,7 @@ class UrlRule extends Object implements UrlRuleInterface */ public $mode; /** - * @var bool a value indicating if parameters should be url encoded. + * @var boolean a value indicating if parameters should be url encoded. */ public $encodeParams = true; diff --git a/tests/unit/data/ar/Type.php b/tests/unit/data/ar/Type.php index a0ae65b..7922ba5 100644 --- a/tests/unit/data/ar/Type.php +++ b/tests/unit/data/ar/Type.php @@ -5,9 +5,9 @@ namespace yiiunit\data\ar; /** * Model representing type table * - * @property int $int_col - * @property int $int_col2 DEFAULT 1 - * @property int $smallint_col DEFAULT 1 + * @property integer $int_col + * @property integer $int_col2 DEFAULT 1 + * @property integer $smallint_col DEFAULT 1 * @property string $char_col * @property string $char_col2 DEFAULT 'something' * @property string $char_col3 diff --git a/tests/unit/framework/base/SecurityTest.php b/tests/unit/framework/base/SecurityTest.php index a807c8e..2596277 100644 --- a/tests/unit/framework/base/SecurityTest.php +++ b/tests/unit/framework/base/SecurityTest.php @@ -215,8 +215,8 @@ class SecurityTest extends TestCase * @param string $hash * @param string $password * @param string $salt - * @param int $iterations - * @param int $length + * @param integer $iterations + * @param integer $length * @param string $okm */ public function testPbkdf2($hash, $password, $salt, $iterations, $length, $okm) @@ -303,7 +303,7 @@ class SecurityTest extends TestCase * @param string $ikm * @param string $salt * @param string $info - * @param int $l + * @param integer $l * @param string $prk * @param string $okm */ diff --git a/tests/unit/framework/caching/CacheTestCase.php b/tests/unit/framework/caching/CacheTestCase.php index f31d600..4d976c4 100644 --- a/tests/unit/framework/caching/CacheTestCase.php +++ b/tests/unit/framework/caching/CacheTestCase.php @@ -13,7 +13,7 @@ function time() /** * Mock for the microtime() function for caching classes - * @param bool $float + * @param boolean $float * @return float */ function microtime($float = false)