Lines Matching refs:stackPtr
199 * @param int $stackPtr The position in the tokens stack
206 public final function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
217 if (in_array($tokens[$stackPtr]['code'], $this->_supplementaryTokens) === true) {
218 $this->processSupplementary($phpcsFile, $stackPtr);
221 $type = $tokens[$stackPtr]['code'];
236 $errors = $this->processPattern($patternInfo, $phpcsFile, $stackPtr);
245 foreach ($errors as $stackPtr => $error) {
246 if (isset($this->_errorPos[$stackPtr]) === false) {
247 $this->_errorPos[$stackPtr] = true;
248 $allErrors[$stackPtr] = $error;
253 foreach ($allErrors as $stackPtr => $error) {
254 $phpcsFile->addError($error, $stackPtr, 'Found');
269 * @param int $stackPtr The position in the tokens stack where
277 $stackPtr argument
291 $origStackPtr = $stackPtr;
295 $stackPtr--;
300 if ($tokens[$stackPtr]['code'] === T_WHITESPACE) {
301 $found = $tokens[$stackPtr]['content'].$found;
308 if ($tokens[$stackPtr]['content'] !== $pattern[$i]['value']) {
318 $stackPtr,
333 ($stackPtr - $prev - 1)
341 $stackPtr = $prev;
343 $stackPtr = ($prev - 1);
357 $stackPtr,
377 $stackPtr = ($tokens[$next][$to] - 1);
382 … && isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[$stackPtr]['code']]) === true
386 ($stackPtr - 1),
397 ($stackPtr - $startComment + 1)
401 $stackPtr = ($startComment - 1);
404 if ($tokens[$stackPtr]['code'] === T_WHITESPACE) {
405 if ($tokens[$stackPtr]['content'] !== $phpcsFile->eolChar) {
406 $found = $tokens[$stackPtr]['content'].$found;
411 if (($tokens[($stackPtr - 1)]['content'] !== $phpcsFile->eolChar)
413 … && isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[($stackPtr - 1)]['code']]) === false)
417 $stackPtr--;
423 $found = $tokens[$stackPtr]['content'].$found;
429 … $prev = $phpcsFile->findPrevious($ignoreTokens, ($stackPtr - 1), null, true);
430 … if ($prev !== false && $tokens[$prev]['line'] !== $tokens[$stackPtr]['line']) {
438 $stackPtr = $origStackPtr;
443 if (isset($tokens[$stackPtr]) === false) {
452 … if (isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[$stackPtr]['code']]) === true) {
459 if (isset($tokens[($stackPtr + 1)]) === true
460 … && isset(PHP_CodeSniffer_Tokens::$commentTokens[$tokens[($stackPtr + 1)]['code']]) === true
467 if ($tokens[$stackPtr]['code'] === T_WHITESPACE) {
471 $tokenContent = $tokens[$stackPtr]['content'];
476 $stackPtr,
482 $stackPtr,
483 ($next - $stackPtr)
486 $lastAddedStackPtr = $stackPtr;
487 $stackPtr = $next;
490 if ($stackPtr !== $lastAddedStackPtr) {
494 if ($stackPtr !== $lastAddedStackPtr) {
495 $found .= $tokens[$stackPtr]['content'];
496 $lastAddedStackPtr = $stackPtr;
520 $stackPtr,
558 if (($next - $stackPtr) > 0) {
560 for ($j = $stackPtr; $j < $next; $j++) {
581 if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) {
594 $stackPtr = $next;
596 $stackPtr = ($next + 1);
603 $stackPtr
613 $stackPtr = $next;
618 $stackPtr
637 $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1);
640 if ($tokens[$stackPtr]['code'] !== T_STRING) {
644 if ($stackPtr !== $lastAddedStackPtr) {
646 $lastAddedStackPtr = $stackPtr;
649 $stackPtr++;
653 for ($j = $stackPtr; $j < $phpcsFile->numTokens; $j++) {
672 if ($newline === $stackPtr) {
673 $next = ($stackPtr + 1);
679 $stackPtr,
693 if ($stackPtr !== $lastAddedStackPtr) {
695 $stackPtr,
696 ($next - $stackPtr)
699 $diff = ($next - $stackPtr);
703 $stackPtr = $next;
771 * @param int $stackPtr The position in the tokens stack to
779 $stackPtr argument