Commit c7e8d8b9 by Alexander Mohorev

@param, @var, @property and @return must declare types as boolean, integer, string, array or null

parent d8971b25
......@@ -132,7 +132,7 @@ class User extends ActiveRecord implements IdentityInterface
* Validates password
*
* @param string $password password to validate
* @return bool if password provided is valid for current user
* @return boolean if password provided is valid for current user
*/
public function validatePassword($password)
{
......
......@@ -76,7 +76,7 @@ class User extends \yii\base\Object implements \yii\web\IdentityInterface
* Validates password
*
* @param string $password password to validate
* @return bool if password provided is valid for current user
* @return boolean if password provided is valid for current user
*/
public function validatePassword($password)
{
......
......@@ -24,7 +24,7 @@ class PhpDocController extends Controller
public $defaultAction = 'property';
/**
* @var bool whether to update class docs directly. Setting this to false will just output docs
* @var boolean whether to update class docs directly. Setting this to false will just output docs
* for copy and paste.
*/
public $updateFiles = true;
......
......@@ -218,7 +218,7 @@ class ApiMarkdown extends GithubMarkdown
*
* @param string $content
* @param TypeDoc $context
* @param bool $paragraph
* @param boolean $paragraph
* @return string
*/
public static function process($content, $context = null, $paragraph = false)
......
......@@ -70,7 +70,7 @@ class NavBar extends Widget
*/
public $screenReaderToggleText = 'Toggle navigation';
/**
* @var bool whether the navbar content should be included in an inner div container which by default
* @var boolean whether the navbar content should be included in an inner div container which by default
* adds left and right padding. Set this to false for a 100% width navbar.
*/
public $renderInnerContainer = true;
......
......@@ -133,7 +133,7 @@ class Progress extends Widget
/**
* Generates a bar
* @param int $percent the percentage of the bar
* @param integer $percent the percentage of the bar
* @param string $label, optional, the label to display at the bar
* @param array $options the HTML attributes of the bar
* @return string the rendering result.
......
......@@ -364,7 +364,7 @@ class Command extends Component
* @param $pattern
* @param $settings
* @param $mappings
* @param int $order
* @param integer $order
* @return mixed
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html
*/
......
......@@ -29,7 +29,7 @@ class Connection extends Component
const EVENT_AFTER_OPEN = 'afterOpen';
/**
* @var bool whether to autodetect available cluster nodes on [[open()]]
* @var boolean whether to autodetect available cluster nodes on [[open()]]
*/
public $autodetectCluster = true;
/**
......
......@@ -45,7 +45,7 @@ class Connection extends Component
*/
public $hostname = 'localhost';
/**
* @var int the port to use for connecting to the redis server. Default port is 6379.
* @var integer the port to use for connecting to the redis server. Default port is 6379.
*/
public $port = 6379;
/**
......@@ -54,7 +54,7 @@ class Connection extends Component
*/
public $password;
/**
* @var int the redis database to use. This is an integer value starting from 0. Defaults to 0.
* @var integer the redis database to use. This is an integer value starting from 0. Defaults to 0.
*/
public $database = 0;
/**
......
......@@ -338,7 +338,7 @@ class Query extends Component implements QueryInterface
/**
* Sets the value indicating whether to SELECT DISTINCT or not.
* @param bool $value whether to SELECT DISTINCT or not.
* @param boolean $value whether to SELECT DISTINCT or not.
* @return static the query object itself
*/
public function distinct($value = true)
......
......@@ -66,7 +66,7 @@ class ErrorException extends Exception
* Returns if error is one of fatal type.
*
* @param array $error error got from error_get_last()
* @return bool if error is one of fatal type
* @return boolean if error is one of fatal type
*/
public static function isFatalError($error)
{
......@@ -76,7 +76,7 @@ class ErrorException extends Exception
/**
* Gets the exception severity.
* @link http://php.net/manual/en/errorexception.getseverity.php
* @return int the severity level of the exception.
* @return integer the severity level of the exception.
*/
final public function getSeverity()
{
......
......@@ -408,7 +408,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
/**
* Check whether the named relation has been populated with records.
* @param string $name the relation name (case-sensitive)
* @return bool whether relation has been populated with records.
* @return boolean whether relation has been populated with records.
*/
public function isRelationPopulated($name)
{
......
......@@ -396,7 +396,7 @@ class Query extends Component implements QueryInterface
/**
* Sets the value indicating whether to SELECT DISTINCT or not.
* @param bool $value whether to SELECT DISTINCT or not.
* @param boolean $value whether to SELECT DISTINCT or not.
* @return static the query object itself
*/
public function distinct($value = true)
......@@ -754,7 +754,7 @@ class Query extends Component implements QueryInterface
/**
* Appends a SQL statement using UNION operator.
* @param string|Query $sql the SQL statement to be appended using UNION
* @param bool $all TRUE if using UNION ALL and FALSE if using UNION
* @param boolean $all TRUE if using UNION ALL and FALSE if using UNION
* @return static the query object itself
*/
public function union($sql, $all = false)
......
......@@ -123,7 +123,7 @@ class BaseConsole
/**
* Scrolls whole page up by sending ANSI control code SU to the terminal.
* New lines are added at the bottom. This is not supported by ANSI.SYS used in windows.
* @param int $lines number of lines to scroll up
* @param integer $lines number of lines to scroll up
*/
public static function scrollUp($lines = 1)
{
......@@ -133,7 +133,7 @@ class BaseConsole
/**
* Scrolls whole page down by sending ANSI control code SD to the terminal.
* New lines are added at the top. This is not supported by ANSI.SYS used in windows.
* @param int $lines number of lines to scroll down
* @param integer $lines number of lines to scroll down
*/
public static function scrollDown($lines = 1)
{
......@@ -474,7 +474,7 @@ class BaseConsole
* colorcodes will just be removed (And %% will be transformed into %)
*
* @param string $string String to convert
* @param bool $colored Should the string be colored?
* @param boolean $colored Should the string be colored?
* @return string
*/
// TODO rework/refactor according to https://github.com/yiisoft/yii2/issues/746
......@@ -554,7 +554,7 @@ class BaseConsole
* - not tty consoles
*
* @param mixed $stream
* @return bool true if the stream supports ANSI colors, otherwise false.
* @return boolean true if the stream supports ANSI colors, otherwise false.
*/
public static function streamSupportsAnsiColors($stream)
{
......@@ -575,7 +575,7 @@ class BaseConsole
/**
* Usage: list($width, $height) = ConsoleHelper::getScreenSize();
*
* @param bool $refresh whether to force checking and not re-use cached size value.
* @param boolean $refresh whether to force checking and not re-use cached size value.
* This is useful to detect changing window size while the application is running but may
* not get up to date values on every terminal.
* @return array|boolean An array of ($width, $height) or false when it was not able to determine size.
......@@ -617,7 +617,7 @@ class BaseConsole
/**
* Gets input from STDIN and returns a string right-trimmed for EOLs.
*
* @param bool $raw If set to true, returns the raw string without trimming
* @param boolean $raw If set to true, returns the raw string without trimming
* @return string the string read from stdin
*/
public static function stdin($raw = false)
......@@ -898,7 +898,7 @@ class BaseConsole
* @param string|boolean $remove This can be `false` to leave the progress bar on screen and just print a newline.
* If set to `true`, the line of the progress bar will be cleared. This may also be a string to be displayed instead
* of the progress bar.
* @param bool $keepPrefix whether to keep the prefix that has been specified for the progressbar when progressbar
* @param boolean $keepPrefix whether to keep the prefix that has been specified for the progressbar when progressbar
* gets removed. Defaults to true.
* @see startProgress
* @see updateProgress
......
......@@ -332,7 +332,7 @@ class BaseInflector
* Converts an underscored or CamelCase word into a English
* sentence.
* @param string $words
* @param bool $ucAll whether to set all words to uppercase
* @param boolean $ucAll whether to set all words to uppercase
* @return string
*/
public static function titleize($words, $ucAll = false)
......@@ -415,7 +415,7 @@ class BaseInflector
/**
* Returns a human-readable string from $word
* @param string $word the string to humanize
* @param bool $ucAll whether to set all words to uppercase or not
* @param boolean $ucAll whether to set all words to uppercase or not
* @return string
*/
public static function humanize($word, $ucAll = false)
......@@ -455,7 +455,7 @@ class BaseInflector
* [[$transliteration]] array.
* @param string $string An arbitrary string to convert
* @param string $replacement The replacement to use for spaces
* @param bool $lowercase whether to return the string in lowercase or not. Defaults to `true`.
* @param boolean $lowercase whether to return the string in lowercase or not. Defaults to `true`.
* @return string The converted string.
*/
public static function slug($string, $replacement = '-', $lowercase = true)
......@@ -484,7 +484,7 @@ class BaseInflector
/**
* Converts number to its ordinal English form. For example, converts 13 to 13th, 2 to 2nd ...
* @param int $number the number to get its ordinal value
* @param integer $number the number to get its ordinal value
* @return string
*/
public static function ordinalize($number)
......
......@@ -259,7 +259,7 @@ class MessageFormatter extends Component
/**
* Tokenizes a pattern by separating normal text from replaceable patterns
* @param string $pattern patter to tokenize
* @return array|bool array of tokens or false on failure
* @return array|boolean array of tokens or false on failure
*/
private static function tokenizePattern($pattern)
{
......
......@@ -320,7 +320,7 @@ class YiiRequirementChecker
/**
* Normalizes requirement ensuring it has correct format.
* @param array $requirement raw requirement.
* @param int $requirementKey requirement key in the list.
* @param integer $requirementKey requirement key in the list.
* @return array normalized requirement.
*/
function normalizeRequirement($requirement, $requirementKey = 0)
......
......@@ -64,7 +64,7 @@ class AssetConverter extends Component implements AssetConverterInterface
* @param string $basePath asset base path and command working directory
* @param string $asset the name of the asset file
* @param string $result the name of the file to be generated by the converter command
* @return bool true on success, false on failure. Failures will be logged.
* @return boolean true on success, false on failure. Failures will be logged.
* @throws \yii\base\Exception when the command fails and YII_DEBUG is true.
* In production mode the error will be logged.
*/
......
......@@ -90,7 +90,7 @@ class LinkPager extends Widget
*/
public $lastPageLabel;
/**
* @var bool whether to register link tags in the HTML header for prev, next, first and last page.
* @var boolean whether to register link tags in the HTML header for prev, next, first and last page.
* Defaults to `false` to avoid conflicts when multiple pagers are used on one page.
* @see http://www.w3.org/TR/html401/struct/links.html#h-12.1.2
* @see registerLinkTags()
......
......@@ -35,7 +35,7 @@ class ElasticSearchTestCase extends TestCase
}
/**
* @param bool $reset whether to clean up the test database
* @param boolean $reset whether to clean up the test database
* @return Connection
*/
public function getConnection($reset = true)
......
......@@ -31,7 +31,7 @@ abstract class RedisTestCase extends TestCase
}
/**
* @param bool $reset whether to clean up the test database
* @param boolean $reset whether to clean up the test database
* @return Connection
*/
public function getConnection($reset = true)
......
......@@ -82,8 +82,8 @@ class SphinxTestCase extends TestCase
}
/**
* @param bool $reset whether to clean up the test database
* @param bool $open whether to open test database
* @param boolean $reset whether to clean up the test database
* @param boolean $open whether to open test database
* @return \yii\sphinx\Connection
*/
public function getConnection($reset = false, $open = true)
......@@ -119,8 +119,8 @@ class SphinxTestCase extends TestCase
}
/**
* @param bool $reset whether to clean up the test database
* @param bool $open whether to open and populate test database
* @param boolean $reset whether to clean up the test database
* @param boolean $open whether to open and populate test database
* @return \yii\db\Connection
*/
public function getDbConnection($reset = true, $open = true)
......
......@@ -22,7 +22,7 @@ use yii\caching\Cache;
abstract class CacheTestCase extends TestCase
{
/**
* @var int virtual time to be returned by mocked time() function.
* @var integer virtual time to be returned by mocked time() function.
* Null means normal time() behavior.
*/
public static $time;
......
......@@ -34,7 +34,7 @@ class DbCacheTest extends CacheTestCase
}
/**
* @param bool $reset whether to clean up the test database
* @param boolean $reset whether to clean up the test database
* @return \yii\db\Connection
*/
public function getConnection($reset = true)
......
......@@ -35,8 +35,8 @@ abstract class DatabaseTestCase extends TestCase
}
/**
* @param bool $reset whether to clean up the test database
* @param bool $open whether to open and populate test database
* @param boolean $reset whether to clean up the test database
* @param boolean $open whether to open and populate test database
* @return \yii\db\Connection
*/
public function getConnection($reset = true, $open = true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment