Home
last modified time | relevance | path

Searched refs:phpcsFile (Results 1 – 25 of 231) sorted by relevance

12345678910

/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Namespaces/
H A DUseDeclarationSniff.php59 $tokens = $phpcsFile->getTokens();
77 $phpcsFile->fixer->replaceToken($next, ';'.$phpcsFile->eolChar.'use ');
82 $phpcsFile->fixer->beginChangeset();
108 $phpcsFile->fixer->replaceToken($next, ';'.$phpcsFile->eolChar);
121 $phpcsFile->fixer->endChangeset();
129 $first = $phpcsFile->findNext(T_NAMESPACE, 1);
167 $phpcsFile->fixer->addNewline($end);
169 $phpcsFile->fixer->beginChangeset();
178 $phpcsFile->fixer->addNewline($end);
179 $phpcsFile->fixer->endChangeset();
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/
H A DEmbeddedPhpSniff.php57 $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 …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Classes/
H A DClassDeclarationSniff.php49 parent::process($phpcsFile, $stackPtr);
52 $tokens = $phpcsFile->getTokens();
57 $this->processOpen($phpcsFile, $stackPtr);
58 $this->processClose($phpcsFile, $stackPtr);
74 $tokens = $phpcsFile->getTokens();
80 if ($prevContent !== $phpcsFile->eolChar) {
183 … $phpcsFile->fixer->substrToken($i, 0, (strlen($phpcsFile->eolChar) * -1));
256 $prev = $phpcsFile->findPrevious(
414 $tokens = $phpcsFile->getTokens();
433 … $phpcsFile->fixer->replaceToken($closeBrace, $phpcsFile->eolChar.$tokens[$closeBrace]['content']);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Arrays/
H A DArrayDeclarationSniff.php58 $tokens = $phpcsFile->getTokens();
93 $phpcsFile->fixer->beginChangeset();
98 $phpcsFile->fixer->endChangeset();
116 $phpcsFile->fixer->beginChangeset();
121 $phpcsFile->fixer->endChangeset();
152 $tokens = $phpcsFile->getTokens();
249 $phpcsFile->fixer->endChangeset();
316 $tokens = $phpcsFile->getTokens();
498 $nextContent = $phpcsFile->findNext(
533 $phpcsFile->fixer->beginChangeset();
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Commenting/
H A DFileCommentSniff.php108 $tokens = $phpcsFile->getTokens();
154 $nextToken = $phpcsFile->findNext(
207 return ($phpcsFile->numTokens + 1);
224 $tokens = $phpcsFile->getTokens();
321 $tokens = $phpcsFile->getTokens();
363 $tokens = $phpcsFile->getTokens();
416 $tokens = $phpcsFile->getTokens();
460 $tokens = $phpcsFile->getTokens();
490 $tokens = $phpcsFile->getTokens();
531 $tokens = $phpcsFile->getTokens();
[all …]
H A DFunctionCommentSniff.php47 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
55 $tokens = $phpcsFile->getTokens();
103 $this->processReturn($phpcsFile, $stackPtr, $commentStart);
104 $this->processThrows($phpcsFile, $stackPtr, $commentStart);
105 $this->processParams($phpcsFile, $stackPtr, $commentStart);
122 $tokens = $phpcsFile->getTokens();
171 $tokens = $phpcsFile->getTokens();
211 $tokens = $phpcsFile->getTokens();
339 $phpcsFile->eolChar.$padding
344 $phpcsFile->fixer->replaceToken($i, '');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Commenting/
H A DDocCommentSniff.php63 $tokens = $phpcsFile->getTokens();
85 $phpcsFile->fixer->beginChangeset();
88 $phpcsFile->fixer->endChangeset();
107 $phpcsFile->fixer->beginChangeset();
116 $phpcsFile->fixer->endChangeset();
132 $phpcsFile->fixer->beginChangeset();
143 $phpcsFile->fixer->endChangeset();
215 … $phpcsFile->fixer->addContent($prev, $phpcsFile->eolChar.$indent.'*'.$phpcsFile->eolChar);
216 $phpcsFile->fixer->endChangeset();
228 $prev = $phpcsFile->findPrevious(
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/
H A DSuperfluousWhitespaceSniff.php86 $tokens = $phpcsFile->getTokens();
93 if ($phpcsFile->tokenizerType !== 'PHP') {
102 if ($phpcsFile->fixer->enabled === true) {
127 $phpcsFile->fixer->beginChangeset();
132 $phpcsFile->fixer->endChangeset();
139 if ($phpcsFile->tokenizerType === 'PHP') {
179 if ($phpcsFile->fixer->enabled === true) {
187 $phpcsFile->fixer->beginChangeset();
192 $phpcsFile->fixer->endChangeset();
218 … $phpcsFile->fixer->replaceToken($stackPtr, rtrim($tokenContent).$phpcsFile->eolChar);
[all …]
H A DFunctionClosingBraceSpaceSniff.php62 * @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 DControlStructureSpacingSniff.php78 $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 …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Classes/
H A DClassDeclarationSniff.php51 parent::process($phpcsFile, $stackPtr);
53 $tokens = $phpcsFile->getTokens();
77 parent::processOpen($phpcsFile, $stackPtr);
79 $tokens = $phpcsFile->getTokens();
83 if ($prevContent !== $phpcsFile->eolChar) {
121 $tokens = $phpcsFile->getTokens();
143 if ($nextContent === $phpcsFile->numTokens) {
169 if ($prevContent !== $phpcsFile->eolChar) {
198 $phpcsFile->fixer->addNewlineBefore($first);
200 $phpcsFile->fixer->beginChangeset();
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Functions/
H A DFunctionDeclarationArgumentSpacingSniff.php73 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
79 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
81 $tokens = $phpcsFile->getTokens();
96 $this->processBracket($phpcsFile, $openBracket);
102 $this->processBracket($phpcsFile, $openBracket);
112 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
120 $tokens = $phpcsFile->getTokens();
209 if ($phpcsFile->isReference($checkToken) === true) {
222 if ($phpcsFile->isReference($nextToken) === true) {
258 $phpcsFile->fixer->addContent($comma, ' ');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Functions/
H A DFunctionCallSignatureSniff.php95 $tokens = $phpcsFile->getTokens();
126 $phpcsFile->fixer->beginChangeset();
128 $phpcsFile->fixer->replaceToken($i, '');
134 $phpcsFile->fixer->endChangeset();
144 $phpcsFile->fixer->beginChangeset();
152 $phpcsFile->fixer->endChangeset();
270 $phpcsFile->fixer->beginChangeset();
302 $phpcsFile->fixer->endChangeset();
330 $start = $phpcsFile->findStartOfStatement($stackPtr);
370 $phpcsFile->fixer->addContent(
[all …]
H A DFunctionDeclarationSniff.php57 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
65 $tokens = $phpcsFile->getTokens();
93 $phpcsFile->fixer->addContent($stackPtr, ' ');
248 $sniff->process($phpcsFile, $stackPtr);
284 $prev = $phpcsFile->findPrevious(
310 $prev = $phpcsFile->findPrevious(
356 $phpcsFile->fixer->replaceToken($i, '');
407 $phpcsFile->fixer->beginChangeset();
408 $phpcsFile->fixer->addContent($prev, ' {');
409 $phpcsFile->fixer->replaceToken($opener, '');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/ControlStructures/
H A DSwitchDeclarationSniff.php54 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
62 $tokens = $phpcsFile->getTokens();
108 $phpcsFile->fixer->addContent($nextCase, ' ');
140 … $phpcsFile->fixer->addContentBefore($next, $phpcsFile->eolChar.$padding);
142 $phpcsFile->fixer->beginChangeset();
151 $phpcsFile->fixer->addNewLineBefore($i);
152 $phpcsFile->fixer->endChangeset();
166 $phpcsFile->fixer->addNewLine($prev);
194 $nextCode = $phpcsFile->findNext(
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/
H A DForEachLoopDeclarationSniff.php64 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
70 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
74 $tokens = $phpcsFile->getTokens();
95 $phpcsFile->fixer->replaceToken(($openingBracket + 1), '');
151 $asToken = $phpcsFile->findNext(T_AS, $openingBracket);
154 $phpcsFile->addWarning($error, $stackPtr, 'MissingAs');
169 $phpcsFile->fixer->replaceToken($asToken, $expected);
198 $phpcsFile->fixer->addContent($doubleArrow, ' ');
217 $phpcsFile->fixer->addContentBefore($asToken, ' ');
226 $phpcsFile->fixer->replaceToken(($asToken - 1), ' ');
[all …]
H A DInlineIfDeclarationSniff.php49 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
57 $tokens = $phpcsFile->getTokens();
79 $phpcsFile->addError($error, $stackPtr, 'NotSingleLine');
88 $phpcsFile->addError($error, $stackPtr, 'NoBrackets');
98 $phpcsFile->fixer->addContentBefore($stackPtr, ' ');
100 $phpcsFile->fixer->replaceToken(($stackPtr - 1), ' ');
116 $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
126 $phpcsFile->fixer->addContent($stackPtr, ' ');
157 $phpcsFile->fixer->addContent($inlineElse, ' ');
[all …]
H A DForLoopDeclarationSniff.php73 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
79 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
83 $tokens = $phpcsFile->getTokens();
85 $openingBracket = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr);
88 $phpcsFile->addWarning($error, $stackPtr, 'NoOpenBracket');
98 $phpcsFile->fixer->replaceToken(($openingBracket + 1), '');
116 $phpcsFile->fixer->addContent($openingBracket, $padding);
128 $phpcsFile->fixer->replaceToken(($closingBracket - 1), '');
162 $phpcsFile->fixer->replaceToken(($firstSemicolon - 1), '');
172 $phpcsFile->fixer->addContent($firstSemicolon, ' ');
[all …]
H A DControlSignatureSniff.php66 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
74 $tokens = $phpcsFile->getTokens();
102 $phpcsFile->fixer->addContent($stackPtr, ' ');
128 $phpcsFile->fixer->addContent($closer, ' ');
130 $phpcsFile->fixer->beginChangeset();
152 $phpcsFile->fixer->endChangeset();
188 $phpcsFile->fixer->beginChangeset();
195 $phpcsFile->fixer->replaceToken($i, '');
198 $phpcsFile->fixer->addContent($opener, $phpcsFile->eolChar);
199 $phpcsFile->fixer->endChangeset();
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PSR2/Sniffs/Files/
H A DEndFileNewlineSniff.php47 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
56 return ($phpcsFile->numTokens + 1);
60 $tokens = $phpcsFile->getTokens();
61 $lastToken = ($phpcsFile->numTokens - 1);
73 $phpcsFile->fixer->addNewline($lastToken);
77 return ($phpcsFile->numTokens + 1);
100 $phpcsFile->fixer->beginChangeset();
103 $phpcsFile->fixer->replaceToken($i, '');
106 $phpcsFile->fixer->replaceToken($lastToken, $phpcsFile->eolChar);
107 $phpcsFile->fixer->endChangeset();
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/Classes/
H A DClassDeclarationSniff.php60 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
66 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
68 $tokens = $phpcsFile->getTokens();
86 $phpcsFile->fixer->beginChangeset();
91 $phpcsFile->fixer->addNewlineBefore($curlyBrace);
92 $phpcsFile->fixer->endChangeset();
108 $phpcsFile->fixer->beginChangeset();
114 $phpcsFile->fixer->replaceToken($i, '');
117 $phpcsFile->fixer->endChangeset();
128 $phpcsFile->fixer->addNewline($curlyBrace);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Commenting/
H A DFileCommentSniff.php58 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
64 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
66 $this->currentFile = $phpcsFile;
68 $tokens = $phpcsFile->getTokens();
74 return ($phpcsFile->numTokens + 1);
78 return ($phpcsFile->numTokens + 1);
83 $nextToken = $phpcsFile->findNext(
113 return ($phpcsFile->numTokens + 1);
116 $phpcsFile->recordMetric($stackPtr, 'File has doc comment', 'yes');
121 $phpcsFile->addError($error, $stackPtr, 'SpacingAfterOpen');
[all …]
H A DClosingDeclarationCommentSniff.php53 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
59 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
61 $tokens = $phpcsFile->getTokens();
64 $methodProps = $phpcsFile->getMethodProperties($stackPtr);
88 $decName = $phpcsFile->getDeclarationName($stackPtr);
117 $phpcsFile->fixer->beginChangeset();
119 $phpcsFile->fixer->replaceToken($i, '');
124 $phpcsFile->fixer->replaceToken($next, $comment.$phpcsFile->eolChar);
125 $phpcsFile->fixer->endChangeset();
130 … $phpcsFile->fixer->replaceToken($closingBracket, '}'.$comment.$phpcsFile->eolChar);
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/
H A DInlineControlStructureSniff.php83 $tokens = $phpcsFile->getTokens();
115 if ($phpcsFile->tokenizerType === 'JS') {
142 $phpcsFile->fixer->beginChangeset();
152 $phpcsFile->fixer->addContent($closer, ' {');
154 $phpcsFile->fixer->addContent($closer, ' { ');
175 $phpcsFile->fixer->rollbackChangeset();
228 if ($end === $phpcsFile->numTokens) {
261 $addedContent = $phpcsFile->eolChar;
296 $addedContent .= $phpcsFile->eolChar;
303 $phpcsFile->fixer->replaceToken($end, '');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PEAR/Sniffs/ControlStructures/
H A DMultiLineConditionSniff.php67 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
73 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
75 $tokens = $phpcsFile->getTokens();
97 $phpcsFile->fixer->replaceToken(($openBracket + 1), '');
99 $phpcsFile->fixer->replaceToken(($openBracket + 1), '');
136 $phpcsFile->fixer->beginChangeset();
139 $phpcsFile->fixer->endChangeset();
184 $phpcsFile->fixer->replaceToken($i, $spaces);
197 $phpcsFile->fixer->beginChangeset();
200 $phpcsFile->fixer->endChangeset();
[all …]

12345678910