Lines Matching refs:stackPtr

488         foreach ($this->_tokens as $stackPtr => $token) {
523 echo "\t\tProcess token $stackPtr: $type => $content".PHP_EOL;
537 && $listenerIgnoreTo[$listenerData['class']] > $stackPtr)
576 $ignoreTo = $listeners[$class]->process($this, $stackPtr);
805 * @param int $stackPtr The stack position where the error occurred.
816 $stackPtr, argument
822 if ($stackPtr === null) {
826 $line = $this->_tokens[$stackPtr]['line'];
827 $column = $this->_tokens[$stackPtr]['column'];
839 * @param int $stackPtr The stack position where the error occurred.
850 $stackPtr, argument
856 if ($stackPtr === null) {
860 $line = $this->_tokens[$stackPtr]['line'];
861 $column = $this->_tokens[$stackPtr]['column'];
923 * @param int $stackPtr The stack position where the error occurred.
933 $stackPtr, argument
938 $recorded = $this->addError($error, $stackPtr, $code, $data, $severity, true);
954 * @param int $stackPtr The stack position where the error occurred.
964 $stackPtr, argument
969 $recorded = $this->addWarning($warning, $stackPtr, $code, $data, $severity, true);
1276 * @param int $stackPtr The stack position where the metric was recorded.
1282 public function recordMetric($stackPtr, $metric, $value) argument
1287 $value => array($stackPtr),
1292 $this->_metrics[$metric]['values'][$value] = array($stackPtr);
1294 $this->_metrics[$metric]['values'][$value][] = $stackPtr;
1887 * @param int $stackPtr The position in the stack of the token that
1899 $stackPtr, argument
1905 echo "=> Begin scope map recursion at token $stackPtr with depth $depth".PHP_EOL;
1909 $currType = $tokens[$stackPtr]['code'];
1910 $startLine = $tokens[$stackPtr]['line'];
1920 $opener = $stackPtr;
1923 for ($i = ($stackPtr + 1); $i < $numTokens; $i++) {
1955 $type = $tokens[$stackPtr]['type'];
1957 … echo "=> Found semicolon before scope opener for $stackPtr:$type, bailing".PHP_EOL;
1969 $type = $tokens[$stackPtr]['type'];
1971 … echo "=> Found curly brace closer before scope opener for $stackPtr:$type, bailing".PHP_EOL;
1979 || $tokenizer->scopeOpeners[$tokens[$stackPtr]['code']]['shared'] === true)
1999 $type = $tokens[$stackPtr]['type'];
2001 echo "=> Ignoring non-curly scope closer for $stackPtr:$type".PHP_EOL;
2006 $stackPtr,
2011 $type = $tokens[$stackPtr]['type'];
2014 … echo "=> Found scope closer ($scopeCloser:$closerType) for $stackPtr:$type".PHP_EOL;
2018 … if (($tokens[$stackPtr]['code'] === T_IF || $tokens[$stackPtr]['code'] === T_ELSEIF)
2063 $tokens[$token]['scope_condition'] = $stackPtr;
2068 … if ($tokenizer->scopeOpeners[$tokens[$stackPtr]['code']]['shared'] === true) {
2104 && $tokens[$stackPtr]['code'] !== T_FUNCTION
2108 $type = $tokens[$stackPtr]['type'];
2110 … echo "=> Found function before scope opener for $stackPtr:$type, processing manually".PHP_EOL;
2140 $type = $tokens[$stackPtr]['type'];
2142 … echo "=> Found new opening condition before scope opener for $stackPtr:$type, ";
2145 if (($tokens[$stackPtr]['code'] === T_IF
2146 || $tokens[$stackPtr]['code'] === T_ELSEIF
2147 || $tokens[$stackPtr]['code'] === T_ELSE)
2161 return $stackPtr;
2198 return $stackPtr;
2254 if (isset($tokens[$stackPtr]['parenthesis_closer']) === true
2255 && $i < $tokens[$stackPtr]['parenthesis_closer']
2301 $type = $tokens[$stackPtr]['type'];
2303 echo "=> Found scope opener for $stackPtr:$type".PHP_EOL;
2354 $type = $tokens[$stackPtr]['type'];
2357 … echo "=> Still looking for $stackPtr:$type scope opener after $lines lines".PHP_EOL;
2361 $type = $tokens[$stackPtr]['type'];
2363 … echo "=> Couldn't find scope opener for $stackPtr:$type, bailing".PHP_EOL;
2366 return $stackPtr;
2388 $type = $tokens[$stackPtr]['type'];
2390 echo "=> Found (unexpected) scope closer for $stackPtr:$type".PHP_EOL;
2393 foreach (array($stackPtr, $opener) as $token) {
2394 $tokens[$token]['scope_condition'] = $stackPtr;
2405 return $stackPtr;
2465 $stackPtr = $tokens[$i]['scope_condition'];
2467 $type = $tokens[$stackPtr]['type'];
2469 echo "=> Found scope opener for $stackPtr:$type".PHP_EOL;
2472 $stackPtr = $tokens[$i]['scope_condition'];
2556 $conditions[$stackPtr] = $tokens[$stackPtr]['code'];
2558 $type = $tokens[$stackPtr]['type'];
2560 echo "* token $stackPtr:$type added to conditions array *".PHP_EOL;
2661 * @param int $stackPtr The position of the declaration token which
2670 public function getDeclarationName($stackPtr) argument
2672 $tokenCode = $this->_tokens[$stackPtr]['code'];
2687 …throw new PHP_CodeSniffer_Exception('Token type "'.$this->_tokens[$stackPtr]['type'].'" is not T_F…
2691 for ($i = $stackPtr; $i < $this->numTokens; $i++) {
2706 * @param int $stackPtr The position of the declaration token which
2713 public function isAnonymousFunction($stackPtr) argument
2715 $tokenCode = $this->_tokens[$stackPtr]['code'];
2720 if (isset($this->_tokens[$stackPtr]['parenthesis_opener']) === false) {
2726 for ($i = ($stackPtr + 1); $i < $this->numTokens; $i++) {
2738 $open = $this->_tokens[$stackPtr]['parenthesis_opener'];
2768 * @param int $stackPtr The position in the stack of the function token
2775 public function getMethodParameters($stackPtr) argument
2777 if ($this->_tokens[$stackPtr]['code'] !== T_FUNCTION
2778 && $this->_tokens[$stackPtr]['code'] !== T_CLOSURE
2783 $opener = $this->_tokens[$stackPtr]['parenthesis_opener'];
2784 $closer = $this->_tokens[$stackPtr]['parenthesis_closer'];
2936 * @param int $stackPtr The position in the stack of the T_FUNCTION token to
2943 public function getMethodProperties($stackPtr) argument
2945 if ($this->_tokens[$stackPtr]['code'] !== T_FUNCTION) {
2966 $isClosure = $this->isAnonymousFunction($stackPtr);
2968 for ($i = ($stackPtr - 1); $i > 0; $i--) {
3023 * @param int $stackPtr The position in the stack of the T_VARIABLE token to
3031 public function getMemberProperties($stackPtr) argument
3033 if ($this->_tokens[$stackPtr]['code'] !== T_VARIABLE) {
3037 $conditions = array_keys($this->_tokens[$stackPtr]['conditions']);
3051 if (isset($this->_tokens[$stackPtr]['nested_parenthesis']) === false
3052 || empty($this->_tokens[$stackPtr]['nested_parenthesis']) === true
3055 … $this->addWarning($error, $stackPtr, 'Internal.ParseError.InterfaceHasMemberVar');
3079 for ($i = ($stackPtr - 1); $i > 0; $i--) {
3123 * @param int $stackPtr The position in the stack of the T_CLASS token to
3130 public function getClassProperties($stackPtr) argument
3132 if ($this->_tokens[$stackPtr]['code'] !== T_CLASS) {
3147 for ($i = ($stackPtr - 1); $i > 0; $i--) {
3177 * @param int $stackPtr The position of the T_BITWISE_AND token.
3181 public function isReference($stackPtr) argument
3183 if ($this->_tokens[$stackPtr]['code'] !== T_BITWISE_AND) {
3189 ($stackPtr - 1),
3220 if (isset($this->_tokens[$stackPtr]['nested_parenthesis']) === true) {
3221 $brackets = $this->_tokens[$stackPtr]['nested_parenthesis'];
3249 ($stackPtr + 1),
3643 * @param int $stackPtr The position of the token we are checking.
3648 public function hasCondition($stackPtr, $types) argument
3651 if (isset($this->_tokens[$stackPtr]) === false) {
3656 if (isset($this->_tokens[$stackPtr]['conditions']) === false) {
3661 $conditions = $this->_tokens[$stackPtr]['conditions'];
3680 * @param int $stackPtr The position of the token we are checking.
3685 public function getCondition($stackPtr, $type) argument
3688 if (isset($this->_tokens[$stackPtr]) === false) {
3693 if (isset($this->_tokens[$stackPtr]['conditions']) === false) {
3697 $conditions = $this->_tokens[$stackPtr]['conditions'];
3714 * @param int $stackPtr The stack position of the class.
3718 public function findExtendedClassName($stackPtr) argument
3721 if (isset($this->_tokens[$stackPtr]) === false) {
3725 if ($this->_tokens[$stackPtr]['code'] !== T_CLASS
3726 && $this->_tokens[$stackPtr]['code'] !== T_ANON_CLASS
3731 if (isset($this->_tokens[$stackPtr]['scope_closer']) === false) {
3735 $classCloserIndex = $this->_tokens[$stackPtr]['scope_closer'];
3736 $extendsIndex = $this->findNext(T_EXTENDS, $stackPtr, $classCloserIndex);
3765 * @param int $stackPtr The stack position of the class.
3769 public function findImplementedInterfaceNames($stackPtr) argument
3772 if (isset($this->_tokens[$stackPtr]) === false) {
3776 if ($this->_tokens[$stackPtr]['code'] !== T_CLASS
3777 && $this->_tokens[$stackPtr]['code'] !== T_ANON_CLASS
3782 if (isset($this->_tokens[$stackPtr]['scope_closer']) === false) {
3786 $classOpenerIndex = $this->_tokens[$stackPtr]['scope_opener'];
3787 $implementsIndex = $this->findNext(T_IMPLEMENTS, $stackPtr, $classOpenerIndex);