/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/ |
H A D | EmbeddedPhpSniff.php | 57 $tokens = $phpcsFile->getTokens(); 82 $tokens = $phpcsFile->getTokens(); 93 … $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($closingTag + 1), $phpcsFile->numTokens, true); 122 $phpcsFile->fixer->beginChangeset(); 125 $phpcsFile->fixer->endChangeset(); 201 … $phpcsFile->fixer->addContentBefore($stackPtr, $phpcsFile->eolChar.str_repeat(' ', $padding)); 253 $phpcsFile->fixer->endChangeset(); 263 $phpcsFile->fixer->endChangeset(); 297 $phpcsFile->fixer->endChangeset(); 315 $tokens = $phpcsFile->getTokens(); [all …]
|
H A D | EvalSniff.php | 49 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 58 $phpcsFile->addWarning($error, $stackPtr, 'Discouraged');
|
H A D | GlobalKeywordSniff.php | 49 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 57 $tokens = $phpcsFile->getTokens(); 59 $nextVar = $tokens[$phpcsFile->findNext(array(T_VARIABLE), $stackPtr)]; 63 $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data);
|
H A D | HeredocSniff.php | 52 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 58 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 61 $phpcsFile->addError($error, $stackPtr, 'NotAllowed');
|
H A D | InnerFunctionsSniff.php | 49 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 57 $tokens = $phpcsFile->getTokens(); 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 | 68 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 74 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 76 $tokens = $phpcsFile->getTokens(); 79 $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); 90 … $prev = $phpcsFile->findPrevious(array(T_WHITESPACE, T_BITWISE_AND), ($stackPtr - 1), null, true); 131 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'CallUppercase', $data); 133 $phpcsFile->fixer->replaceToken($stackPtr, strtolower($content));
|
H A D | NonExecutableCodeSniff.php | 56 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 62 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 64 $tokens = $phpcsFile->getTokens(); 93 $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); 95 $next = $phpcsFile->findNext(T_WHITESPACE, ($next + 1), null, true); 116 $end = $phpcsFile->findEndOfStatement($stackPtr); 117 $next = $phpcsFile->findNext( 138 $phpcsFile->addWarning($warning, $i, 'Unreachable', $data); 214 $end = ($phpcsFile->numTokens - 1); 219 for ($start = ($stackPtr + 1); $start < $phpcsFile->numTokens; $start++) { [all …]
|
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Scope/ |
H A D | MemberVarScopeSniff.php | 39 * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found. 44 protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 46 $tokens = $phpcsFile->getTokens(); 61 $phpcsFile->addError($error, $stackPtr, 'Missing', $data); 70 * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found. 75 protected function processVariable(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 87 * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found. 92 protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
|
H A D | MethodScopeSniff.php | 49 * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found. 55 … protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope) argument 57 $tokens = $phpcsFile->getTokens(); 59 $methodName = $phpcsFile->getDeclarationName($stackPtr); 65 if ($phpcsFile->hasCondition($stackPtr, T_FUNCTION) === true) { 83 $phpcsFile->addError($error, $stackPtr, 'Missing', $data);
|
H A D | StaticThisUsageSniff.php | 52 * @param PHP_CodeSniffer_File $phpcsFile The current file being scanned. 59 public function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope) argument 61 $tokens = $phpcsFile->getTokens(); 72 $methodProps = $phpcsFile->getMethodProperties($stackPtr); 82 …while (($thisUsage = $phpcsFile->findNext(array(T_VARIABLE), ($thisUsage + 1), $tokens[$stackPtr][… 88 $phpcsFile->addError($error, $thisUsage, 'Found');
|
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Strings/ |
H A D | ConcatenationSpacingSniff.php | 64 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 70 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 74 $tokens = $phpcsFile->getTokens(); 123 $phpcsFile->fixer->beginChangeset(); 124 $phpcsFile->fixer->replaceToken(($stackPtr - 1), $padding); 132 $phpcsFile->fixer->endChangeset(); 134 $phpcsFile->fixer->addContent(($stackPtr - 1), $padding); 140 $phpcsFile->fixer->beginChangeset(); 141 $phpcsFile->fixer->replaceToken(($stackPtr + 1), $padding); 149 $phpcsFile->fixer->endChangeset(); [all …]
|
H A D | DoubleQuoteUsageSniff.php | 52 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 58 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 60 $tokens = $phpcsFile->getTokens(); 72 while ($i < $phpcsFile->numTokens 99 $phpcsFile->addError($error, $stackPtr, 'ContainsVar', $data); 135 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotRequired', $data); 138 $phpcsFile->fixer->beginChangeset(); 141 $phpcsFile->fixer->replaceToken($stackPtr, "'$innerContent'"); 143 $phpcsFile->fixer->replaceToken($lastStringToken, ''); 147 $phpcsFile->fixer->endChangeset();
|
H A D | EchoedStringsSniff.php | 50 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 56 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 58 $tokens = $phpcsFile->getTokens(); 70 $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($end - 1), null, true); 82 $phpcsFile->recordMetric($stackPtr, 'Brackets around echoed strings', 'yes'); 87 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'HasBracket'); 89 $phpcsFile->fixer->beginChangeset(); 90 $phpcsFile->fixer->replaceToken($firstContent, ''); 92 $phpcsFile->fixer->addContent(($firstContent - 1), ' '); 95 $phpcsFile->fixer->replaceToken($prev, ''); [all …]
|
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ |
H A D | CastSpacingSniff.php | 49 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 57 $tokens = $phpcsFile->getTokens(); 70 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'ContainsWhiteSpace', $data); 72 $phpcsFile->fixer->replaceToken($stackPtr, $expected);
|
H A D | ControlStructureSpacingSniff.php | 78 $tokens = $phpcsFile->getTokens(); 155 $phpcsFile->fixer->beginChangeset(); 158 $phpcsFile->fixer->replaceToken($i, ''); 163 $phpcsFile->fixer->endChangeset(); 168 $lastContent = $phpcsFile->findPrevious( 202 $phpcsFile->fixer->beginChangeset(); 216 $phpcsFile->fixer->endChangeset(); 221 $trailingContent = $phpcsFile->findNext( 231 $nextCode = $phpcsFile->findNext( 290 $phpcsFile->fixer->beginChangeset(); [all …]
|
H A D | FunctionClosingBraceSpaceSniff.php | 62 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 70 $tokens = $phpcsFile->getTokens(); 88 $phpcsFile->fixer->beginChangeset(); 90 $phpcsFile->fixer->replaceToken($i, ''); 93 $phpcsFile->fixer->endChangeset(); 127 $phpcsFile->fixer->beginChangeset(); 135 $phpcsFile->fixer->replaceToken($i, ''); 145 $phpcsFile->fixer->endChangeset(); 160 $phpcsFile->fixer->beginChangeset(); 165 $phpcsFile->fixer->replaceToken($i, $phpcsFile->eolChar); [all …]
|
H A D | FunctionOpeningBraceSpaceSniff.php | 62 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 68 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 70 $tokens = $phpcsFile->getTokens(); 78 $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($openBrace + 1), null, true); 94 $fix = $phpcsFile->addFixableError($error, $openBrace, 'SpacingAfter', $data); 96 $phpcsFile->fixer->beginChangeset(); 102 $phpcsFile->fixer->replaceToken($i, ''); 105 $phpcsFile->fixer->addNewline($openBrace); 106 $phpcsFile->fixer->endChangeset();
|
H A D | FunctionSpacingSniff.php | 64 $tokens = $phpcsFile->getTokens(); 74 $closer = $phpcsFile->findNext(T_SEMICOLON, $stackPtr); 87 if ($nextLineToken === ($phpcsFile->numTokens - 1)) { 118 $phpcsFile->fixer->beginChangeset(); 121 … $phpcsFile->fixer->addContentBefore($i, str_repeat($phpcsFile->eolChar, $this->spacing)); 125 $phpcsFile->fixer->replaceToken($i, ''); 128 $phpcsFile->fixer->endChangeset(); 231 $phpcsFile->fixer->beginChangeset(); 233 $phpcsFile->fixer->replaceToken($i, ''); 236 … $phpcsFile->fixer->replaceToken($i, str_repeat($phpcsFile->eolChar, $this->spacing)); [all …]
|
H A D | LanguageConstructSpacingSniff.php | 59 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 67 $tokens = $phpcsFile->getTokens(); 80 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'IncorrectSingle', $data); 82 $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); 91 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data); 93 $phpcsFile->fixer->addContent($stackPtr, ' ');
|
H A D | LogicalOperatorSpacingSniff.php | 59 * @param PHP_CodeSniffer_File $phpcsFile The current file being checked. 65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 67 $tokens = $phpcsFile->getTokens(); 72 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBefore'); 74 $phpcsFile->fixer->addContentBefore($stackPtr, ' '); 77 $prev = $phpcsFile->findPrevious(T_WHITESPACE, ($stackPtr - 1), null, true); 86 $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' '); 94 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceAfter'); 96 $phpcsFile->fixer->addContent($stackPtr, ' '); 99 $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); [all …]
|
H A D | MemberVarSpacingSniff.php | 39 * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found. 46 $tokens = $phpcsFile->getTokens(); 53 $prev = $phpcsFile->findPrevious($ignore, ($stackPtr - 1), null, true); 65 $phpcsFile->fixer->beginChangeset(); 77 $phpcsFile->fixer->replaceToken($i, ''); 80 $phpcsFile->fixer->addNewline($prev); 81 $phpcsFile->fixer->endChangeset(); 113 $phpcsFile->fixer->beginChangeset(); 120 $phpcsFile->fixer->addNewline(($i - 1)); 124 $phpcsFile->fixer->replaceToken($i, ''); [all …]
|
H A D | ObjectOperatorSpacingSniff.php | 56 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 62 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 64 $tokens = $phpcsFile->getTokens(); 88 $this->checkSpacingBeforeOperator($phpcsFile, $stackPtr, $before); 89 $this->checkSpacingAfterOperator($phpcsFile, $stackPtr, $after); 97 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 111 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before'); 113 $phpcsFile->fixer->replaceToken(($stackPtr - 1), ''); 127 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 141 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'After'); [all …]
|
H A D | OperatorSpacingSniff.php | 76 * @param PHP_CodeSniffer_File $phpcsFile The current file being checked. 82 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 84 $tokens = $phpcsFile->getTokens(); 127 if ($phpcsFile->isReference($stackPtr) === true) { 136 $phpcsFile->fixer->addContentBefore($stackPtr, ' '); 165 $phpcsFile->fixer->addContent($stackPtr, ' '); 247 $phpcsFile->fixer->addContentBefore($stackPtr, ' '); 271 $phpcsFile->fixer->beginChangeset(); 275 $phpcsFile->fixer->replaceToken($i, ''); 281 $phpcsFile->fixer->endChangeset(); [all …]
|
H A D | PropertyLabelSpacingSniff.php | 58 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 64 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 66 $tokens = $phpcsFile->getTokens(); 68 $colon = $phpcsFile->findNext(T_COLON, ($stackPtr + 1)); 72 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before'); 74 $phpcsFile->fixer->replaceToken(($stackPtr + 1), ''); 80 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'After'); 83 $phpcsFile->fixer->replaceToken(($colon + 1), ' '); 85 $phpcsFile->fixer->addContent($colon, ' ');
|
H A D | ScopeClosingBraceSniff.php | 49 * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document. 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 57 $tokens = $phpcsFile->getTokens(); 69 … $lineStart = $phpcsFile->findFirstOnLine(array(T_WHITESPACE, T_INLINE_HTML), $stackPtr, true); 76 …$lastContent = $phpcsFile->findPrevious(array(T_INLINE_HTML, T_WHITESPACE, T_OPEN_TAG), ($scopeEnd… 79 $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'ContentBefore'); 81 $phpcsFile->fixer->addNewlineBefore($scopeEnd); 88 … $lineStart = $phpcsFile->findFirstOnLine(array(T_WHITESPACE, T_INLINE_HTML), $scopeEnd, true); 100 $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'Indent', $data); 104 $phpcsFile->fixer->addContentBefore($lineStart, str_repeat(' ', $diff)); [all …]
|