From f199b60157fae206d5a905226a3fe4b65cc18d6f Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 24 Apr 2023 21:20:03 +0200 Subject: [PATCH 1/2] Docs: various textual tweaks ... picked up along the way. --- src/Files/File.php | 2 +- src/Reports/Info.php | 2 +- tests/Core/Config/ReportWidthTest.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Files/File.php b/src/Files/File.php index cc3e32f906..f0c2e747a4 100644 --- a/src/Files/File.php +++ b/src/Files/File.php @@ -755,7 +755,7 @@ public function addErrorOnLine( /** - * Records a warning against a specific token in the file. + * Records a warning against a specific line in the file. * * @param string $warning The error message. * @param int $line The line on which the warning occurred. diff --git a/src/Reports/Info.php b/src/Reports/Info.php index e263199be9..4039056169 100644 --- a/src/Reports/Info.php +++ b/src/Reports/Info.php @@ -45,7 +45,7 @@ public function generateFileReport($report, File $phpcsFile, $showSources=false, /** - * Prints the source of all errors and warnings. + * Prints the recorded metrics. * * @param string $cachedData Any partial report data that was returned from * generateFileReport during the run. diff --git a/tests/Core/Config/ReportWidthTest.php b/tests/Core/Config/ReportWidthTest.php index 65d7bb03ee..275a70cab1 100644 --- a/tests/Core/Config/ReportWidthTest.php +++ b/tests/Core/Config/ReportWidthTest.php @@ -56,7 +56,7 @@ public function resetConfig() /** * Reset the static properties in the Config class to their true defaults to prevent this class - * from unfluencing other tests. + * from influencing other tests. * * @afterClass * @@ -287,7 +287,7 @@ public function dataReportWidthInputHandling() * Helper function to set a static property on the Config class. * * @param string $name The name of the property to set. - * @param mixed $value The value to set the propert to. + * @param mixed $value The value to set the property to. * * @return void */ From 471d44f4d02f0e5b04f5f164868eefc575d7c8e2 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 28 Oct 2023 18:56:19 +0200 Subject: [PATCH 2/2] Docs: fix various incorrect type annotations Includes a number of fixes previously pulled in (closed) PR 3703. Co-authored-by: Andrew Dawes --- CHANGELOG.md | 2 ++ src/Config.php | 2 +- src/Files/FileList.php | 2 +- src/Fixer.php | 4 ++-- src/Reports/Hgblame.php | 2 +- src/Reports/Notifysend.php | 2 +- src/Ruleset.php | 2 +- src/Runner.php | 6 +++--- src/Sniffs/AbstractPatternSniff.php | 4 ++-- src/Sniffs/AbstractScopeSniff.php | 2 +- .../Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php | 2 +- .../Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php | 4 ++-- .../ControlStructures/InlineControlStructureSniff.php | 2 +- src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php | 4 ++-- src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php | 2 +- .../Functions/OpeningFunctionBraceKernighanRitchieSniff.php | 2 +- .../Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php | 2 +- .../Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php | 2 +- src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php | 2 +- src/Standards/Generic/Sniffs/PHP/SyntaxSniff.php | 2 +- .../Generic/Sniffs/VersionControl/GitMergeConflictSniff.php | 2 +- .../Sniffs/VersionControl/SubversionPropertiesSniff.php | 4 ++-- .../Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php | 2 +- .../Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php | 2 +- .../Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php | 2 +- .../Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php | 2 +- src/Standards/Generic/Tests/Debug/CSSLintUnitTest.php | 2 +- src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.php | 2 +- src/Standards/Generic/Tests/Debug/ESLintUnitTest.php | 2 +- src/Standards/Generic/Tests/Debug/JSHintUnitTest.php | 2 +- .../Generic/Tests/Files/ExecutableFileUnitTest.php | 2 +- .../Tests/VersionControl/SubversionPropertiesUnitTest.php | 2 +- .../MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php | 2 +- .../MySource/Sniffs/Channels/IncludeOwnSystemSniff.php | 2 +- .../MySource/Sniffs/Channels/IncludeSystemSniff.php | 4 ++-- src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php | 2 +- src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php | 2 +- src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php | 4 ++-- src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php | 2 +- .../Sniffs/ControlStructures/SwitchDeclarationSniff.php | 2 +- src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php | 2 +- .../PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php | 2 +- .../Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php | 2 +- .../Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php | 2 +- .../Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php | 2 +- src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php | 2 +- src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php | 2 +- .../Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php | 4 ++-- .../Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php | 2 +- .../Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php | 2 +- .../Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php | 2 +- .../Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php | 2 +- src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php | 2 +- src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php | 2 +- src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php | 2 +- src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php | 2 +- .../Squiz/Sniffs/Commenting/FunctionCommentSniff.php | 2 +- .../Squiz/Sniffs/Commenting/InlineCommentSniff.php | 2 +- .../Sniffs/Functions/MultiLineFunctionDeclarationSniff.php | 2 +- .../Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php | 2 +- .../Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php | 2 +- src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php | 2 +- src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php | 2 +- src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php | 2 +- src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php | 2 +- src/Tokenizers/JS.php | 6 +++--- src/Tokenizers/PHP.php | 2 +- src/Tokenizers/Tokenizer.php | 2 +- src/Util/Cache.php | 2 +- src/Util/Common.php | 4 ++-- 70 files changed, 84 insertions(+), 82 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 432e379a98..bb37bfa86d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -91,6 +91,8 @@ The file documents changes to the PHP_CodeSniffer project. - Thanks to Juliette Reinders Folmer (@jrfnl) for the patch - Improved README syntax highlighting - Thanks to Benjamin Loison (@Benjamin-Loison) for the patch +- Various documentation improvements + - Thanks to Andrew Dawes (@AndrewDawes) and Juliette Reinders Folmer (@jrfnl) for the patches ### Removed - Removed support for installing via PEAR diff --git a/src/Config.php b/src/Config.php index a13f966a73..55c7598f2b 100644 --- a/src/Config.php +++ b/src/Config.php @@ -27,7 +27,7 @@ * 2: ruleset and file parsing output * 3: sniff execution output * @property bool $interactive Enable interactive checking mode. - * @property bool $parallel Check files in parallel. + * @property int $parallel Check files in parallel. * @property bool $cache Enable the use of the file cache. * @property bool $cacheFile A file where the cache data should be written * @property bool $colors Display colours in output. diff --git a/src/Files/FileList.php b/src/Files/FileList.php index bf98385a35..13357ecdef 100644 --- a/src/Files/FileList.php +++ b/src/Files/FileList.php @@ -199,7 +199,7 @@ public function current() /** * Return the file path of the current file being processed. * - * @return void + * @return string|null Path name or `null` when the end of the iterator has been reached. */ #[ReturnTypeWillChange] public function key() diff --git a/src/Fixer.php b/src/Fixer.php index 2ff09576a7..b54dde94b6 100644 --- a/src/Fixer.php +++ b/src/Fixer.php @@ -70,7 +70,7 @@ class Fixer * If a token is being "fixed" back to its last value, the fix is * probably conflicting with another. * - * @var array + * @var array> */ private $oldTokenValues = []; @@ -349,7 +349,7 @@ public function getTokenContent($stackPtr) /** * Start recording actions for a changeset. * - * @return void + * @return void|false */ public function beginChangeset() { diff --git a/src/Reports/Hgblame.php b/src/Reports/Hgblame.php index 3b4bbcfa1b..2d98c46db6 100644 --- a/src/Reports/Hgblame.php +++ b/src/Reports/Hgblame.php @@ -28,7 +28,7 @@ class Hgblame extends VersionControl * * @param string $line Line to parse. * - * @return mixed string or false if impossible to recover. + * @return string|false String or FALSE if impossible to recover. */ protected function getAuthor($line) { diff --git a/src/Reports/Notifysend.php b/src/Reports/Notifysend.php index 7f5a7e4181..1c296958c2 100644 --- a/src/Reports/Notifysend.php +++ b/src/Reports/Notifysend.php @@ -154,7 +154,7 @@ public function generate( * @param int $totalErrors Total number of errors found during the run. * @param int $totalWarnings Total number of warnings found during the run. * - * @return string Error message or NULL if no error/warning found. + * @return string|null Error message or NULL if no error/warning found. */ protected function generateMessage($checkedFiles, $totalErrors, $totalWarnings) { diff --git a/src/Ruleset.php b/src/Ruleset.php index bd0527dcb5..901fb8e09b 100644 --- a/src/Ruleset.php +++ b/src/Ruleset.php @@ -47,7 +47,7 @@ class Ruleset * The key is the regular expression and the value is the type * of ignore pattern (absolute or relative). * - * @var array + * @var array */ public $ignorePatterns = []; diff --git a/src/Runner.php b/src/Runner.php index 0f57243c23..107da1816d 100644 --- a/src/Runner.php +++ b/src/Runner.php @@ -49,7 +49,7 @@ class Runner /** * Run the PHPCS script. * - * @return array + * @return int */ public function runPHPCS() { @@ -151,7 +151,7 @@ public function runPHPCS() /** * Run the PHPCBF script. * - * @return array + * @return int */ public function runPHPCBF() { @@ -595,7 +595,7 @@ private function run() * @param string $file The path of the file that raised the error. * @param int $line The line number the error was raised at. * - * @return void + * @return bool * @throws \PHP_CodeSniffer\Exceptions\RuntimeException */ public function handleErrors($code, $message, $file, $line) diff --git a/src/Sniffs/AbstractPatternSniff.php b/src/Sniffs/AbstractPatternSniff.php index 8dde80414a..d4135be057 100644 --- a/src/Sniffs/AbstractPatternSniff.php +++ b/src/Sniffs/AbstractPatternSniff.php @@ -250,7 +250,7 @@ final public function process(File $phpcsFile, $stackPtr) * @param int $stackPtr The position in the tokens stack where * the listening token type was found. * - * @return array + * @return array|false */ protected function processPattern($patternInfo, File $phpcsFile, $stackPtr) { @@ -850,7 +850,7 @@ private function parse($pattern) * Creates a skip pattern. * * @param string $pattern The pattern being parsed. - * @param string $from The token content that the skip pattern starts from. + * @param int $from The token position that the skip pattern starts from. * * @return array The pattern step. * @see createTokenPattern() diff --git a/src/Sniffs/AbstractScopeSniff.php b/src/Sniffs/AbstractScopeSniff.php index ef443d20df..ce38ba0c4b 100644 --- a/src/Sniffs/AbstractScopeSniff.php +++ b/src/Sniffs/AbstractScopeSniff.php @@ -42,7 +42,7 @@ abstract class AbstractScopeSniff implements Sniff /** * The type of scope opener tokens that this test wishes to listen to. * - * @var string + * @var array */ private $scopeTokens = []; diff --git a/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php b/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php index ea435321fc..f98277116e 100644 --- a/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php +++ b/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php @@ -19,7 +19,7 @@ class DisallowShortArraySyntaxSniff implements Sniff /** * Registers the tokens that this sniff wants to listen for. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php b/src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php index d4af5776dc..dad82740a9 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/ControlStructures/InlineControlStructureSniff.php b/src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php index 5ae358ff6a..0d2ede5bf7 100644 --- a/src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php +++ b/src/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php @@ -62,7 +62,7 @@ public function register() * @param int $stackPtr The position of the current token in the * stack passed in $tokens. * - * @return void + * @return void|int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php b/src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php index 926fec1555..cacb3a7a7e 100644 --- a/src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php +++ b/src/Standards/Generic/Sniffs/Debug/ClosureLinterSniff.php @@ -22,14 +22,14 @@ class ClosureLinterSniff implements Sniff * * All other error codes will show warnings. * - * @var integer + * @var array */ public $errorCodes = []; /** * A list of error codes to ignore. * - * @var integer + * @var array */ public $ignoreCodes = []; diff --git a/src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php b/src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php index 99e2e91f4b..af546434fa 100644 --- a/src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php +++ b/src/Standards/Generic/Sniffs/Files/InlineHTMLSniff.php @@ -48,7 +48,7 @@ public function register() * @param int $stackPtr The position of the current token in * the stack passed in $tokens. * - * @return int|null + * @return int|void */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php b/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php index ad84392e26..ca26fcd561 100644 --- a/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php +++ b/src/Standards/Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.php @@ -34,7 +34,7 @@ class OpeningFunctionBraceKernighanRitchieSniff implements Sniff /** * Registers the tokens that this sniff wants to listen for. * - * @return void + * @return array */ public function register() { diff --git a/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php b/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php index 8451f80a6e..e3e852ddd8 100644 --- a/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php +++ b/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php @@ -28,7 +28,7 @@ class DisallowAlternativePHPTagsSniff implements Sniff /** * The current PHP version. * - * @var integer + * @var integer|string|null */ private $phpVersion = null; diff --git a/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php b/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php index 433ef5cf7f..b7dc75ce6b 100644 --- a/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php +++ b/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php @@ -46,7 +46,7 @@ public function register() * @param int $stackPtr The position of the current token * in the stack passed in $tokens. * - * @return void + * @return void|int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php b/src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php index 34c825fbff..c2254b34fa 100644 --- a/src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php +++ b/src/Standards/Generic/Sniffs/PHP/LowerCaseConstantSniff.php @@ -64,7 +64,7 @@ public function register() * @param int $stackPtr The position of the current token in the * stack passed in $tokens. * - * @return void + * @return void|int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Generic/Sniffs/PHP/SyntaxSniff.php b/src/Standards/Generic/Sniffs/PHP/SyntaxSniff.php index 144a0001b2..ffc1ff6daf 100644 --- a/src/Standards/Generic/Sniffs/PHP/SyntaxSniff.php +++ b/src/Standards/Generic/Sniffs/PHP/SyntaxSniff.php @@ -48,7 +48,7 @@ public function register() * @param int $stackPtr The position of the current token in * the stack passed in $tokens. * - * @return void + * @return int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php b/src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php index 79035abe5d..03028cb7b1 100644 --- a/src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php +++ b/src/Standards/Generic/Sniffs/VersionControl/GitMergeConflictSniff.php @@ -49,7 +49,7 @@ public function register() * @param int $stackPtr The position of the current token in the * stack passed in $tokens. * - * @return void + * @return int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php b/src/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php index 8fc4943003..a15585830f 100644 --- a/src/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php +++ b/src/Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php @@ -50,7 +50,7 @@ public function register() * @param int $stackPtr The position of the current token * in the stack passed in $tokens. * - * @return void + * @return int */ public function process(File $phpcsFile, $stackPtr) { @@ -113,7 +113,7 @@ public function process(File $phpcsFile, $stackPtr) * * @param string $path The path to return Subversion properties on. * - * @return array + * @return array|null * @throws \PHP_CodeSniffer\Exceptions\RuntimeException If Subversion properties file could * not be opened. */ diff --git a/src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php b/src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php index 6beec4219b..4d223ee186 100644 --- a/src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php +++ b/src/Standards/Generic/Sniffs/WhiteSpace/ArbitraryParenthesesSpacingSniff.php @@ -78,7 +78,7 @@ public function register() * @param int $stackPtr The position of the current token in * the stack passed in $tokens. * - * @return void + * @return void|int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php b/src/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php index e085e4ae80..b2290cd124 100644 --- a/src/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php +++ b/src/Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php @@ -56,7 +56,7 @@ public function register() * @param int $stackPtr The position of the current token in * the stack passed in $tokens. * - * @return void + * @return int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php b/src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php index 15d4580c94..471bb3d014 100644 --- a/src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php +++ b/src/Standards/Generic/Sniffs/WhiteSpace/DisallowTabIndentSniff.php @@ -56,7 +56,7 @@ public function register() * @param int $stackPtr The position of the current token in * the stack passed in $tokens. * - * @return void + * @return int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php b/src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php index 7789a7a915..2453abdcd8 100644 --- a/src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php +++ b/src/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php @@ -80,7 +80,7 @@ class ScopeIndentSniff implements Sniff * This is a cached copy of the public version of this var, which * can be set in a ruleset file, and some core ignored tokens. * - * @var int[] + * @var array */ private $ignoreIndentation = []; diff --git a/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.php b/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.php index 38ab9a3581..9af0d93093 100644 --- a/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.php +++ b/src/Standards/Generic/Tests/Debug/CSSLintUnitTest.php @@ -19,7 +19,7 @@ class CSSLintUnitTest extends AbstractSniffUnitTest /** * Should this test be skipped for some reason. * - * @return void + * @return bool */ protected function shouldSkipTest() { diff --git a/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.php b/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.php index 25a05a34f8..f5054b5c3d 100644 --- a/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.php +++ b/src/Standards/Generic/Tests/Debug/ClosureLinterUnitTest.php @@ -19,7 +19,7 @@ class ClosureLinterUnitTest extends AbstractSniffUnitTest /** * Should this test be skipped for some reason. * - * @return void + * @return bool */ protected function shouldSkipTest() { diff --git a/src/Standards/Generic/Tests/Debug/ESLintUnitTest.php b/src/Standards/Generic/Tests/Debug/ESLintUnitTest.php index 1aaec09d05..d9d754d731 100644 --- a/src/Standards/Generic/Tests/Debug/ESLintUnitTest.php +++ b/src/Standards/Generic/Tests/Debug/ESLintUnitTest.php @@ -68,7 +68,7 @@ protected function resetProperties() /** * Should this test be skipped for some reason. * - * @return void + * @return bool */ protected function shouldSkipTest() { diff --git a/src/Standards/Generic/Tests/Debug/JSHintUnitTest.php b/src/Standards/Generic/Tests/Debug/JSHintUnitTest.php index 27a56033f8..e7753d0558 100644 --- a/src/Standards/Generic/Tests/Debug/JSHintUnitTest.php +++ b/src/Standards/Generic/Tests/Debug/JSHintUnitTest.php @@ -19,7 +19,7 @@ class JSHintUnitTest extends AbstractSniffUnitTest /** * Should this test be skipped for some reason. * - * @return void + * @return bool */ protected function shouldSkipTest() { diff --git a/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php b/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php index e94b5d47ce..c10b34fa88 100644 --- a/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php +++ b/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php @@ -18,7 +18,7 @@ class ExecutableFileUnitTest extends AbstractSniffUnitTest /** * Should this test be skipped for some reason. * - * @return void + * @return bool */ protected function shouldSkipTest() { diff --git a/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.php b/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.php index e47d63bcd8..02d6a1289f 100644 --- a/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.php +++ b/src/Standards/Generic/Tests/VersionControl/SubversionPropertiesUnitTest.php @@ -18,7 +18,7 @@ class SubversionPropertiesUnitTest extends AbstractSniffUnitTest /** * Should this test be skipped for some reason. * - * @return void + * @return bool */ protected function shouldSkipTest() { diff --git a/src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php b/src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php index ae0f280d31..9d02672d16 100644 --- a/src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php +++ b/src/Standards/MySource/Sniffs/CSS/BrowserSpecificStylesSniff.php @@ -43,7 +43,7 @@ class BrowserSpecificStylesSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php b/src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php index 1852756819..7ae09f8710 100644 --- a/src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php +++ b/src/Standards/MySource/Sniffs/Channels/IncludeOwnSystemSniff.php @@ -82,7 +82,7 @@ public function process(File $phpcsFile, $stackPtr) * @param int $stackPtr The position in the tokens array of the * potentially included class. * - * @return string + * @return bool */ protected function getIncludedClassFromToken( $phpcsFile, diff --git a/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php b/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php index 1c9e5727a8..85d7f765a6 100644 --- a/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php +++ b/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php @@ -19,7 +19,7 @@ class IncludeSystemSniff extends AbstractScopeSniff /** * A list of classes that don't need to be included. * - * @var string[] + * @var array */ private $ignore = [ 'self' => true, @@ -286,7 +286,7 @@ protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) * @param int $stackPtr The position in the tokens array of the * potentially included class. * - * @return string + * @return string|false */ protected function getIncludedClassFromToken(File $phpcsFile, array $tokens, $stackPtr) { diff --git a/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php b/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php index 2b42648404..2af57b18d5 100644 --- a/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php +++ b/src/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php @@ -88,7 +88,7 @@ public function register() * @param int $stackPtr The position of the current token * in the stack passed in $tokens. * - * @return int + * @return int|void */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php b/src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php index a4b19a73bf..e92ffb551d 100644 --- a/src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php +++ b/src/Standards/PSR1/Sniffs/Files/SideEffectsSniff.php @@ -36,7 +36,7 @@ public function register() * @param int $stackPtr The position of the current token in * the token stack. * - * @return void + * @return int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php b/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php index d2b10aef0e..99c9de2bf9 100644 --- a/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php +++ b/src/Standards/PSR12/Sniffs/Files/FileHeaderSniff.php @@ -36,7 +36,7 @@ public function register() * @param int $stackPtr The position of the current * token in the stack. * - * @return int|null + * @return int|void */ public function process(File $phpcsFile, $stackPtr) { @@ -284,7 +284,7 @@ public function getHeaderLines(File $phpcsFile, $stackPtr) * @param array $headerLines Header information, as sourced * from getHeaderLines(). * - * @return int|null + * @return void */ public function processHeaderLines(File $phpcsFile, $headerLines) { diff --git a/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php b/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php index 8770467ee2..109e23e9e6 100644 --- a/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php +++ b/src/Standards/PSR12/Sniffs/Traits/UseDeclarationSniff.php @@ -36,7 +36,7 @@ public function register() * @param int $stackPtr The position of the current token in the * stack passed in $tokens. * - * @return void + * @return void|int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php b/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php index 2554226ac6..a63ba88198 100644 --- a/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php +++ b/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php @@ -241,7 +241,7 @@ private function findNextCase($phpcsFile, $stackPtr, $end) * @param int $stackPtr The position to start looking at. * @param int $end The position to stop looking at. * - * @return int|false + * @return int|bool */ private function findNestedTerminator($phpcsFile, $stackPtr, $end) { diff --git a/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php b/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php index 3df15a229b..98693f8615 100644 --- a/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php +++ b/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php @@ -38,7 +38,7 @@ public function register() * @param int $stackPtr The position of the current token in * the stack passed in $tokens. * - * @return void + * @return int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php b/src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php index c43a747f1a..cee18cacde 100644 --- a/src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php +++ b/src/Standards/PSR2/Sniffs/Methods/FunctionCallSignatureSniff.php @@ -35,7 +35,7 @@ class FunctionCallSignatureSniff extends PEARFunctionCallSignatureSniff * @param array $tokens The stack of tokens that make up * the file. * - * @return void + * @return bool */ public function isMultiLineCall(File $phpcsFile, $stackPtr, $openBracket, $tokens) { diff --git a/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php b/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php index 156c0f114b..fb147582fa 100644 --- a/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionClosingBraceSpaceSniff.php @@ -27,7 +27,7 @@ class ClassDefinitionClosingBraceSpaceSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php b/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php index b3ea8976d1..7ed872fea3 100644 --- a/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php @@ -27,7 +27,7 @@ class ClassDefinitionNameSpacingSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php b/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php index 0d12ef09d2..0b84fa6262 100644 --- a/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/ClassDefinitionOpeningBraceSpaceSniff.php @@ -27,7 +27,7 @@ class ClassDefinitionOpeningBraceSpaceSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php b/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php index d4b18d2df1..07b6088679 100644 --- a/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/ColonSpacingSniff.php @@ -27,7 +27,7 @@ class ColonSpacingSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php b/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php index f1ede4d628..0f9131e7a2 100644 --- a/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/ColourDefinitionSniff.php @@ -26,7 +26,7 @@ class ColourDefinitionSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php b/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php index a32de327e6..ddea31403d 100644 --- a/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/DisallowMultipleStyleDefinitionsSniff.php @@ -18,7 +18,7 @@ class DisallowMultipleStyleDefinitionsSniff implements Sniff /** * A list of tokenizers this sniff supports. * - * @var array + * @var string[] */ public $supportedTokenizers = ['CSS']; @@ -26,7 +26,7 @@ class DisallowMultipleStyleDefinitionsSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php b/src/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php index 8c9cf82a43..97ad572ca2 100644 --- a/src/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/DuplicateStyleDefinitionSniff.php @@ -26,7 +26,7 @@ class DuplicateStyleDefinitionSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php b/src/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php index eccd91e925..e641ed20d6 100644 --- a/src/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/EmptyClassDefinitionSniff.php @@ -27,7 +27,7 @@ class EmptyClassDefinitionSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php b/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php index c77c2488ac..816bb9b7cb 100644 --- a/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/EmptyStyleDefinitionSniff.php @@ -27,7 +27,7 @@ class EmptyStyleDefinitionSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php b/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php index 654ca5f5b9..509e9866b0 100644 --- a/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/LowercaseStyleDefinitionSniff.php @@ -26,7 +26,7 @@ class LowercaseStyleDefinitionSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php b/src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php index f3887cd7ff..a9ca371ca2 100644 --- a/src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/MissingColonSniff.php @@ -26,7 +26,7 @@ class MissingColonSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php b/src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php index 90763c80f0..e2a3e8dd9e 100644 --- a/src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/OpacitySniff.php @@ -27,7 +27,7 @@ class OpacitySniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php b/src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php index f668d17f1d..ef9d238c66 100644 --- a/src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/SemicolonSpacingSniff.php @@ -27,7 +27,7 @@ class SemicolonSpacingSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php b/src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php index 57570a761a..b59c27963d 100644 --- a/src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php +++ b/src/Standards/Squiz/Sniffs/CSS/ShorthandSizeSniff.php @@ -41,7 +41,7 @@ class ShorthandSizeSniff implements Sniff /** * Returns the token types that this sniff is interested in. * - * @return int[] + * @return array */ public function register() { diff --git a/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php b/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php index 21c8229998..644fd50c7c 100644 --- a/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php +++ b/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php @@ -27,7 +27,7 @@ class FunctionCommentSniff extends PEARFunctionCommentSniff /** * The current PHP version. * - * @var integer + * @var integer|string|null */ private $phpVersion = null; diff --git a/src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php b/src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php index 1306d185aa..babe2edc0d 100644 --- a/src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php +++ b/src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php @@ -49,7 +49,7 @@ public function register() * @param int $stackPtr The position of the current token in the * stack passed in $tokens. * - * @return void + * @return void|int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php b/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php index 635116d2d9..626b330f11 100644 --- a/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php +++ b/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php @@ -37,7 +37,7 @@ class MultiLineFunctionDeclarationSniff extends PEARFunctionDeclarationSniff * @param array $tokens The stack of tokens that make up * the file. * - * @return void + * @return bool */ public function isMultiLineDeclaration($phpcsFile, $stackPtr, $openBracket, $tokens) { diff --git a/src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php b/src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php index 58d529ed42..c018142c98 100644 --- a/src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php +++ b/src/Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php @@ -44,7 +44,7 @@ class ComparisonOperatorUsageSniff implements Sniff /** * A list of invalid operators with their alternatives. * - * @var array + * @var array> */ private static $invalidOps = [ 'PHP' => [ diff --git a/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php b/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php index f2e76f00dc..d08bc3d100 100644 --- a/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php +++ b/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php @@ -38,7 +38,7 @@ public function register() * @param int $stackPtr The position of the current token * in the stack passed in $tokens. * - * @return void + * @return int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php b/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php index 2eff82d656..a0c45c1526 100644 --- a/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php +++ b/src/Standards/Squiz/Tests/Debug/JSLintUnitTest.php @@ -19,7 +19,7 @@ class JSLintUnitTest extends AbstractSniffUnitTest /** * Should this test be skipped for some reason. * - * @return void + * @return bool */ protected function shouldSkipTest() { diff --git a/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php b/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php index dac3b3addf..30108f59b4 100644 --- a/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php +++ b/src/Standards/Squiz/Tests/Debug/JavaScriptLintUnitTest.php @@ -19,7 +19,7 @@ class JavaScriptLintUnitTest extends AbstractSniffUnitTest /** * Should this test be skipped for some reason. * - * @return void + * @return bool */ protected function shouldSkipTest() { diff --git a/src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php b/src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php index e5e0c22d7a..b67dbf191d 100644 --- a/src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php +++ b/src/Standards/Zend/Sniffs/Files/ClosingTagSniff.php @@ -36,7 +36,7 @@ public function register() * @param int $stackPtr The position of the current token in * the stack passed in $tokens. * - * @return void + * @return int */ public function process(File $phpcsFile, $stackPtr) { diff --git a/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php b/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php index f1e04521c5..9d90fb536d 100644 --- a/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php +++ b/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php @@ -19,7 +19,7 @@ class CodeAnalyzerUnitTest extends AbstractSniffUnitTest /** * Should this test be skipped for some reason. * - * @return void + * @return bool */ protected function shouldSkipTest() { diff --git a/src/Tokenizers/JS.php b/src/Tokenizers/JS.php index 8ef0ad92f1..cb7bd3c193 100644 --- a/src/Tokenizers/JS.php +++ b/src/Tokenizers/JS.php @@ -905,10 +905,10 @@ public function tokenize($string) * * If a regular expression is not found, NULL is returned. * - * @param string $char The index of the possible regex start character. + * @param int $char The index of the possible regex start character. * @param string $string The complete content of the string being tokenized. - * @param string $chars An array of characters being tokenized. - * @param string $tokens The current array of tokens found in the string. + * @param array $chars An array of characters being tokenized. + * @param array $tokens The current array of tokens found in the string. * * @return array|null */ diff --git a/src/Tokenizers/PHP.php b/src/Tokenizers/PHP.php index 5ca178bd04..e8ad0db793 100644 --- a/src/Tokenizers/PHP.php +++ b/src/Tokenizers/PHP.php @@ -306,7 +306,7 @@ class PHP extends Tokenizer /** * Known lengths of tokens. * - * @var array + * @var array */ public $knownLengths = [ T_ABSTRACT => 8, diff --git a/src/Tokenizers/Tokenizer.php b/src/Tokenizers/Tokenizer.php index 9ef4a81609..bfe8c7a143 100644 --- a/src/Tokenizers/Tokenizer.php +++ b/src/Tokenizers/Tokenizer.php @@ -60,7 +60,7 @@ abstract class Tokenizer /** * Known lengths of tokens. * - * @var array + * @var array */ public $knownLengths = []; diff --git a/src/Util/Cache.php b/src/Util/Cache.php index 3910fabe3b..932952e4be 100644 --- a/src/Util/Cache.php +++ b/src/Util/Cache.php @@ -19,7 +19,7 @@ class Cache /** * The filesystem location of the cache file. * - * @var void + * @var string */ private static $path = ''; diff --git a/src/Util/Common.php b/src/Util/Common.php index b8e3d4f80e..afed49e700 100644 --- a/src/Util/Common.php +++ b/src/Util/Common.php @@ -35,7 +35,7 @@ class Common * * @param string $path The path to use. * - * @return mixed + * @return bool */ public static function isPharFile($path) { @@ -83,7 +83,7 @@ public static function isReadable($path) * * @param string $path The path to use. * - * @return mixed + * @return string|false */ public static function realpath($path) {