Home
last modified time | relevance | path

Searched refs:stackPtr (Results 1 – 25 of 219) sorted by relevance

123456789

/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/
H A DOperatorSpacingSniff.php88 if ($tokens[$stackPtr]['code'] === T_EQUAL
89 || $tokens[$stackPtr]['code'] === T_MINUS
106 if ($tokens[$stackPtr]['code'] === T_EQUAL) {
108 if (isset($tokens[($stackPtr + 1)]) === true
141 if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) {
170 if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) {
192 if ($tokens[$stackPtr]['code'] === T_MINUS || $tokens[$stackPtr]['code'] === T_PLUS) {
241 $operator = $tokens[$stackPtr]['content'];
254 if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) {
273 $i = ($stackPtr - 2);
[all …]
H A DSuperfluousWhitespaceSniff.php103 $stackPtr = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
107 if ($stackPtr === 0) {
164 $stackPtr--;
201 && $tokens[($stackPtr + 1)]['line'] === $tokens[$stackPtr]['line']
208 && $tokens[($stackPtr - 1)]['line'] !== $tokens[$stackPtr]['line']
221 … } else if ($tokens[($stackPtr - 1)]['content'] !== rtrim($tokens[($stackPtr - 1)]['content'])
222 && $tokens[($stackPtr - 1)]['line'] === $tokens[$stackPtr]['line']
226 … $phpcsFile->fixer->replaceToken(($stackPtr - 1), rtrim($tokens[($stackPtr - 1)]['content']));
236 && $tokens[($stackPtr - 1)]['line'] < $tokens[$stackPtr]['line']
237 && $tokens[($stackPtr - 2)]['line'] === $tokens[($stackPtr - 1)]['line']
[all …]
H A DObjectOperatorSpacingSniff.php62 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
65 if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
68 if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) {
71 $before = $tokens[($stackPtr - 1)]['length'];
75 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
78 if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) {
81 $after = $tokens[($stackPtr + 1)]['length'];
88 $this->checkSpacingBeforeOperator($phpcsFile, $stackPtr, $before);
89 $this->checkSpacingAfterOperator($phpcsFile, $stackPtr, $after);
113 $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
[all …]
H A DLogicalOperatorSpacingSniff.php65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
70 if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
74 $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
78 if ($tokens[$stackPtr]['line'] === $tokens[$prev]['line']
79 && strlen($tokens[($stackPtr - 1)]['content']) !== 1
81 $found = strlen($tokens[($stackPtr - 1)]['content']);
92 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
96 $phpcsFile->fixer->addContent($stackPtr, ' ');
100 if ($tokens[$stackPtr]['line'] === $tokens[$next]['line']
101 && strlen($tokens[($stackPtr + 1)]['content']) !== 1
[all …]
H A DLanguageConstructSpacingSniff.php60 * @param int $stackPtr The position of the current token in
65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
69 if ($tokens[($stackPtr + 1)]['code'] === T_SEMICOLON) {
74 if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
75 $content = $tokens[($stackPtr + 1)]['content'];
82 $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
85 } else if ($tokens[($stackPtr + 1)]['code'] !== T_OPEN_PARENTHESIS) {
88 $tokens[$stackPtr]['content'].' '.$tokens[($stackPtr + 1)]['content'],
89 $tokens[$stackPtr]['content'].$tokens[($stackPtr + 1)]['content'],
91 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/
H A DAbstractVariableSniff.php100 $stackPtr, argument
111 if ($stackPtr > $this->_endFunction) {
115 if ($tokens[$stackPtr]['code'] === T_FUNCTION
141 || $tokens[$stackPtr]['code'] === T_HEREDOC
176 $stackPtr argument
180 if ($tokens[$stackPtr]['code'] === T_VARIABLE) {
181 $this->processVariable($phpcsFile, $stackPtr);
183 || $tokens[$stackPtr]['code'] === T_HEREDOC
206 $stackPtr argument
221 $stackPtr argument
[all …]
H A DAbstractPatternSniff.php277 $stackPtr argument
291 $origStackPtr = $stackPtr;
295 $stackPtr--;
357 $stackPtr,
520 $stackPtr,
603 $stackPtr
618 $stackPtr
649 $stackPtr++;
695 $stackPtr,
703 $stackPtr = $next;
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/
H A DCSS.php79 for ($stackPtr = 1; $stackPtr < $numTokens; $stackPtr++) {
80 $token = $tokens[$stackPtr];
108 for ($stackPtr = ($stackPtr + 3); $stackPtr < $numTokens; $stackPtr++) {
114 $stackPtr += 2;
248 $stackPtr--;
277 for ($stackPtr = 0; $stackPtr < $numTokens; $stackPtr++) {
278 $token = $finalTokens[$stackPtr];
357 … $finalTokens[($stackPtr + 1)]['content'] = '-'.$finalTokens[($stackPtr + 1)]['content'];
433 $stackPtr = $i;
455 …$newContent = $finalTokens[($stackPtr - 1)]['content'].$finalTokens[$stackPtr]['content'].$finalTo…
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/
H A DLineLengthSniff.php102 $stackPtr--;
104 if ($tokens[$stackPtr]['column'] === 1
105 && $tokens[$stackPtr]['length'] === 0
111 if ($tokens[$stackPtr]['column'] !== 1
114 $stackPtr--;
117 $lineLength = ($tokens[$stackPtr]['column'] + $tokens[$stackPtr]['length'] - 1);
135 && ($tokens[$stackPtr]['code'] === T_COMMENT
136 || $tokens[$stackPtr]['code'] === T_DOC_COMMENT_STRING)
138 $oldLength = strlen($tokens[$stackPtr]['content']);
142 $nonBreakingLength = $tokens[$stackPtr]['length'];
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/
H A DConcatenationSpacingSniff.php70 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
75 if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
78 if ($tokens[($stackPtr - 2)]['line'] !== $tokens[$stackPtr]['line']) {
81 $before = $tokens[($stackPtr - 1)]['length'];
85 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
88 if ($tokens[($stackPtr + 2)]['line'] !== $tokens[$stackPtr]['line']) {
91 $after = $tokens[($stackPtr + 1)]['length'];
122 if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
129 … $phpcsFile->fixer->replaceToken(($stackPtr - 2), '('.$tokens[($stackPtr - 2)]['content'].')');
146 … $phpcsFile->fixer->replaceToken(($stackPtr + 2), '('.$tokens[($stackPtr + 2)]['content'].')');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/
H A DFixer.php350 public function getTokenContent($stackPtr) argument
357 return $this->_tokens[$stackPtr];
410 $applied[] = $stackPtr;
416 foreach ($applied as $stackPtr) {
517 … if (trim($this->_tokens[$stackPtr]) === '' && isset($this->_tokens[($stackPtr + 1)]) === true) {
574 $this->_oldTokenValues[$stackPtr]['prev'] = $this->_oldTokenValues[$stackPtr]['curr'];
579 $this->_fixedTokens[$stackPtr] = $this->_tokens[$stackPtr];
606 public function revertToken($stackPtr) argument
626 … if (trim($this->_tokens[$stackPtr]) === '' && isset($tokens[($stackPtr + 1)]) === true) {
634 $this->_tokens[$stackPtr] = $this->_fixedTokens[$stackPtr];
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/
H A DIncrementDecrementUsageSniff.php66 if ($tokens[$stackPtr]['code'] === T_INC || $tokens[$stackPtr]['code'] === T_DEC) {
67 $this->processIncDec($phpcsFile, $stackPtr);
90 if ($tokens[($stackPtr - 1)]['code'] === T_VARIABLE
94 $start = ($stackPtr + 1);
96 $start = ($stackPtr + 2);
154 if ($tokens[$stackPtr]['code'] !== T_EQUAL) {
161 if ($tokens[$stackPtr]['code'] === T_EQUAL) {
162 $nextVar = ($stackPtr + 1);
163 $previousVariable = ($stackPtr + 1);
182 $nextNumber = ($stackPtr + 1);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/
H A DArrayBracketSpacingSniff.php58 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
65 if ($tokens[$stackPtr]['code'] === T_OPEN_SQUARE_BRACKET) {
66 $openBracket = $stackPtr;
68 if (isset($tokens[$stackPtr]['bracket_opener']) === false) {
72 $openBracket = $tokens[$stackPtr]['bracket_opener'];
81 $prevType = $tokens[($stackPtr - 1)]['code'];
85 …$found = $phpcsFile->getTokensAsString($nonSpace, ($stackPtr - $nonSpace)).$tokens[$stackPtr]['…
93 $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
98 if ($tokens[$stackPtr]['code'] === T_OPEN_SQUARE_BRACKET) {
99 $nextType = $tokens[($stackPtr + 1)]['code'];
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/
H A DClassDefinitionOpeningBraceSpaceSniff.php61 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
65 if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
69 $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
72 $content = $tokens[($stackPtr - 1)]['content'];
74 if ($tokens[($stackPtr - 1)]['line'] < $tokens[$stackPtr]['line']) {
101 ($stackPtr + 1),
102 $tokens[$stackPtr]['bracket_closer']
109 if ($tokens[$next]['line'] === $tokens[$stackPtr]['line']) {
113 $phpcsFile->fixer->addNewline($stackPtr);
125 $phpcsFile->fixer->addNewline($stackPtr);
[all …]
H A DColonSpacingSniff.php55 * @param int $stackPtr The position in the stack where
60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
75 if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
77 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before');
79 $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
83 if ($tokens[($stackPtr + 1)]['code'] === T_SEMICOLON) {
88 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
92 $phpcsFile->fixer->addContent($stackPtr, ' ');
95 $content = $tokens[($stackPtr + 1)]['content'];
103 $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/
H A DEmbeddedPhpSniff.php61 $closeTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr);
65 $this->_validateInlineEmbeddedPhp($phpcsFile, $stackPtr);
91 $closingTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr);
105 for ($i = $stackPtr; $i <= $closingTag; $i++) {
123 $phpcsFile->fixer->addNewline($stackPtr);
135 $i = $stackPtr;
205 for ($first = ($stackPtr - 1); $first > 0; $first--) {
224 $found = ($tokens[$stackPtr]['column'] - 1);
332 for ($i = $stackPtr; $i <= $closeTag; $i++) {
344 if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/
H A DPropertyDeclarationSniff.php38 * @param int $stackPtr The position where the token was found.
42 protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
46 if ($tokens[$stackPtr]['content'][1] === '_') {
48 $data = array($tokens[$stackPtr]['content']);
49 $phpcsFile->addWarning($error, $stackPtr, 'Underscore', $data);
57 $prev = $phpcsFile->findPrevious($find, ($stackPtr - 1));
64 $phpcsFile->addError($error, $stackPtr, 'VarUsed');
70 $phpcsFile->addError($error, $stackPtr, 'Multiple');
76 $data = array($tokens[$stackPtr]['content']);
77 $phpcsFile->addError($error, $stackPtr, 'ScopeMissing', $data);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/
H A DDuplicateClassNameSniff.php58 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
70 $stackPtr = $phpcsFile->findNext($findTokens, ($stackPtr + 1));
71 while ($stackPtr !== false) {
72 if ($tokens[$stackPtr]['code'] === T_CLOSE_TAG) {
79 if ($tokens[$stackPtr]['code'] === T_NAMESPACE) {
86 ($stackPtr + 1),
91 … $namespace = trim($phpcsFile->getTokensAsString(($stackPtr + 1), ($nsEnd - $stackPtr - 1)));
92 $stackPtr = $nsEnd;
94 $nameToken = $phpcsFile->findNext(T_STRING, $stackPtr);
102 $type = strtolower($tokens[$stackPtr]['content']);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/
H A DInlineCommentSniff.php75 if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) {
78 ($stackPtr + 1),
126 ($stackPtr - 1),
135 if ($tokens[$stackPtr]['content'] === '/**') {
141 if ($tokens[$stackPtr]['content']{0} === '#') {
169 $comment = rtrim($tokens[$stackPtr]['content']);
235 $topComment = $stackPtr;
236 $lastComment = $stackPtr;
248 for ($i = $topComment; $i <= $stackPtr; $i++) {
258 $phpcsFile->fixer->replaceToken($stackPtr, '');
[all …]
H A DLongConditionClosingCommentSniff.php95 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
99 if (isset($tokens[$stackPtr]['scope_condition']) === false) {
104 $startCondition = $tokens[$tokens[$stackPtr]['scope_condition']];
105 $startBrace = $tokens[$tokens[$stackPtr]['scope_opener']];
106 $endBrace = $tokens[$stackPtr];
146 $stackPtr = $tokens[$nextToken]['scope_closer'];
147 $endBrace = $tokens[$stackPtr];
160 $stackPtr = $tokens[$nextToken]['scope_closer'];
161 $endBrace = $tokens[$stackPtr];
185 $phpcsFile->fixer->addContent($stackPtr, $expected);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/
H A DInlineCommentSniff.php50 * @param int $stackPtr The position of the current token
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
59 if ($tokens[$stackPtr]['content']{0} === '#') {
60 $phpcsFile->recordMetric($stackPtr, 'Inline comment style', '# ...');
66 $newComment = ltrim($tokens[$stackPtr]['content'], '# ');
68 $phpcsFile->fixer->replaceToken($stackPtr, $newComment);
70 } else if ($tokens[$stackPtr]['content']{0} === '/'
71 && $tokens[$stackPtr]['content']{1} === '/'
73 $phpcsFile->recordMetric($stackPtr, 'Inline comment style', '// ...');
74 } else if ($tokens[$stackPtr]['content']{0} === '/'
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/
H A DInlineIfDeclarationSniff.php55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
61 if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
62 $parens = $tokens[$stackPtr]['nested_parenthesis'];
79 $phpcsFile->addError($error, $stackPtr, 'NotSingleLine');
88 $phpcsFile->addError($error, $stackPtr, 'NoBrackets');
98 $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
100 $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' ');
112 if ($inlineElse !== ($stackPtr + 1)) {
116 $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
126 $phpcsFile->fixer->addContent($stackPtr, ' ');
[all …]
H A DControlSignatureSniff.php76 if (isset($tokens[($stackPtr + 1)]) === false) {
82 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
95 strtoupper($tokens[$stackPtr]['content']),
114 $opener = $tokens[$stackPtr]['scope_opener'];
160 $opener = $tokens[$stackPtr]['scope_opener'];
202 } else if ($tokens[$stackPtr]['code'] === T_WHILE) {
225 if ($tokens[$stackPtr]['code'] === T_DO) {
230 $closer = $tokens[$stackPtr]['scope_closer'];
231 } else if ($tokens[$stackPtr]['code'] === T_ELSE
232 || $tokens[$stackPtr]['code'] === T_ELSEIF
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/
H A DFunctionDeclarationSniff.php69 || $tokens[$stackPtr]['parenthesis_opener'] === null
70 || $tokens[$stackPtr]['parenthesis_closer'] === null
75 $openBracket = $tokens[$stackPtr]['parenthesis_opener'];
103 if ($tokens[$stackPtr]['code'] === T_FUNCTION) {
123 if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
200 if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
233 if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
248 $sniff->process($phpcsFile, $stackPtr);
270 for ($i = ($stackPtr - 1); $i >= 0; $i--) {
304 if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/
H A DIncludingFileSniff.php57 * @param int $stackPtr The position of the current token in the
62 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
69 $data = array($tokens[$stackPtr]['content']);
84 if (count($tokens[$stackPtr]['conditions']) !== 0) {
93 if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
94 foreach ($tokens[$stackPtr]['nested_parenthesis'] as $left => $right) {
110 $tokenCode = $tokens[$stackPtr]['code'];
118 $phpcsFile->fixer->replaceToken($stackPtr, 'include_once');
125 $phpcsFile->fixer->replaceToken($stackPtr, 'include');
135 $phpcsFile->fixer->replaceToken($stackPtr, 'require_once');
[all …]

123456789