/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Operators/ |
H A D | IncrementDecrementUsageSniff.php | 66 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 …]
|
H A D | ValidLogicalOperatorsSniff.php | 54 * @param int $stackPtr The position of the current token in the 59 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 68 $operator = strtolower($tokens[$stackPtr]['content']); 78 $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data);
|
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ |
H A D | CommentedOutCodeSniff.php | 67 * @param int $stackPtr The position of the current token 72 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 77 if ($stackPtr > 0 && $tokens[$stackPtr]['code'] === $tokens[($stackPtr - 1)]['code']) { 82 if (substr($tokens[$stackPtr]['content'], 0, 6) === '//end ') { 91 for ($i = $stackPtr; $i < $phpcsFile->numTokens; $i++) { 92 if ($tokens[$stackPtr]['code'] !== $tokens[$i]['code']) { 231 $phpcsFile->addWarning($error, $stackPtr, 'Found', $data);
|
H A D | DisallowBooleanStatementSniff.php | 48 * @param int $stackPtr The position of the current token 53 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 56 if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) { 58 foreach ($tokens[$stackPtr]['nested_parenthesis'] as $open => $close) { 67 $phpcsFile->addError($error, $stackPtr, 'Found');
|
H A D | DisallowComparisonAssignmentSniff.php | 48 * @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 D | DisallowInlineIfSniff.php | 60 * @param int $stackPtr The position of the current token 65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 67 $phpcsFile->addError('Inline IF statements are not allowed', $stackPtr, 'Found');
|
H A D | DisallowMultipleAssignmentsSniff.php | 51 * @param int $stackPtr The position of the current token in the 56 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 61 …$function = $phpcsFile->findPrevious(array(T_FUNCTION, T_CLOSURE), ($stackPtr - 1), null, false, n… 65 if ($opener < $stackPtr && $closer > $stackPtr) { 78 for ($varToken = ($stackPtr - 1); $varToken >= 0; $varToken--) { 179 $phpcsFile->addError($error, $stackPtr, 'Found');
|
H A D | DisallowObEndFlushSniff.php | 50 * @param int $stackPtr The position of the current token in the 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 59 if ($tokens[$stackPtr]['content'] === 'ob_end_flush') { 60 …end_flush() is not allowed; use ob_get_contents() and ob_end_clean() instead', $stackPtr, 'Found');
|
H A D | DisallowSizeFunctionsInLoopsSniff.php | 75 * @param int $stackPtr The position of the current token 80 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 84 $openBracket = $tokens[$stackPtr]['parenthesis_opener']; 85 $closeBracket = $tokens[$stackPtr]['parenthesis_closer']; 87 if ($tokens[$stackPtr]['code'] === T_FOR) {
|
H A D | EmbeddedPhpSniff.php | 61 $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 …]
|
H A D | EvalSniff.php | 50 * @param int $stackPtr The position of the current token in 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 58 $phpcsFile->addWarning($error, $stackPtr, 'Discouraged');
|
H A D | GlobalKeywordSniff.php | 50 * @param int $stackPtr The position of the current token in the 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 59 $nextVar = $tokens[$phpcsFile->findNext(array(T_VARIABLE), $stackPtr)]; 63 $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data);
|
H A D | HeredocSniff.php | 53 * @param int $stackPtr The position of the current token in the 58 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 61 $phpcsFile->addError($error, $stackPtr, 'NotAllowed');
|
H A D | InnerFunctionsSniff.php | 50 * @param int $stackPtr The position of the current token in the 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 59 $function = $phpcsFile->getCondition($stackPtr, T_FUNCTION); 65 $class = $phpcsFile->getCondition($stackPtr, T_ANON_CLASS); 71 $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); 78 $phpcsFile->addError($error, $stackPtr, 'NotAllowed');
|
H A D | LowercasePHPFunctionsSniff.php | 69 * @param int $stackPtr The position of the current token in 74 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 79 $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); 90 … $prev = $phpcsFile->findPrevious(array(T_WHITESPACE, T_BITWISE_AND), ($stackPtr - 1), null, true); 119 $content = $tokens[$stackPtr]['content']; 131 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'CallUppercase', $data); 133 $phpcsFile->fixer->replaceToken($stackPtr, strtolower($content));
|
H A D | NonExecutableCodeSniff.php | 62 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/Squiz/Sniffs/Scope/ |
H A D | MemberVarScopeSniff.php | 40 * @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
|
H A D | MethodScopeSniff.php | 50 * @param int $stackPtr The position where the token was found. 55 … protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope) argument 59 $methodName = $phpcsFile->getDeclarationName($stackPtr); 65 if ($phpcsFile->hasCondition($stackPtr, T_FUNCTION) === true) { 71 for ($i = ($stackPtr - 1); $i > 0; $i--) { 72 if ($tokens[$i]['line'] < $tokens[$stackPtr]['line']) { 83 $phpcsFile->addError($error, $stackPtr, 'Missing', $data);
|
H A D | StaticThisUsageSniff.php | 53 * @param int $stackPtr The position of the current token in the 59 public function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope) argument 62 $function = $tokens[($stackPtr + 2)]; 72 $methodProps = $phpcsFile->getMethodProperties($stackPtr); 75 if (isset($tokens[$stackPtr]['scope_closer']) === false) { 81 $thisUsage = $stackPtr; 82 …ge = $phpcsFile->findNext(array(T_VARIABLE), ($thisUsage + 1), $tokens[$stackPtr]['scope_closer'],…
|
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ |
H A D | ConcatenationSpacingSniff.php | 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']; 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 …]
|
H A D | DoubleQuoteUsageSniff.php | 53 * @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 …]
|
H A D | EchoedStringsSniff.php | 51 * @param int $stackPtr The position of the current token in the 56 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 60 $firstContent = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); 63 $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'no'); 67 $end = $phpcsFile->findNext(array(T_SEMICOLON, T_CLOSE_TAG), $stackPtr, null, false); 72 $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'no'); 78 $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'no'); 82 $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'yes'); 84 …if (($phpcsFile->findNext(PHP_CodeSniffer_Tokens::$operators, $stackPtr, $end, false)) === false) { 87 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'HasBracket');
|
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ |
H A D | CastSpacingSniff.php | 50 * @param int $stackPtr The position of the current token in the 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 59 $content = $tokens[$stackPtr]['content']; 70 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContainsWhiteSpace', $data); 72 $phpcsFile->fixer->replaceToken($stackPtr, $expected);
|
H A D | ControlStructureSpacingSniff.php | 76 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 80 if (isset($tokens[$stackPtr]['parenthesis_opener']) === true 81 && isset($tokens[$stackPtr]['parenthesis_closer']) === true 83 $parenOpener = $tokens[$stackPtr]['parenthesis_opener']; 84 $parenCloser = $tokens[$stackPtr]['parenthesis_closer']; 126 if (isset($tokens[$stackPtr]['scope_closer']) === false) { 130 $scopeOpener = $tokens[$stackPtr]['scope_opener']; 131 $scopeCloser = $tokens[$stackPtr]['scope_closer']; 246 if ($tokens[$stackPtr]['code'] === T_IF) { 253 && $tokens[$stackPtr]['code'] === T_DO [all …]
|
H A D | FunctionClosingBraceSpaceSniff.php | 63 * @param int $stackPtr The position of the current token 68 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 72 if (isset($tokens[$stackPtr]['scope_closer']) === false) { 77 $closeBrace = $tokens[$stackPtr]['scope_closer']; 84 if ($tokens[$stackPtr]['scope_closer'] !== ($tokens[$stackPtr]['scope_opener'] + 1)) { 89 for ($i = ($tokens[$stackPtr]['scope_opener'] + 1); $i < $closeBrace; $i++) { 101 if ($phpcsFile->hasCondition($stackPtr, T_FUNCTION) === true 102 || $phpcsFile->hasCondition($stackPtr, T_CLOSURE) === true 103 || isset($tokens[$stackPtr]['nested_parenthesis']) === true 112 $afterKeyword = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); [all …]
|