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/
DOperatorSpacingSniff.php77 * @param int $stackPtr The position of the current token in
82 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
88 if ($tokens[$stackPtr]['code'] === T_EQUAL
89 || $tokens[$stackPtr]['code'] === T_MINUS
91 if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
92 $parenthesis = array_keys($tokens[$stackPtr]['nested_parenthesis']);
106 if ($tokens[$stackPtr]['code'] === T_EQUAL) {
108 if (isset($tokens[($stackPtr + 1)]) === true
109 && $tokens[($stackPtr + 1)]['code'] === T_BITWISE_AND
116 if (($tokens[$stackPtr]['code'] === T_INLINE_THEN
[all …]
DSuperfluousWhitespaceSniff.php79 * @param int $stackPtr The position of the current token in the
84 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
88 if ($tokens[$stackPtr]['code'] === T_OPEN_TAG) {
98 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
103 $stackPtr = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
107 if ($stackPtr === 0) {
111 for ($i = ($stackPtr - 1); $i >= 0; $i--) {
125 …phpcsFile->addFixableError('Additional whitespace found at start of file', $stackPtr, 'StartFile');
128 for ($i = 0; $i < $stackPtr; $i++) {
134 } else if ($tokens[$stackPtr]['code'] === T_CLOSE_TAG) {
[all …]
DObjectOperatorSpacingSniff.php57 * @param int $stackPtr The position of the current token
62 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'];
85 $phpcsFile->recordMetric($stackPtr, 'Spacing before object operator', $before);
86 $phpcsFile->recordMetric($stackPtr, 'Spacing after object operator', $after);
[all …]
DLogicalOperatorSpacingSniff.php60 * @param int $stackPtr The position of the current token
65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
70 if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
72 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBefore');
74 $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
77 $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
78 if ($tokens[$stackPtr]['line'] === $tokens[$prev]['line']
79 && strlen($tokens[($stackPtr - 1)]['content']) !== 1
81 $found = strlen($tokens[($stackPtr - 1)]['content']);
84 … $fix = $phpcsFile->addFixableError($error, $stackPtr, 'TooMuchSpaceBefore', $data);
[all …]
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'];
80 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'IncorrectSingle', $data);
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'],
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/
DAbstractVariableSniff.php93 * @param int $stackPtr The position where the token was found.
100 $stackPtr, argument
111 if ($stackPtr > $this->_endFunction) {
115 if ($tokens[$stackPtr]['code'] === T_FUNCTION
120 $methodProps = $phpcsFile->getMethodProperties($stackPtr);
128 = $phpcsFile->findNext(array(T_SEMICOLON), $stackPtr);
130 if (isset($tokens[$stackPtr]['scope_closer']) === false) {
132 $phpcsFile->addWarning($error, $stackPtr);
136 $this->_endFunction = $tokens[$stackPtr]['scope_closer'];
140 if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING
[all …]
DAbstractPatternSniff.php199 * @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;
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Tokenizers/
DCSS.php79 for ($stackPtr = 1; $stackPtr < $numTokens; $stackPtr++) {
80 $token = $tokens[$stackPtr];
101 echo "\tProcess token $stackPtr: $type => $content".PHP_EOL;
105 && $tokens[($stackPtr + 1)]['content'] === 'PHPCS_CSS_T_OPEN_TAG'
108 for ($stackPtr = ($stackPtr + 3); $stackPtr < $numTokens; $stackPtr++) {
109 if ($tokens[$stackPtr]['code'] === T_BITWISE_XOR
110 && $tokens[($stackPtr + 1)]['content'] === 'PHPCS_CSS_T_CLOSE_TAG'
114 $stackPtr += 2;
117 $content .= $tokens[$stackPtr]['content'];
246 array_splice($tokens, $stackPtr, 1, $commentTokens);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/
DLineLengthSniff.php68 * @param int $stackPtr The position of the current token in
73 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
95 * @param int $stackPtr The first token on the next line.
99 protected function checkLineLength(PHP_CodeSniffer_File $phpcsFile, $tokens, $stackPtr) argument
102 $stackPtr--;
104 if ($tokens[$stackPtr]['column'] === 1
105 && $tokens[$stackPtr]['length'] === 0
111 if ($tokens[$stackPtr]['column'] !== 1
112 && $tokens[$stackPtr]['content'] === $phpcsFile->eolChar
114 $stackPtr--;
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/
DConcatenationSpacingSniff.php65 * @param int $stackPtr The position of the current token in the
70 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'];
95 $phpcsFile->recordMetric($stackPtr, 'Spacing before string concat', $before);
96 $phpcsFile->recordMetric($stackPtr, 'Spacing after string concat', $after);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/
DFixer.php346 * @param int $stackPtr The position of the token in the token stack.
350 public function getTokenContent($stackPtr) argument
353 && isset($this->_changeset[$stackPtr]) === true
355 return $this->_changeset[$stackPtr];
357 return $this->_tokens[$stackPtr];
405 foreach ($this->_changeset as $stackPtr => $content) {
406 $success = $this->replaceToken($stackPtr, $content);
410 $applied[] = $stackPtr;
416 foreach ($applied as $stackPtr) {
417 $this->revertToken($stackPtr);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/
DIncrementDecrementUsageSniff.php57 * @param int $stackPtr The position of the current token
62 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
66 if ($tokens[$stackPtr]['code'] === T_INC || $tokens[$stackPtr]['code'] === T_DEC) {
67 $this->processIncDec($phpcsFile, $stackPtr);
69 $this->processAssignment($phpcsFile, $stackPtr);
79 * @param int $stackPtr The position of the current token
84 protected function processIncDec(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
90 if ($tokens[($stackPtr - 1)]['code'] === T_VARIABLE
91 || ($tokens[($stackPtr - 1)]['code'] === T_STRING
92 && $tokens[($stackPtr - 2)]['code'] === T_OBJECT_OPERATOR)
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/
DArrayBracketSpacingSniff.php53 * @param int $stackPtr The position of the current token in the
58 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'];
83 …$nonSpace = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 2), null, …
84 $expected = $tokens[$nonSpace]['content'].$tokens[$stackPtr]['content'];
85 …$found = $phpcsFile->getTokensAsString($nonSpace, ($stackPtr - $nonSpace)).$tokens[$stackPtr]['…
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/
DClassDefinitionOpeningBraceSpaceSniff.php56 * @param int $stackPtr The position in the stack where
61 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
65 if ($tokens[($stackPtr - 1)]['code'] !== T_WHITESPACE) {
67 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoneBefore');
69 $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
72 $content = $tokens[($stackPtr - 1)]['content'];
74 if ($tokens[($stackPtr - 1)]['line'] < $tokens[$stackPtr]['line']) {
85 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before', $data);
87 $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' ');
92 … $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
[all …]
DColonSpacingSniff.php55 * @param int $stackPtr The position in the stack where
60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
64 …$prev = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, true…
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) {
90 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoneAfter');
92 $phpcsFile->fixer->addContent($stackPtr, ' ');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/
DEmbeddedPhpSniff.php50 * @param int $stackPtr The position of the current token in the
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
61 $closeTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr);
62 if ($closeTag === false || $tokens[$stackPtr]['line'] !== $tokens[$closeTag]['line']) {
63 $this->_validateMultilineEmbeddedPhp($phpcsFile, $stackPtr);
65 $this->_validateInlineEmbeddedPhp($phpcsFile, $stackPtr);
75 * @param int $stackPtr The position of the current token in the
80 private function _validateMultilineEmbeddedPhp(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
84 $prevTag = $phpcsFile->findPrevious(T_OPEN_TAG, ($stackPtr - 1));
90 $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/
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');
67 $next = $phpcsFile->findNext(array(T_VARIABLE, T_SEMICOLON), ($stackPtr + 1));
70 $phpcsFile->addError($error, $stackPtr, 'Multiple');
73 $modifier = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$scopeModifiers, $stackPtr);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/
DInlineCommentSniff.php63 * @param int $stackPtr The position of the current token in the
68 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
75 if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) {
78 ($stackPtr + 1),
126 ($stackPtr - 1),
135 if ($tokens[$stackPtr]['content'] === '/**') {
137 $phpcsFile->addError($error, $stackPtr, 'DocBlock');
141 if ($tokens[$stackPtr]['content']{0} === '#') {
143 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStyle');
145 $comment = ltrim($tokens[$stackPtr]['content'], "# \t");
[all …]
DLongConditionClosingCommentSniff.php90 * @param int $stackPtr The position of the current token in the
95 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];
116 …$else = $phpcsFile->findPrevious(T_WHITESPACE, ($tokens[$stackPtr]['scope_condition'] - 1), null, …
124 $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
146 $stackPtr = $tokens[$nextToken]['scope_closer'];
147 $endBrace = $tokens[$stackPtr];
[all …]
DBlockCommentSniff.php60 * @param int $stackPtr The position of the current token in the
65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
80 if (substr($tokens[$stackPtr]['content'], 0, 2) !== '/*') {
86 if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) {
87 …$nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, tru…
106 …$prevToken = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null,…
112 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStart');
114 $phpcsFile->fixer->replaceToken($stackPtr, '/*');
117 $end = $tokens[$stackPtr]['comment_closer'];
129 $commentLines = array($stackPtr);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Classes/
DDuplicateClassNameSniff.php53 * @param int $stackPtr The position of the current token
58 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);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/
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', '# ...');
64 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStyle');
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', '// ...');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/
DInlineIfDeclarationSniff.php50 * @param int $stackPtr The position of the current token in the
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
61 if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
62 $parens = $tokens[$stackPtr]['nested_parenthesis'];
70 $else = $phpcsFile->findNext(T_INLINE_ELSE, ($stackPtr + 1));
77 if ($tokens[$statementEnd]['line'] !== $tokens[$stackPtr]['line']) {
79 $phpcsFile->addError($error, $stackPtr, 'NotSingleLine');
84 $contentBefore = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
85 $contentAfter = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
88 $phpcsFile->addError($error, $stackPtr, 'NoBrackets');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/
DFunctionDeclarationSniff.php58 * @param int $stackPtr The position of the current token
63 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
67 if (isset($tokens[$stackPtr]['parenthesis_opener']) === false
68 || isset($tokens[$stackPtr]['parenthesis_closer']) === false
69 || $tokens[$stackPtr]['parenthesis_opener'] === null
70 || $tokens[$stackPtr]['parenthesis_closer'] === null
75 $openBracket = $tokens[$stackPtr]['parenthesis_opener'];
76 $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
79 if ($tokens[($stackPtr + 1)]['content'] === $phpcsFile->eolChar) {
81 } else if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Files/
DIncludingFileSniff.php57 * @param int $stackPtr The position of the current token in the
62 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
66 …$nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, tru…
69 $data = array($tokens[$stackPtr]['content']);
70 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'BracketsNotRequired', $data);
84 if (count($tokens[$stackPtr]['conditions']) !== 0) {
93 if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
94 foreach ($tokens[$stackPtr]['nested_parenthesis'] as $left => $right) {
104 …$previous = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null, …
110 $tokenCode = $tokens[$stackPtr]['code'];
[all …]

123456789