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

This commit is contained in:
Robert Korulczyk
2016-11-07 00:51:39 +01:00
committed by Alexander Makarov
parent 940f7c7cd4
commit 4aa935e69e
292 changed files with 1670 additions and 1670 deletions

View File

@ -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
*/

View File

@ -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)

View File

@ -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)
{

View File

@ -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);

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{