/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/CSS/ |
H A D | EmptyClassDefinitionSniff.php | 55 * @param int $stackPtr The position in the stack where 60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 63 … $next = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true); 67 $phpcsFile->addError($error, $stackPtr, 'Found');
|
H A D | EmptyStyleDefinitionSniff.php | 55 * @param int $stackPtr The position in the stack where 60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 63 $next = $phpcsFile->findNext(array(T_WHITESPACE, T_COLON), ($stackPtr + 1), null, true); 65 … $tokens[$next]['code'] === T_SEMICOLON || $tokens[$next]['line'] !== $tokens[$stackPtr]['line']) { 67 $phpcsFile->addError($error, $stackPtr, 'Found');
|
H A D | ForbiddenStylesSniff.php | 103 * @param int $stackPtr The position of the current token in 108 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 111 $style = strtolower($tokens[$stackPtr]['content']); 136 $this->addError($phpcsFile, $stackPtr, $style, $pattern); 145 * @param int $stackPtr The position of the forbidden style 152 protected function addError($phpcsFile, $stackPtr, $style, $pattern=null) argument 171 …$fix = $phpcsFile->addFixableError($error.'; use %s instead', $stackPtr, $type.'WithAlternative', … 173 …$fix = $phpcsFile->addFixableWarning($error.'; use %s instead', $stackPtr, $type.'WithAlternative'… 177 $phpcsFile->fixer->replaceToken($stackPtr, $this->forbiddenStyles[$pattern]); 181 $phpcsFile->addError($error, $stackPtr, $type, $data); [all …]
|
H A D | IndentationSniff.php | 62 * @param int $stackPtr The position in the stack where 67 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
|
H A D | LowercaseStyleDefinitionSniff.php | 55 * @param int $stackPtr The position in the stack where 60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 63 $start = ($stackPtr + 1); 64 $end = ($tokens[$stackPtr]['bracket_closer'] - 1);
|
H A D | MissingColonSniff.php | 55 * @param int $stackPtr The position in the stack where 60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 63 $lastLine = $tokens[$stackPtr]['line']; 64 $end = $tokens[$stackPtr]['bracket_closer']; 68 $nested = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($stackPtr + 1), $end); 75 for ($i = ($stackPtr + 1); $i <= $end; $i++) {
|
H A D | NamedColoursSniff.php | 83 * @param int $stackPtr The position in the stack where 88 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 92 if ($tokens[($stackPtr - 1)]['code'] === T_HASH 93 || $tokens[($stackPtr - 1)]['code'] === T_STRING_CONCAT 99 if (isset($this->colourNames[strtolower($tokens[$stackPtr]['content'])]) === true) { 101 $phpcsFile->addError($error, $stackPtr, 'Forbidden');
|
H A D | OpacitySniff.php | 55 * @param int $stackPtr The position in the stack where 60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 64 if ($tokens[$stackPtr]['content'] !== 'opacity') { 68 $next = $phpcsFile->findNext(array(T_COLON, T_WHITESPACE), ($stackPtr + 1), null, true);
|
H A D | SemicolonSpacingSniff.php | 55 * @param int $stackPtr The position in the stack where 60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 64 $semicolon = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1)); 65 if ($semicolon === false || $tokens[$semicolon]['line'] !== $tokens[$stackPtr]['line']) { 67 $phpcsFile->addError($error, $stackPtr, 'NotAtEnd'); 75 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceFound', $data);
|
H A D | ShorthandSizeSniff.php | 71 * @param int $stackPtr The position in the stack where 76 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 81 $style = strtolower($tokens[$stackPtr]['content']); 87 $end = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1)); 88 $origContent = $phpcsFile->getTokensAsString(($stackPtr + 1), ($end - $stackPtr - 1)); 127 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotAllowed', $data); 135 $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 2), null, true); 172 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotUsed', $data); 179 $next = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 2), null, true);
|
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/ |
H A D | ClassDeclarationSniff.php | 48 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 D | ClassFileNameSniff.php | 54 * @param int $stackPtr The position of the current token in 59 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 69 $decName = $phpcsFile->findNext(T_STRING, $stackPtr); 74 ucfirst($tokens[$stackPtr]['content']), 75 $tokens[$stackPtr]['content'], 78 $phpcsFile->addError($error, $stackPtr, 'NoMatch', $data);
|
H A D | DuplicatePropertySniff.php | 55 * @param int $stackPtr The position of the current token in the 60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 70 …$next = $phpcsFile->findNext($wantedTokens, ($stackPtr + 1), $tokens[$stackPtr]['bracket_closer']); 71 while ($next !== false && $next < $tokens[$stackPtr]['bracket_closer']) { 89 … $next = $phpcsFile->findNext($wantedTokens, ($next + 1), $tokens[$stackPtr]['bracket_closer']);
|
H A D | LowercaseClassKeywordsSniff.php | 60 * @param int $stackPtr The position of the current token in 65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 69 $content = $tokens[$stackPtr]['content']; 78 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'FoundUppercase', $data); 80 $phpcsFile->fixer->replaceToken($stackPtr, strtolower($content));
|
H A D | SelfMemberReferenceSniff.php | 67 $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 D | ValidClassNameSniff.php | 54 * @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/Commenting/ |
H A D | BlockCommentSniff.php | 114 $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 D | ClassCommentSniff.php | 54 * @param int $stackPtr The position of the current token 59 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 65 $commentEnd = $phpcsFile->findPrevious($find, ($stackPtr - 1), null, true); 69 $phpcsFile->addError('Missing class doc comment', $stackPtr, 'Missing'); 70 $phpcsFile->recordMetric($stackPtr, 'Class has doc comment', 'no'); 74 $phpcsFile->recordMetric($stackPtr, 'Class has doc comment', 'yes'); 77 …$phpcsFile->addError('You must use "/**" style comments for a class comment', $stackPtr, 'WrongSty… 81 if ($tokens[$commentEnd]['line'] !== ($tokens[$stackPtr]['line'] - 1)) {
|
H A D | ClosingDeclarationCommentSniff.php | 59 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 …]
|
H A D | DocCommentAlignmentSniff.php | 60 * @param int $stackPtr The position of the current token 65 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 77 $nextToken = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true); 95 …$prevToken = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr - 1), null,… 103 $requiredColumn = ($tokens[$stackPtr]['column'] + 1); 104 $endComment = $tokens[$stackPtr]['comment_closer']; 105 for ($i = ($stackPtr + 1); $i <= $endComment; $i++) { 114 … $prev = $phpcsFile->findPrevious(T_DOC_COMMENT_WHITESPACE, ($i - 1), $stackPtr, true);
|
H A D | EmptyCatchCommentSniff.php | 50 * @param int $stackPtr The position of the current token in the 55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 59 $scopeStart = $tokens[$stackPtr]['scope_opener']; 60 …$firstContent = $phpcsFile->findNext(T_WHITESPACE, ($scopeStart + 1), $tokens[$stackPtr]['scope_cl…
|
H A D | FileCommentSniff.php | 59 * @param int $stackPtr The position of the current token 64 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument 69 $commentStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); 73 $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'yes'); 76 $phpcsFile->addError('Missing file doc comment', $stackPtr, 'Missing'); 77 $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'no'); 111 $phpcsFile->addError('Missing file doc comment', $stackPtr, 'Missing'); 112 $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'no'); 116 $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'yes'); 119 if ($tokens[$commentStart]['line'] > ($tokens[$stackPtr]['line'] + 1)) { [all …]
|
H A D | FunctionCommentSniff.php | 47 * @param int $stackPtr The position of the current token 53 protected function processReturn(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $commentStart) argument 58 $methodName = $phpcsFile->getDeclarationName($stackPtr); 124 if (isset($tokens[$stackPtr]['scope_closer']) === true) { 125 $endToken = $tokens[$stackPtr]['scope_closer']; 155 if (isset($tokens[$stackPtr]['scope_closer']) === true) { 156 $endToken = $tokens[$stackPtr]['scope_closer']; 183 * @param int $stackPtr The position of the current token 252 * @param int $stackPtr The position of the current token 360 $realParams = $phpcsFile->getMethodParameters($stackPtr); [all …]
|
H A D | FunctionCommentThrowTagSniff.php | 55 * @param int $stackPtr The position where the token was found. 60 … protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope) argument 64 $previousThrow = $phpcsFile->findPrevious(T_THROW, ($stackPtr - 1), $currScope); 91 $currPos = $stackPtr;
|
H A D | InlineCommentSniff.php | 75 if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) { 78 ($stackPtr + 1), 126 ($stackPtr - 1), 135 if ($tokens[$stackPtr]['content'] === '/**') { 141 if ($tokens[$stackPtr]['content']{0} === '#') { 169 $comment = rtrim($tokens[$stackPtr]['content']); 235 $topComment = $stackPtr; 236 $lastComment = $stackPtr; 248 for ($i = $topComment; $i <= $stackPtr; $i++) { 258 $phpcsFile->fixer->replaceToken($stackPtr, ''); [all …]
|