Home
last modified time | relevance | path

Searched refs:stackPtr (Results 151 – 175 of 219) sorted by path

123456789

/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/
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 …]
H A DPostStatementCommentSniff.php60 * @param int $stackPtr The position of the current token in the
65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
69 if (substr($tokens[$stackPtr]['content'], 0, 2) !== '//') {
73 $commentLine = $tokens[$stackPtr]['line'];
74 $lastContent = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
95 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found');
97 $phpcsFile->fixer->addNewlineBefore($stackPtr);
H A DVariableCommentSniff.php41 * @param int $stackPtr The position of the current token
46 public function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
58 $commentEnd = $phpcsFile->findPrevious($ignore, ($stackPtr - 1), null, true);
63 $phpcsFile->addError('Missing member variable doc comment', $stackPtr, 'Missing');
68 …dError('You must use "/**" style comments for a member variable comment', $stackPtr, 'WrongStyle');
142 * @param int $stackPtr The position where the double quoted
147 protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
159 * @param int $stackPtr The position where the double quoted
164 protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/
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 …]
H A DElseIfDeclarationSniff.php51 * @param int $stackPtr The position of the current token in the
56 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
59 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotAllowed');
61 $phpcsFile->fixer->replaceToken($stackPtr, 'else if');
H A DForEachLoopDeclarationSniff.php65 * @param int $stackPtr The position of the current token in the
70 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
76 $openingBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr);
79 $phpcsFile->addWarning($error, $stackPtr, 'MissingOpenParenthesis');
85 $phpcsFile->addWarning($error, $stackPtr, 'MissingCloseParenthesis');
93 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpen');
123 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose');
154 $phpcsFile->addWarning($error, $stackPtr, 'MissingAs');
196 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterArrow');
215 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBeforeAs');
[all …]
H A DForLoopDeclarationSniff.php74 * @param int $stackPtr The position of the current token in the
79 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
85 $openingBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr);
88 $phpcsFile->addWarning($error, $stackPtr, 'NoOpenBracket');
96 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen');
112 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
126 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose');
160 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeFirst');
170 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfterFirst');
193 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeSecond');
[all …]
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 DLowercaseDeclarationSniff.php61 * @param int $stackPtr The position of the current token in
66 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
70 $content = $tokens[$stackPtr]['content'];
79 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'FoundUppercase', $data);
81 $phpcsFile->fixer->replaceToken($stackPtr, strtolower($content));
H A DSwitchDeclarationSniff.php68 * @param int $stackPtr The position of the current token in the
73 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
78 if (isset($tokens[$stackPtr]['scope_opener']) === false
79 || isset($tokens[$stackPtr]['scope_closer']) === false
84 $switch = $tokens[$stackPtr];
85 $nextCase = $stackPtr;
192 … $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($nextBreak - 1), $stackPtr, true);
198 $nextLine = $tokens[$tokens[$stackPtr]['scope_closer']]['line'];
200 for ($i = ($semicolon + 1); $i < $tokens[$stackPtr]['scope_closer']; $i++) {
303 $phpcsFile->addError($error, $stackPtr, 'MissingDefault');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Debug/
H A DJSLintSniff.php55 * @param int $stackPtr The position in the stack where
61 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
H A DJavaScriptLintSniff.php55 * @param int $stackPtr The position in the stack where
60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Files/
H A DFileExtensionSniff.php50 * @param int $stackPtr The position of the current token in the
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
60 $nextClass = $phpcsFile->findNext(array(T_CLASS, T_INTERFACE, T_TRAIT), $stackPtr);
63 $phpcsFile->recordMetric($stackPtr, 'File extension for class files', $extension);
67 $phpcsFile->addError($error, $stackPtr, 'ClassFound', $data);
70 $phpcsFile->recordMetric($stackPtr, 'File extension for non-class files', $extension);
73 $phpcsFile->addError($error, $stackPtr, 'NoClass');
/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/Functions/
H A DFunctionDeclarationArgumentSpacingSniff.php74 * @param int $stackPtr The position of the current token in the
79 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
83 if (isset($tokens[$stackPtr]['parenthesis_opener']) === false
84 || isset($tokens[$stackPtr]['parenthesis_closer']) === false
85 || $tokens[$stackPtr]['parenthesis_opener'] === null
86 || $tokens[$stackPtr]['parenthesis_closer'] === null
95 $openBracket = $tokens[$stackPtr]['parenthesis_opener'];
98 if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
99 …Next(T_USE, ($tokens[$openBracket]['parenthesis_closer'] + 1), $tokens[$stackPtr]['scope_opener']);
H A DFunctionDuplicateArgumentSniff.php50 * @param int $stackPtr The position of the current token
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
59 $openBracket = $tokens[$stackPtr]['parenthesis_opener'];
60 $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
H A DGlobalFunctionSniff.php50 * @param int $stackPtr The position of the current token in the
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
59 if (empty($tokens[$stackPtr]['conditions']) === true) {
60 $functionName = $phpcsFile->getDeclarationName($stackPtr);
69 $phpcsFile->addWarning($error, $stackPtr, 'Found', $data);
H A DLowercaseFunctionKeywordsSniff.php56 * @param int $stackPtr The position of the current token in
61 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
65 $content = $tokens[$stackPtr]['content'];
73 $phpcsFile->addError($error, $stackPtr, 'FoundUppercase', $data);
H A DMultiLineFunctionDeclarationSniff.php51 * @param int $stackPtr The position of the current token
62 $bracketsToCheck = array($stackPtr => $openBracket);
65 if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
75 foreach ($bracketsToCheck as $stackPtr => $openBracket) {
79 if ($tokens[$next]['line'] !== $tokens[$stackPtr]['line']) {
118 * @param int $stackPtr The position of the current token
125 public function processMultiLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $tokens) argument
128 parent::processMultiLineDeclaration($phpcsFile, $stackPtr, $tokens);
130 $openBracket = $tokens[$stackPtr]['parenthesis_opener'];
133 if ($tokens[$stackPtr]['code'] !== T_CLOSURE) {
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/NamingConventions/
H A DValidFunctionNameSniff.php43 * @param int $stackPtr The position where this token was
48 protected function processTokenOutsideScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
50 $functionName = $phpcsFile->getDeclarationName($stackPtr);
60 $phpcsFile->addError($error, $stackPtr, 'DoubleUnderscore', $errorData);
66 $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData);
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/Squiz/Sniffs/Objects/
H A DDisallowObjectStringIndexSniff.php53 * @param int $stackPtr The position of the current token
58 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
63 $index = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true);
87 $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true);
H A DObjectInstantiationSniff.php50 * @param int $stackPtr The position in the stack where
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
62 $prev = $phpcsFile->findPrevious($allowedTokens, ($stackPtr - 1), null, true);
75 $phpcsFile->addError($error, $stackPtr, 'NotAssigned');
H A DObjectMemberCommaSniff.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…
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/
H A DComparisonOperatorUsageSniff.php122 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
127 if ($tokens[$stackPtr]['code'] === T_INLINE_THEN) {
163 } else if ($tokens[$stackPtr]['code'] === T_FOR) {
164 if (isset($tokens[$stackPtr]['parenthesis_opener']) === false) {
168 $openingBracket = $tokens[$stackPtr]['parenthesis_opener'];
169 $closingBracket = $tokens[$stackPtr]['parenthesis_closer'];
177 if (isset($tokens[$stackPtr]['parenthesis_opener']) === false) {
181 $start = $tokens[$stackPtr]['parenthesis_opener'];
182 $end = $tokens[$stackPtr]['parenthesis_closer'];
225 $phpcsFile->addError($error, $stackPtr, 'ImplicitTrue');
[all …]

123456789