diff --git a/src/Files/File.php b/src/Files/File.php index b76c047a76..31c263230e 100644 --- a/src/Files/File.php +++ b/src/Files/File.php @@ -2115,7 +2115,7 @@ public function getTokensAsString($start, $length, $origContent=false) * will not be checked. IE. checking will stop * at the previous semi-colon found. * - * @return int|bool + * @return int|false * @see findNext() */ public function findPrevious( @@ -2196,7 +2196,7 @@ public function findPrevious( * will not be checked. i.e., checking will stop * at the next semi-colon found. * - * @return int|bool + * @return int|false * @see findPrevious() */ public function findNext( @@ -2404,7 +2404,7 @@ public function findEndOfStatement($start, $ignore=null) * If value is omitted, tokens with any value will * be returned. * - * @return int|bool + * @return int|false */ public function findFirstOnLine($types, $start, $exclude=false, $value=null) { @@ -2491,7 +2491,7 @@ public function hasCondition($stackPtr, $types) * @param int $stackPtr The position of the token we are checking. * @param int|string $type The type of token to search for. * - * @return int + * @return int|false */ public function getCondition($stackPtr, $type) { diff --git a/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php b/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php index 23b52cea5f..c38a10d2d3 100644 --- a/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php +++ b/src/Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php @@ -208,7 +208,7 @@ public function process(File $phpcsFile, $stackPtr) * @param int $stackPtr The position to start looking at. * @param int $end The position to stop looking at. * - * @return int|bool + * @return int|false */ private function findNextCase($phpcsFile, $stackPtr, $end) { diff --git a/src/Util/Tokens.php b/src/Util/Tokens.php index 48ac76b7c0..d11b193629 100644 --- a/src/Util/Tokens.php +++ b/src/Util/Tokens.php @@ -626,7 +626,7 @@ public static function tokenName($token) * @param array $tokens The token types to get the highest weighted * type for. * - * @return int The highest weighted token. + * @return int|false The highest weighted token. */ public static function getHighestWeightedToken(array $tokens) {