diff --git a/src/Config.php b/src/Config.php index 22b2049210..e6d887db43 100644 --- a/src/Config.php +++ b/src/Config.php @@ -1540,9 +1540,9 @@ public static function getExecutablePath($name) * @param string|null $value The value to set. If null, the config * entry is deleted, reverting it to the * default value. - * @param boolean $temp Set this config data temporarily for this - * script run. This will not write the config - * data to the config file. + * @param bool $temp Set this config data temporarily for this + * script run. This will not write the + * config data to the config file. * * @return bool * @see getConfigData() diff --git a/src/Files/File.php b/src/Files/File.php index a14bd0bdd8..53d0a079f3 100644 --- a/src/Files/File.php +++ b/src/Files/File.php @@ -643,15 +643,16 @@ public function cleanUp() /** * Records an error against a specific token in the file. * - * @param string $error The error message. - * @param int $stackPtr The stack position where the error occurred. - * @param string $code A violation code unique to the sniff message. - * @param array $data Replacements for the error message. - * @param int $severity The severity level for this error. A value of 0 - * will be converted into the default severity level. - * @param boolean $fixable Can the error be fixed by the sniff? + * @param string $error The error message. + * @param int $stackPtr The stack position where the error occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the error message. + * @param int $severity The severity level for this error. A value of 0 + * will be converted into the default severity + * level. + * @param bool $fixable Can the error be fixed by the sniff? * - * @return boolean + * @return bool */ public function addError( $error, @@ -677,15 +678,16 @@ public function addError( /** * Records a warning against a specific token in the file. * - * @param string $warning The error message. - * @param int $stackPtr The stack position where the error occurred. - * @param string $code A violation code unique to the sniff message. - * @param array $data Replacements for the warning message. - * @param int $severity The severity level for this warning. A value of 0 - * will be converted into the default severity level. - * @param boolean $fixable Can the warning be fixed by the sniff? + * @param string $warning The error message. + * @param int $stackPtr The stack position where the error occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the warning message. + * @param int $severity The severity level for this warning. A value of 0 + * will be converted into the default severity + * level. + * @param bool $fixable Can the warning be fixed by the sniff? * - * @return boolean + * @return bool */ public function addWarning( $warning, @@ -718,7 +720,7 @@ public function addWarning( * @param int $severity The severity level for this error. A value of 0 * will be converted into the default severity level. * - * @return boolean + * @return bool */ public function addErrorOnLine( $error, @@ -742,7 +744,7 @@ public function addErrorOnLine( * @param int $severity The severity level for this warning. A value of 0 will * will be converted into the default severity level. * - * @return boolean + * @return bool */ public function addWarningOnLine( $warning, @@ -768,7 +770,7 @@ public function addWarningOnLine( * @param int $severity The severity level for this error. A value of 0 * will be converted into the default severity level. * - * @return boolean + * @return bool */ public function addFixableError( $error, @@ -799,7 +801,7 @@ public function addFixableError( * @param int $severity The severity level for this warning. A value of 0 * will be converted into the default severity level. * - * @return boolean + * @return bool */ public function addFixableWarning( $warning, @@ -821,17 +823,18 @@ public function addFixableWarning( /** * Adds an error to the error stack. * - * @param boolean $error Is this an error message? - * @param string $message The text of the message. - * @param int $line The line on which the message occurred. - * @param int $column The column at which the message occurred. - * @param string $code A violation code unique to the sniff message. - * @param array $data Replacements for the message. - * @param int $severity The severity level for this message. A value of 0 - * will be converted into the default severity level. - * @param boolean $fixable Can the problem be fixed by the sniff? + * @param bool $error Is this an error message? + * @param string $message The text of the message. + * @param int $line The line on which the message occurred. + * @param int $column The column at which the message occurred. + * @param string $code A violation code unique to the sniff message. + * @param array $data Replacements for the message. + * @param int $severity The severity level for this message. A value of 0 + * will be converted into the default severity + * level. + * @param bool $fixable Can the problem be fixed by the sniff? * - * @return boolean + * @return bool */ protected function addMessage($error, $message, $line, $column, $code, $data, $severity, $fixable) { @@ -1093,7 +1096,7 @@ protected function addMessage($error, $message, $line, $column, $code, $data, $s * @param string $metric The name of the metric being recorded. * @param string $value The value of the metric being recorded. * - * @return boolean + * @return bool */ public function recordMetric($stackPtr, $metric, $value) { @@ -1965,7 +1968,7 @@ public function getClassProperties($stackPtr) * * @param int $stackPtr The position of the T_BITWISE_AND token. * - * @return boolean + * @return bool */ public function isReference($stackPtr) { @@ -2497,7 +2500,7 @@ public function findFirstOnLine($types, $start, $exclude=false, $value=null) * @param int $stackPtr The position of the token we are checking. * @param int|string|array $types The type(s) of tokens to search for. * - * @return boolean + * @return bool */ public function hasCondition($stackPtr, $types) { diff --git a/src/Files/FileList.php b/src/Files/FileList.php index e889fc3d7e..c2d31e70b3 100644 --- a/src/Files/FileList.php +++ b/src/Files/FileList.php @@ -220,7 +220,7 @@ public function next() /** * Checks if current position is valid. * - * @return boolean + * @return bool */ public function valid() { @@ -236,7 +236,7 @@ public function valid() /** * Return the number of files in the list. * - * @return integer + * @return int */ public function count() { diff --git a/src/Fixer.php b/src/Fixer.php index 1e1f2561d4..a47baaf7d0 100644 --- a/src/Fixer.php +++ b/src/Fixer.php @@ -135,7 +135,7 @@ public function startFile(File $phpcsFile) /** * Attempt to fix the file by processing it until no fixes are made. * - * @return boolean + * @return bool */ public function fixFile() { @@ -217,10 +217,10 @@ public function fixFile() /** * Generates a text diff of the original file and the new content. * - * @param string $filePath Optional file path to diff the file against. - * If not specified, the original version of the - * file will be used. - * @param boolean $colors Print coloured output or not. + * @param string $filePath Optional file path to diff the file against. + * If not specified, the original version of + * the file will be used. + * @param bool $colors Print coloured output or not. * * @return string */ @@ -374,7 +374,7 @@ public function beginChangeset() /** * Stop recording actions for a changeset, and apply logged changes. * - * @return boolean + * @return bool */ public function endChangeset() { diff --git a/src/Reports/Cbf.php b/src/Reports/Cbf.php index 25249e858d..bed894314a 100644 --- a/src/Reports/Cbf.php +++ b/src/Reports/Cbf.php @@ -28,10 +28,10 @@ class Cbf implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool * @throws \PHP_CodeSniffer\Exceptions\DeepExitException diff --git a/src/Reports/Checkstyle.php b/src/Reports/Checkstyle.php index 06a78e19fa..313e086710 100644 --- a/src/Reports/Checkstyle.php +++ b/src/Reports/Checkstyle.php @@ -23,10 +23,10 @@ class Checkstyle implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Code.php b/src/Reports/Code.php index c54c1e1a4e..de396001cb 100644 --- a/src/Reports/Code.php +++ b/src/Reports/Code.php @@ -23,10 +23,10 @@ class Code implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Csv.php b/src/Reports/Csv.php index 6db7ecfc18..1f02edbd85 100644 --- a/src/Reports/Csv.php +++ b/src/Reports/Csv.php @@ -22,10 +22,10 @@ class Csv implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Diff.php b/src/Reports/Diff.php index ce4b31fc08..68af0a0261 100644 --- a/src/Reports/Diff.php +++ b/src/Reports/Diff.php @@ -22,10 +22,10 @@ class Diff implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Emacs.php b/src/Reports/Emacs.php index 3555f55418..cae9d22d85 100644 --- a/src/Reports/Emacs.php +++ b/src/Reports/Emacs.php @@ -22,10 +22,10 @@ class Emacs implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Full.php b/src/Reports/Full.php index 084bc8aa58..5f6bcde80a 100644 --- a/src/Reports/Full.php +++ b/src/Reports/Full.php @@ -23,10 +23,10 @@ class Full implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Info.php b/src/Reports/Info.php index 3181bcc546..fa0698efdf 100644 --- a/src/Reports/Info.php +++ b/src/Reports/Info.php @@ -23,10 +23,10 @@ class Info implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Json.php b/src/Reports/Json.php index 59d8f305e5..f7aedb30a5 100644 --- a/src/Reports/Json.php +++ b/src/Reports/Json.php @@ -23,10 +23,10 @@ class Json implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Junit.php b/src/Reports/Junit.php index d3ede61d47..0b59604ae0 100644 --- a/src/Reports/Junit.php +++ b/src/Reports/Junit.php @@ -24,10 +24,10 @@ class Junit implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Notifysend.php b/src/Reports/Notifysend.php index 0841662234..71aed108ed 100644 --- a/src/Reports/Notifysend.php +++ b/src/Reports/Notifysend.php @@ -88,10 +88,10 @@ public function __construct() * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Report.php b/src/Reports/Report.php index 38f8a6298c..fd60185e94 100644 --- a/src/Reports/Report.php +++ b/src/Reports/Report.php @@ -22,10 +22,10 @@ interface Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Source.php b/src/Reports/Source.php index ce8c3cfec1..44f0d8748e 100644 --- a/src/Reports/Source.php +++ b/src/Reports/Source.php @@ -23,10 +23,10 @@ class Source implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Summary.php b/src/Reports/Summary.php index 8fe18e7640..cd5ca69476 100644 --- a/src/Reports/Summary.php +++ b/src/Reports/Summary.php @@ -23,10 +23,10 @@ class Summary implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/VersionControl.php b/src/Reports/VersionControl.php index 0f414567dc..e8e399a7dd 100644 --- a/src/Reports/VersionControl.php +++ b/src/Reports/VersionControl.php @@ -31,10 +31,10 @@ abstract class VersionControl implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Reports/Xml.php b/src/Reports/Xml.php index 066383debe..c748dca726 100644 --- a/src/Reports/Xml.php +++ b/src/Reports/Xml.php @@ -23,10 +23,10 @@ class Xml implements Report * and FALSE if it ignored the file. Returning TRUE indicates that the file and * its data should be counted in the grand totals. * - * @param array $report Prepared report data. - * @param \PHP_CodeSniffer\File $phpcsFile The file being reported on. - * @param bool $showSources Show sources? - * @param int $width Maximum allowed line width. + * @param array $report Prepared report data. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being reported on. + * @param bool $showSources Show sources? + * @param int $width Maximum allowed line width. * * @return bool */ diff --git a/src/Sniffs/AbstractArraySniff.php b/src/Sniffs/AbstractArraySniff.php index 141b9a133c..efe9969d8d 100644 --- a/src/Sniffs/AbstractArraySniff.php +++ b/src/Sniffs/AbstractArraySniff.php @@ -104,9 +104,9 @@ public function process(File $phpcsFile, $stackPtr) /** * Find next separator in array - either: comma or double arrow. * - * @param File $phpcsFile The current file being checked. - * @param int $ptr The position of current token. - * @param int $arrayEnd The token that ends the array definition. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being checked. + * @param int $ptr The position of current token. + * @param int $arrayEnd The token that ends the array definition. * * @return int */ diff --git a/src/Sniffs/AbstractPatternSniff.php b/src/Sniffs/AbstractPatternSniff.php index 66bc2f5247..88194cca83 100644 --- a/src/Sniffs/AbstractPatternSniff.php +++ b/src/Sniffs/AbstractPatternSniff.php @@ -58,7 +58,7 @@ abstract class AbstractPatternSniff implements Sniff /** * Constructs a AbstractPatternSniff. * - * @param boolean $ignoreComments If true, comments will be ignored. + * @param bool $ignoreComments If true, comments will be ignored. */ public function __construct($ignoreComments=null) { diff --git a/src/Sniffs/AbstractScopeSniff.php b/src/Sniffs/AbstractScopeSniff.php index 70d8720a1e..0ab66c59ae 100644 --- a/src/Sniffs/AbstractScopeSniff.php +++ b/src/Sniffs/AbstractScopeSniff.php @@ -57,13 +57,13 @@ abstract class AbstractScopeSniff implements Sniff /** * Constructs a new AbstractScopeTest. * - * @param array $scopeTokens The type of scope the test wishes to listen to. - * @param array $tokens The tokens that the test wishes to listen to - * within the scope. - * @param boolean $listenOutside If true this test will also alert the - * extending class when a token is found outside - * the scope, by calling the - * processTokenOutsideScope method. + * @param array $scopeTokens The type of scope the test wishes to listen to. + * @param array $tokens The tokens that the test wishes to listen to + * within the scope. + * @param bool $listenOutside If true this test will also alert the + * extending class when a token is found + * outside the scope, by calling the + * processTokenOutsideScope method. * * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified tokens arrays are empty * or invalid. diff --git a/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php b/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php index 364658db65..be30e465e2 100644 --- a/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php +++ b/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php @@ -100,8 +100,8 @@ public function process(File $phpcsFile, $stackPtr) /** * Get all used variables in the incrementer part of a for statement. * - * @param array(integer=>array) $tokens Array with all code sniffer tokens. - * @param array(string=>mixed) $token Current for loop token + * @param array $tokens Array with all code sniffer tokens. + * @param array $token Current for loop token * * @return string[] List of all found incrementer variables. */ diff --git a/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php b/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php index d5c7ddb724..40d51271e5 100644 --- a/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php +++ b/src/Standards/Generic/Sniffs/PHP/DisallowRequestSuperglobalSniff.php @@ -31,8 +31,8 @@ public function register() /** * Processes this sniff, when one of its tokens is encountered. * - * @param File $phpcsFile The file being scanned. - * @param int $stackPtr The position of the current token in the stack passed in $tokens. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the current token in the stack passed in $tokens. * * @return void */ diff --git a/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php b/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php index 8bbd91e828..d2a95c7322 100644 --- a/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php +++ b/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php @@ -55,8 +55,8 @@ public function __construct() * Processes the function tokens within the class. * * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found. - * @param integer $stackPtr The position where the token was found. - * @param integer $currScope The current scope opener token. + * @param int $stackPtr The position where the token was found. + * @param int $currScope The current scope opener token. * * @return void */ diff --git a/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php b/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php index 311cf684fd..8314ffe7e4 100644 --- a/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php +++ b/src/Standards/MySource/Sniffs/Strings/JoinStringsSniff.php @@ -40,7 +40,7 @@ public function register() * Processes this test, when one of its tokens is encountered. * * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. - * @param integer $stackPtr The position of the current token + * @param int $stackPtr The position of the current token * in the stack passed in $tokens. * * @return void diff --git a/src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php b/src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php index a5b07a9e47..137069d6b4 100644 --- a/src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php +++ b/src/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php @@ -36,7 +36,7 @@ public function register() * Processes this test, when one of its tokens is encountered. * * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. - * @param integer $stackPtr The position of the current token in the + * @param int $stackPtr The position of the current token in the * stack passed in $tokens. * * @return void diff --git a/src/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php b/src/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php index ac6407d6f1..fc468b49ab 100644 --- a/src/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php +++ b/src/Standards/PSR1/Sniffs/Classes/ClassDeclarationSniff.php @@ -36,7 +36,7 @@ public function register() * Processes this test, when one of its tokens is encountered. * * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. - * @param integer $stackPtr The position of the current token in + * @param int $stackPtr The position of the current token in * the token stack. * * @return void diff --git a/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php b/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php index a5403337a0..41f2c85d17 100644 --- a/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php +++ b/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php @@ -728,7 +728,7 @@ protected function checkSpacingAfterParamName(File $phpcsFile, $param, $maxVar, * in the stack passed in $tokens. * @param int $commentStart The position in the stack where the comment started. * - * @return boolean TRUE if the docblock contains only {@inheritdoc} (case-insensitive). + * @return bool TRUE if the docblock contains only {@inheritdoc} (case-insensitive). */ protected function checkInheritdoc(File $phpcsFile, $stackPtr, $commentStart) { diff --git a/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php b/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php index 0bafbf4db4..6f2990b09c 100644 --- a/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php +++ b/src/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php @@ -76,9 +76,9 @@ public function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) /** * Check for $this variable usage between $next and $end tokens. * - * @param File $phpcsFile The current file being scanned. - * @param int $next The position of the next token to check. - * @param int $end The position of the last token to check. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned. + * @param int $next The position of the next token to check. + * @param int $end The position of the last token to check. * * @return void */ diff --git a/src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php b/src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php index cc5db16446..681faf379d 100644 --- a/src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php +++ b/src/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php @@ -95,7 +95,7 @@ public function process(File $phpcsFile, $stackPtr) * @param mixed $before The number of spaces found before the * operator or the string 'newline'. * - * @return boolean true if there was no error, false otherwise. + * @return bool true if there was no error, false otherwise. */ protected function checkSpacingBeforeOperator(File $phpcsFile, $stackPtr, $before) { @@ -134,7 +134,7 @@ protected function checkSpacingBeforeOperator(File $phpcsFile, $stackPtr, $befor * @param mixed $after The number of spaces found after the * operator or the string 'newline'. * - * @return boolean true if there was no error, false otherwise. + * @return bool true if there was no error, false otherwise. */ protected function checkSpacingAfterOperator(File $phpcsFile, $stackPtr, $after) { diff --git a/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php b/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php index 2627d10d98..0f895fefd6 100644 --- a/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php +++ b/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php @@ -320,7 +320,7 @@ public function process(File $phpcsFile, $stackPtr) * @param int $stackPtr The position of the operator in * the stack. * - * @return boolean + * @return bool */ protected function isOperator(File $phpcsFile, $stackPtr) { diff --git a/src/Tokenizers/Tokenizer.php b/src/Tokenizers/Tokenizer.php index ac9aa20254..0a23b22d52 100644 --- a/src/Tokenizers/Tokenizer.php +++ b/src/Tokenizers/Tokenizer.php @@ -111,7 +111,7 @@ public function __construct($content, $config, $eolChar='\n') * @param string $content The content to tokenize. * @param string $eolChar The EOL char used in the content. * - * @return boolean + * @return bool */ protected function isMinifiedContent($content, $eolChar='\n') { diff --git a/src/Util/Common.php b/src/Util/Common.php index e60eec1df2..3088c89fcc 100644 --- a/src/Util/Common.php +++ b/src/Util/Common.php @@ -56,7 +56,7 @@ public static function isPharFile($path) * * @param string $path The path to the file. * - * @return boolean + * @return bool */ public static function isReadable($path) { @@ -183,7 +183,7 @@ public static function detectLineEndings($contents) /** * Check if STDIN is a TTY. * - * @return boolean + * @return bool */ public static function isStdinATTY() { @@ -313,22 +313,22 @@ public static function prepareForOutput($content, $exclude=[]) /** * Returns true if the specified string is in the camel caps format. * - * @param string $string The string the verify. - * @param boolean $classFormat If true, check to see if the string is in the - * class format. Class format strings must start - * with a capital letter and contain no - * underscores. - * @param boolean $public If true, the first character in the string - * must be an a-z character. If false, the - * character must be an underscore. This - * argument is only applicable if $classFormat - * is false. - * @param boolean $strict If true, the string must not have two capital - * letters next to each other. If false, a - * relaxed camel caps policy is used to allow - * for acronyms. + * @param string $string The string the verify. + * @param bool $classFormat If true, check to see if the string is in the + * class format. Class format strings must start + * with a capital letter and contain no + * underscores. + * @param bool $public If true, the first character in the string + * must be an a-z character. If false, the + * character must be an underscore. This + * argument is only applicable if + * $classFormat is false. + * @param bool $strict If true, the string must not have two capital + * letters next to each other. If false, a + * relaxed camel caps policy is used to allow + * for acronyms. * - * @return boolean + * @return bool */ public static function isCamelCaps( $string, @@ -400,7 +400,7 @@ public static function isCamelCaps( * * @param string $string The string to verify. * - * @return boolean + * @return bool */ public static function isUnderscoreName($string) { diff --git a/src/Util/Standards.php b/src/Util/Standards.php index 50f58f0294..403aa690d7 100644 --- a/src/Util/Standards.php +++ b/src/Util/Standards.php @@ -65,12 +65,12 @@ public static function getInstalledStandardPaths() * use getInstalledStandardPaths() instead as it performs less work to * retrieve coding standard names. * - * @param boolean $includeGeneric If true, the special "Generic" - * coding standard will be included - * if installed. - * @param string $standardsDir A specific directory to look for standards - * in. If not specified, PHP_CodeSniffer will - * look in its default locations. + * @param bool $includeGeneric If true, the special "Generic" + * coding standard will be + * included if installed. + * @param string $standardsDir A specific directory to look for standards + * in. If not specified, PHP_CodeSniffer will + * look in its default locations. * * @return array * @see getInstalledStandardPaths() @@ -154,12 +154,12 @@ public static function getInstalledStandardDetails( * CodeSniffer/Standards directory. Valid coding standards * include a Sniffs subdirectory. * - * @param boolean $includeGeneric If true, the special "Generic" - * coding standard will be included - * if installed. - * @param string $standardsDir A specific directory to look for standards - * in. If not specified, PHP_CodeSniffer will - * look in its default locations. + * @param bool $includeGeneric If true, the special "Generic" + * coding standard will be + * included if installed. + * @param string $standardsDir A specific directory to look for standards + * in. If not specified, PHP_CodeSniffer will + * look in its default locations. * * @return array * @see isInstalledStandard() @@ -222,7 +222,7 @@ public static function getInstalledStandards( * * @param string $standard The name of the coding standard. * - * @return boolean + * @return bool * @see getInstalledStandards() */ public static function isInstalledStandard($standard) diff --git a/src/Util/Timing.php b/src/Util/Timing.php index cf27dcfe36..6ce7da527e 100644 --- a/src/Util/Timing.php +++ b/src/Util/Timing.php @@ -43,8 +43,8 @@ public static function startTiming() /** * Print information about the run. * - * @param boolean $force If TRUE, prints the output even if it has - * already been printed during the run. + * @param bool $force If TRUE, prints the output even if it has + * already been printed during the run. * * @return void */