Home
last modified time | relevance | path

Searched refs:stackPtr (Results 26 – 50 of 219) sorted by relevance

123456789

/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/
H A DBlockCommentSniff.php114 $phpcsFile->fixer->replaceToken($stackPtr, '/*');
117 $end = $tokens[$stackPtr]['comment_closer'];
129 $commentLines = array($stackPtr);
130 $nextComment = $stackPtr;
131 $lastLine = $tokens[$stackPtr]['line'];
132 $commentString = $tokens[$stackPtr]['content'];
161 $phpcsFile->fixer->replaceToken($stackPtr, '');
184 $content = trim($tokens[$stackPtr]['content']);
201 $tokens[$stackPtr]['content'],
210 $starColumn = ($tokens[$stackPtr]['column'] + 3);
[all …]
H A DClosingDeclarationCommentSniff.php59 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
63 if ($tokens[$stackPtr]['code'] === T_FUNCTION) {
64 $methodProps = $phpcsFile->getMethodProperties($stackPtr);
78 if ($phpcsFile->hasCondition($stackPtr, T_INTERFACE) === true) {
82 if (isset($tokens[$stackPtr]['scope_closer']) === false) {
84 $phpcsFile->addWarning($error, $stackPtr, 'Abstract');
88 $decName = $phpcsFile->getDeclarationName($stackPtr);
90 } else if ($tokens[$stackPtr]['code'] === T_CLASS) {
96 if (isset($tokens[$stackPtr]['scope_closer']) === false) {
98 $data = array($tokens[$stackPtr]['content']);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/PHP/
H A DDisallowShortOpenTagSniff.php60 * @param int $stackPtr The position of the current token
65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
68 $token = $tokens[$stackPtr];
76 …if (isset($tokens[($stackPtr + 1)]) === true && $tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE)…
81 $phpcsFile->fixer->replaceToken($stackPtr, $correctOpening);
99 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
100 $phpcsFile->fixer->replaceToken($stackPtr, '<?php echo ');
102 $phpcsFile->fixer->replaceToken($stackPtr, '<?php echo');
118 for ($i = $stackPtr; $i < $phpcsFile->numTokens; $i++) {
125 if ($i !== $stackPtr) {
[all …]
H A DDisallowAlternativePHPTagsSniff.php82 * @param int $stackPtr The position of the current token
87 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
90 $openTag = $tokens[$stackPtr];
112 $phpcsFile->addError($error, $stackPtr, $errorCode, $data);
116 $this->addChangeset($phpcsFile, $tokens, $stackPtr, $closer);
126 $nextVar = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
134 $closer = $this->findClosingTag($phpcsFile, $tokens, $stackPtr, '%>');
137 $phpcsFile->addError($error, $stackPtr, 'ASPShortOpenTagFound', $data);
157 $phpcsFile->addError($error, $stackPtr, 'ScriptOpenTagFound', $data);
215 * @param int $stackPtr The position of the current token
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Zend/Sniffs/NamingConventions/
H A DValidVariableNameSniff.php52 * @param int $stackPtr The position of the current token in the
57 protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
60 $varName = ltrim($tokens[$stackPtr]['content'], '$');
136 $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $data);
140 $phpcsFile->addWarning($warning, $stackPtr, 'ContainsNumbers', $data);
150 * @param int $stackPtr The position of the current token in the
155 protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
158 $varName = ltrim($tokens[$stackPtr]['content'], '$');
159 $memberProps = $phpcsFile->getMemberProperties($stackPtr);
185 $phpcsFile->addError($error, $stackPtr, 'MemberVarNotCamelCaps', $data);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Formatting/
H A DOperatorBracketSniff.php65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
77 … if ($tokens[$stackPtr]['code'] === T_BITWISE_AND && $phpcsFile->isReference($stackPtr) === true) {
83 if ($tokens[$stackPtr]['code'] === T_MINUS) {
101 if (($number - $stackPtr) !== 1) {
151 if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
211 if ($endBracket < $stackPtr) {
223 $this->addMissingBracketsError($phpcsFile, $stackPtr);
227 $this->addMissingBracketsError($phpcsFile, $stackPtr);
242 $this->addMissingBracketsError($phpcsFile, $stackPtr);
251 $this->addMissingBracketsError($phpcsFile, $stackPtr);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/
H A DClassDefinitionClosingBraceSpaceSniff.php55 * @param int $stackPtr The position in the stack where
60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
64 $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
70 $found = (($tokens[$next]['line'] - $tokens[$stackPtr]['line']) - 1);
78 $phpcsFile->fixer->addNewline($stackPtr);
82 for ($i = ($stackPtr + 1); $i < ($nextContent - 1); $i++) {
98 ($stackPtr - 1),
99 $tokens[$stackPtr]['bracket_opener']
111 if ($tokens[$prev]['line'] === $tokens[$stackPtr]['line']) {
113 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContentBeforeClose');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/
H A DSpaceAfterCastSniff.php50 * @param int $stackPtr The position of the current token in
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
59 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
61 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpace');
63 $phpcsFile->fixer->addContent($stackPtr, ' ');
66 $phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', 0);
70 …$phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', $tokens[($stackPtr + 1)]['leng…
72 if ($tokens[($stackPtr + 1)]['length'] !== 1) {
74 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'TooMuchSpace');
76 $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/
H A DUpperCaseConstantNameSniff.php50 * @param int $stackPtr The position of the current token in the
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
58 $constName = $tokens[$stackPtr]['content'];
61 if ($phpcsFile->hasCondition($stackPtr, T_START_HEREDOC) === true) {
67 && $tokens[($stackPtr - 1)]['code'] === T_DOUBLE_COLON
98 ($stackPtr - 1),
122 $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'upper');
169 $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'lower');
171 $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'mixed');
179 $phpcsFile->addError($error, $stackPtr, 'ConstantNotUpperCase', $data);
[all …]
H A DCamelCapsFunctionNameSniff.php111 * @param int $stackPtr The position where this token was
119 $methodName = $phpcsFile->getDeclarationName($stackPtr);
154 $methodProps = $phpcsFile->getMethodProperties($stackPtr);
162 $phpcsFile->addError($error, $stackPtr, 'ScopeNotCamelCaps', $data);
168 $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'no');
171 $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'yes');
181 * @param int $stackPtr The position where this token was
188 $functionName = $phpcsFile->getDeclarationName($stackPtr);
212 $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData);
213 $phpcsFile->recordMetric($stackPtr, 'CamelCase function name', 'no');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/
H A DSelfMemberReferenceSniff.php67 $calledClassName = ($stackPtr - 1);
101 if ($phpcsFile->hasCondition($stackPtr, T_CLOSURE) === false) {
108 for ($i = ($prev + 1); $i < $stackPtr; $i++) {
112 $phpcsFile->fixer->replaceToken($stackPtr, 'self::');
121 if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
122 $found = strlen($tokens[($stackPtr - 1)]['content']);
128 $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
132 if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
133 $found = strlen($tokens[($stackPtr + 1)]['content']);
139 $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
[all …]
H A DClassDeclarationSniff.php48 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
51 parent::process($phpcsFile, $stackPtr);
77 parent::processOpen($phpcsFile, $stackPtr);
81 if ($tokens[($stackPtr - 1)]['code'] === T_WHITESPACE) {
82 $prevContent = $tokens[($stackPtr - 1)]['content'];
87 if ($tokens[($stackPtr - 2)]['code'] !== T_ABSTRACT
88 && $tokens[($stackPtr - 2)]['code'] !== T_FINAL
122 if (isset($tokens[$stackPtr]['scope_closer']) === false) {
126 $closeBrace = $tokens[$stackPtr]['scope_closer'];
156 $data = array($tokens[$stackPtr]['content']);
[all …]
H A DValidClassNameSniff.php54 * @param int $stackPtr The position of the current token in the
59 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
63 if (isset($tokens[$stackPtr]['scope_opener']) === false) {
65 $data = array($tokens[$stackPtr]['content']);
66 $phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $data);
73 $opener = $tokens[$stackPtr]['scope_opener'];
74 $nameStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), $opener, true);
85 $type = ucfirst($tokens[$stackPtr]['content']);
91 $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $data);
92 $phpcsFile->recordMetric($stackPtr, 'CamelCase class name', 'no');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/
H A DDoubleQuoteUsageSniff.php53 * @param int $stackPtr The position of the current token
58 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
63 if ($tokens[$stackPtr]['code'] === $tokens[($stackPtr - 1)]['code']) {
67 $workingString = $tokens[$stackPtr]['content'];
68 $lastStringToken = $stackPtr;
70 $i = ($stackPtr + 1);
73 && $tokens[$i]['code'] === $tokens[$stackPtr]['code']
93 if ($tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING) {
99 $phpcsFile->addError($error, $stackPtr, 'ContainsVar', $data);
141 $phpcsFile->fixer->replaceToken($stackPtr, "'$innerContent'");
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/
H A DValidVariableNameSniff.php52 * @param int $stackPtr The position of the current token in the
57 protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
60 $varName = ltrim($tokens[$stackPtr]['content'], '$');
130 $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $data);
140 * @param int $stackPtr The position of the current token in the
145 protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
149 $varName = ltrim($tokens[$stackPtr]['content'], '$');
150 $memberProps = $phpcsFile->getMemberProperties($stackPtr);
169 $phpcsFile->addError($error, $stackPtr, 'PublicHasUnderscore', $data);
182 $phpcsFile->addError($error, $stackPtr, 'MemberNotCamelCaps', $errorData);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Channels/
H A DIncludeSystemSniff.php80 $stackPtr, argument
89 ($stackPtr - 1),
115 $class = $phpcsFile->getCondition($stackPtr, T_CLASS);
129 for ($i = ($currScope + 1); $i < $stackPtr; $i++) {
145 if ($phpcsFile->hasCondition($stackPtr, T_CLASS) === true) {
169 if ($phpcsFile->hasCondition($stackPtr, T_CLASS) === true) {
226 if ($tokens[$stackPtr]['code'] === T_EXTENDS) {
260 for ($i = 0; $i < $stackPtr; $i++) {
285 if ($tokens[$stackPtr]['code'] === T_EXTENDS) {
312 $stackPtr argument
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/
H A DEndFileNewlineSniff.php59 * @param int $stackPtr The position of the current token in
64 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
68 $stackPtr = ($phpcsFile->numTokens - 1);
70 if ($tokens[$stackPtr]['content'] === '') {
71 $stackPtr--;
75 $lastChars = substr($tokens[$stackPtr]['content'], ($eolCharLen * -1));
77 $phpcsFile->recordMetric($stackPtr, 'Newline at EOF', 'no');
80 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotFound');
82 $phpcsFile->fixer->addNewline($stackPtr);
85 $phpcsFile->recordMetric($stackPtr, 'Newline at EOF', 'yes');
H A DEndFileNoNewlineSniff.php59 * @param int $stackPtr The position of the current token in
64 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
68 $stackPtr = ($phpcsFile->numTokens - 1);
70 if ($tokens[$stackPtr]['content'] === '') {
71 $stackPtr--;
75 $lastChars = substr($tokens[$stackPtr]['content'], ($eolCharLen * -1));
78 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found');
80 $newContent = substr($tokens[$stackPtr]['content'], 0, ($eolCharLen * -1));
81 $phpcsFile->fixer->replaceToken($stackPtr, $newContent);
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/
H A DDisallowComparisonAssignmentSniff.php48 * @param int $stackPtr The position of the current token
53 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
58 $function = $phpcsFile->findPrevious(T_FUNCTION, ($stackPtr - 1), null, false, null, true);
62 if ($opener < $stackPtr && $closer > $stackPtr) {
70 ($stackPtr + 1),
88 $next = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true);
97 $endStatement = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1));
98 if ($tokens[$stackPtr]['conditions'] !== $tokens[$endStatement]['conditions']) {
104 for ($i = ($stackPtr + 1); $i < $endStatement; $i++) {
109 $phpcsFile->addError($error, $stackPtr, 'AssignedComparison');
[all …]
H A DNonExecutableCodeSniff.php62 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
74 for ($i = ($stackPtr - 1); $i > 0; $i--) {
92 if ($tokens[$stackPtr]['code'] === T_RETURN) {
110 if (isset($tokens[$stackPtr]['scope_opener']) === true) {
111 $owner = $tokens[$stackPtr]['scope_condition'];
116 $end = $phpcsFile->findEndOfStatement($stackPtr);
128 for ($i = ($stackPtr + 1); $i < $next; $i++) {
180 && $tokens[$stackPtr]['code'] === T_BREAK
191 for ($i = ($stackPtr + 1); $i < $closer; $i++) {
209 if ($tokens[$stackPtr]['code'] === T_BREAK) {
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/
H A DClassDeclarationSniff.php49 parent::process($phpcsFile, $stackPtr);
57 $this->processOpen($phpcsFile, $stackPtr);
58 $this->processClose($phpcsFile, $stackPtr);
79 $prevContent = $tokens[($stackPtr - 1)]['content'];
101 || $tokens[($stackPtr - 2)]['code'] === T_FINAL
119 for ($i = ($stackPtr - 1); $i > 0; $i--) {
135 $gap = $tokens[($stackPtr + 1)]['content'];
169 $openingBrace = $tokens[$stackPtr]['scope_opener'];
214 if ($tokens[$stackPtr]['code'] === T_INTERFACE) {
417 $closeBrace = $tokens[$stackPtr]['scope_closer'];
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/
H A DMemberVarScopeSniff.php40 * @param int $stackPtr The position where the token was found.
44 protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
49 for ($i = ($stackPtr - 1); $i > 0; $i--) {
50 if ($tokens[$i]['line'] < $tokens[$stackPtr]['line']) {
60 $data = array($tokens[$stackPtr]['content']);
61 $phpcsFile->addError($error, $stackPtr, 'Missing', $data);
71 * @param int $stackPtr The position where the token was found.
75 protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
88 * @param int $stackPtr The position where the token was found.
92 protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/
H A DUseDeclarationSniff.php48 * @param int $stackPtr The position of the current token in
53 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
55 if ($this->_shouldIgnoreUse($phpcsFile, $stackPtr) === true) {
62 if ($tokens[($stackPtr + 1)]['content'] !== ' ') {
66 $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
79 … $baseUse = rtrim($phpcsFile->getTokensAsString($stackPtr, ($next - $stackPtr)));
85 for ($i = $stackPtr; $i <= $next; $i++) {
127 $prev = $phpcsFile->findPrevious(T_NAMESPACE, ($stackPtr - 1));
132 $phpcsFile->addError($error, $stackPtr, 'UseAfterNamespace');
137 $nextUse = $phpcsFile->findNext(T_USE, ($stackPtr + 1));
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/
H A DValidFunctionNameSniff.php83 * @param int $stackPtr The position where this token was
91 $methodName = $phpcsFile->getDeclarationName($stackPtr);
121 $methodProps = $phpcsFile->getMethodProperties($stackPtr);
150 $phpcsFile->addError($error, $stackPtr, 'PublicUnderscore', $data);
171 $phpcsFile->addError($error, $stackPtr, 'ScopeNotCamelCaps', $data);
174 $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData);
187 * @param int $stackPtr The position where this token was
194 $functionName = $phpcsFile->getDeclarationName($stackPtr);
243 $phpcsFile->addError($error, $stackPtr, 'FunctionNoCapital', $errorData);
251 $phpcsFile->addError($error, $stackPtr, 'FunctionInvalid', $errorData);
[all …]
H A DValidVariableNameSniff.php41 * @param int $stackPtr The position of the current token
46 protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
50 $memberProps = $phpcsFile->getMemberProperties($stackPtr);
55 $memberName = ltrim($tokens[$stackPtr]['content'], '$');
69 $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $data);
80 $phpcsFile->addError($error, $stackPtr, 'PublicUnderscore', $data);
91 * @param int $stackPtr The position where the token was found.
95 protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
108 * @param int $stackPtr The position where the token was found.
112 protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument

123456789