protected function findNextCase(File $phpcsFile, $stackPtr, $end) {
		$tokens = $phpcsFile->getTokens();
		while (($stackPtr = $phpcsFile->findNext([T_CASE, T_DEFAULT, T_SWITCH], $stackPtr, $end)) !== false) {
			// Skip nested SWITCH statements; they are handled on their own.
			if ($tokens[$stackPtr]['code'] === T_SWITCH) {
				$stackPtr = $tokens[$stackPtr]['scope_closer'];
				continue;
			}

			break;
		}

		return $stackPtr;
	}
protected function findNextCase(File $phpcsFile, $stackPtr, $end) {
		$tokens = $phpcsFile->getTokens();
		while (($stackPtr = $phpcsFile->findNext([T_CASE, T_DEFAULT, T_SWITCH], $stackPtr, $end)) !== false) {
			// Skip nested SWITCH statements; they are handled on their own.
			if ($tokens[$stackPtr]['code'] === T_SWITCH) {
				$stackPtr = $tokens[$stackPtr]['scope_closer'];
				continue;
			}

			break;
		}

		return $stackPtr;
	}
protected function findNextCase ( File $ phpcsFile , $ stackPtr , $ end ) { $ tokens = $ phpcsFile -> getTokens ( ) ; while ( ( $ stackPtr = $ phpcsFile -> findNext ( [ T_CASE , T_DEFAULT , T_SWITCH ] , $ stackPtr , $ end ) ) !== false ) { // Skip nested SWITCH statements; they are handled on their own. if ( $ tokens [ $ stackPtr ] [ 'code' ] === T_SWITCH ) { $ stackPtr = $ tokens [ $ stackPtr ] [ 'scope_closer' ] ; continue ; } break ; } return $ stackPtr ; }
Find the next CASE or DEFAULT statement from a point in the file.

Note that nested switches are ignored.

@param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
@param int|bool $stackPtr The position to start looking at.
@param int $end The position to stop looking at.

@return int|bool
Find the next CASE or DEFAULT statement from a point in the file .