Lines Matching refs:tokens

55      * @param array                $tokens      The stack of tokens that make up
60 … function isMultiLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $openBracket, $tokens) argument
65 if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
66 …$use = $phpcsFile->findNext(T_USE, ($tokens[$openBracket]['parenthesis_closer'] + 1), $tokens[$sta…
79 if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) {
83 $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
86 while ($tokens[$end]['code'] === T_COMMA) {
94 if ($tokens[$next]['line'] !== $tokens[$end]['line']) {
104 if ($next !== false && $tokens[$next]['line'] !== $tokens[$end]['line']) {
120 * @param array $tokens The stack of tokens that make up
125 public function processMultiLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $tokens) argument
128 parent::processMultiLineDeclaration($phpcsFile, $stackPtr, $tokens);
130 $openBracket = $tokens[$stackPtr]['parenthesis_opener'];
131 $this->processBracket($phpcsFile, $openBracket, $tokens, 'function');
133 if ($tokens[$stackPtr]['code'] !== T_CLOSURE) {
137 …$use = $phpcsFile->findNext(T_USE, ($tokens[$stackPtr]['parenthesis_closer'] + 1), $tokens[$stackP…
143 $this->processBracket($phpcsFile, $openBracket, $tokens, 'use');
146 if ($tokens[($use - 1)]['code'] === T_WHITESPACE) {
147 $gap = strlen($tokens[($use - 1)]['content']);
161 * @param array $tokens The stack of tokens that make up
168 …public function processBracket(PHP_CodeSniffer_File $phpcsFile, $openBracket, $tokens, $type='func… argument
175 $closeBracket = $tokens[$openBracket]['parenthesis_closer'];
178 if ($tokens[$openBracket]['line'] !== $tokens[$closeBracket]['line']) {
180 if ($tokens[$next]['line'] !== ($tokens[$openBracket]['line'] + 1)) {
193 if (isset($tokens[$i]['bracket_opener']) === true) {
194 $i = $tokens[$i]['bracket_closer'];
198 if (isset($tokens[$i]['parenthesis_opener']) === true) {
199 $i = $tokens[$i]['parenthesis_closer'];
203 if ($tokens[$i]['code'] !== T_COMMA) {
208 if ($tokens[$next]['line'] === $tokens[$i]['line']) {