Home
last modified time | relevance | path

Searched refs:stackPtr (Results 26 – 50 of 219) sorted by path

123456789

/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Debug/
H A DJSHintSniff.php57 * @param int $stackPtr The position in the stack where
63 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Files/
H A DByteOrderMarkSniff.php63 * @param int $stackPtr The position of the current token in
68 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
71 if ($stackPtr !== 0) {
79 $htmlBomHex = bin2hex(substr($tokens[$stackPtr]['content'], 0, $bomByteLength));
83 $phpcsFile->addError($error, $stackPtr, 'Found', $errorData);
84 $phpcsFile->recordMetric($stackPtr, 'Using byte order mark', 'yes');
89 $phpcsFile->recordMetric($stackPtr, 'Using byte order mark', 'no');
H A DEndFileNewlineSniff.php59 * @param int $stackPtr The position of the current token in
64 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
68 $stackPtr = ($phpcsFile->numTokens - 1);
70 if ($tokens[$stackPtr]['content'] === '') {
71 $stackPtr--;
75 $lastChars = substr($tokens[$stackPtr]['content'], ($eolCharLen * -1));
77 $phpcsFile->recordMetric($stackPtr, 'Newline at EOF', 'no');
80 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotFound');
82 $phpcsFile->fixer->addNewline($stackPtr);
85 $phpcsFile->recordMetric($stackPtr, 'Newline at EOF', 'yes');
H A DEndFileNoNewlineSniff.php59 * @param int $stackPtr The position of the current token in
64 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
68 $stackPtr = ($phpcsFile->numTokens - 1);
70 if ($tokens[$stackPtr]['content'] === '') {
71 $stackPtr--;
75 $lastChars = substr($tokens[$stackPtr]['content'], ($eolCharLen * -1));
78 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Found');
80 $newContent = substr($tokens[$stackPtr]['content'], 0, ($eolCharLen * -1));
81 $phpcsFile->fixer->replaceToken($stackPtr, $newContent);
H A DInlineHTMLSniff.php49 * @param int $stackPtr The position of the current token in
54 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
58 if (substr($tokens[$stackPtr]['content'], 0, 2) === '#!') {
63 $phpcsFile->addError($error, $stackPtr, 'Found');
H A DLineEndingsSniff.php68 * @param int $stackPtr The position of the current token in
73 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
79 $phpcsFile->recordMetric($stackPtr, 'EOL char', $found);
H A DLineLengthSniff.php102 $stackPtr--;
104 if ($tokens[$stackPtr]['column'] === 1
105 && $tokens[$stackPtr]['length'] === 0
111 if ($tokens[$stackPtr]['column'] !== 1
114 $stackPtr--;
117 $lineLength = ($tokens[$stackPtr]['column'] + $tokens[$stackPtr]['length'] - 1);
135 && ($tokens[$stackPtr]['code'] === T_COMMENT
136 || $tokens[$stackPtr]['code'] === T_DOC_COMMENT_STRING)
138 $oldLength = strlen($tokens[$stackPtr]['content']);
142 $nonBreakingLength = $tokens[$stackPtr]['length'];
[all …]
H A DLowercasedFilenameSniff.php46 * @param int $stackPtr The position of the current token in
51 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
66 $phpcsFile->addError($error, $stackPtr, 'NotFound', $data);
67 $phpcsFile->recordMetric($stackPtr, 'Lowercase filename', 'no');
69 $phpcsFile->recordMetric($stackPtr, 'Lowercase filename', 'yes');
H A DOneClassPerFileSniff.php46 * @param int $stackPtr The position of the current token in
51 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
53 $nextClass = $phpcsFile->findNext($this->register(), ($stackPtr + 1));
H A DOneInterfacePerFileSniff.php46 * @param int $stackPtr The position of the current token in
51 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
53 $nextInterface = $phpcsFile->findNext($this->register(), ($stackPtr + 1));
H A DOneTraitPerFileSniff.php46 * @param int $stackPtr The position of the current token in
51 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
53 $nextClass = $phpcsFile->findNext($this->register(), ($stackPtr + 1));
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Formatting/
H A DDisallowMultipleStatementsSniff.php48 * @param int $stackPtr The position of the current token in
53 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
57 … = $phpcsFile->findPrevious(array(T_SEMICOLON, T_OPEN_TAG, T_OPEN_TAG_WITH_ECHO), ($stackPtr - 1));
62 $phpcsFile->recordMetric($stackPtr, 'Multiple statements on same line', 'no');
67 if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
68 foreach ($tokens[$stackPtr]['nested_parenthesis'] as $bracket) {
81 if ($tokens[$prev]['line'] === $tokens[$stackPtr]['line']) {
82 $phpcsFile->recordMetric($stackPtr, 'Multiple statements on same line', 'yes');
85 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SameLine');
96 $phpcsFile->recordMetric($stackPtr, 'Multiple statements on same line', 'no');
H A DMultipleStatementAlignmentSniff.php80 * @param int $stackPtr The position of the current token
85 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
90 if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
98 $lastAssign = $this->checkAlignment($phpcsFile, $stackPtr);
108 * @param int $stackPtr The position of the current token
113 public function checkAlignment(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
119 $lastLine = $tokens[$stackPtr]['line'];
122 $lastCode = $stackPtr;
160 if ($assign !== $stackPtr) {
188 if ($assign !== $stackPtr) {
[all …]
H A DNoSpaceAfterCastSniff.php50 * @param int $stackPtr The position of the current token in
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
59 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
64 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceFound');
66 $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
H A DSpaceAfterCastSniff.php50 * @param int $stackPtr The position of the current token in
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
59 if ($tokens[($stackPtr + 1)]['code'] !== T_WHITESPACE) {
61 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpace');
63 $phpcsFile->fixer->addContent($stackPtr, ' ');
66 $phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', 0);
70 …$phpcsFile->recordMetric($stackPtr, 'Spacing after cast statement', $tokens[($stackPtr + 1)]['leng…
72 if ($tokens[($stackPtr + 1)]['length'] !== 1) {
74 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'TooMuchSpace');
76 $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
H A DSpaceAfterNotSniff.php58 * @param int $stackPtr The position of the current token in
63 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
68 if ($tokens[($stackPtr + 1)]['code'] === T_WHITESPACE) {
69 $spacing = $tokens[($stackPtr + 1)]['length'];
77 $fix = $phpcsFile->addFixableError($message, $stackPtr, 'Incorrect', array($spacing));
81 $phpcsFile->fixer->addContent($stackPtr, ' ');
83 $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' ');
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Functions/
H A DCallTimePassByReferenceSniff.php51 * @param int $stackPtr The position of the current token
56 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
65 $prev = $phpcsFile->findPrevious($findTokens, ($stackPtr - 1), null, true);
78 $functionName = $stackPtr;
H A DFunctionCallArgumentSpacingSniff.php55 * @param int $stackPtr The position of the current token in the
60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
69 $functionName = $stackPtr;
72 $functionKeyword = $phpcsFile->findPrevious($ignoreTokens, ($stackPtr - 1), null, true);
H A DOpeningFunctionBraceBsdAllmanSniff.php68 * @param int $stackPtr The position of the current token in the
73 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
77 if (isset($tokens[$stackPtr]['scope_opener']) === false) {
81 if (($tokens[$stackPtr]['code'] === T_FUNCTION
83 || ($tokens[$stackPtr]['code'] === T_CLOSURE
89 $openingBrace = $tokens[$stackPtr]['scope_opener'];
90 $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
91 if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
137 if ($next === $tokens[$stackPtr]['scope_closer']) {
158 $lineStart = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true);
[all …]
H A DOpeningFunctionBraceKernighanRitchieSniff.php69 * @param int $stackPtr The position of the current token in the
74 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
78 if (isset($tokens[$stackPtr]['scope_opener']) === false) {
82 if (($tokens[$stackPtr]['code'] === T_FUNCTION
84 || ($tokens[$stackPtr]['code'] === T_CLOSURE
90 $openingBrace = $tokens[$stackPtr]['scope_opener'];
91 $closeBracket = $tokens[$stackPtr]['parenthesis_closer'];
92 if ($tokens[$stackPtr]['code'] === T_CLOSURE) {
106 $phpcsFile->recordMetric($stackPtr, 'Function opening brace placement', 'new line');
135 $phpcsFile->recordMetric($stackPtr, 'Function opening brace placement', 'same line');
[all …]
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Metrics/
H A DCyclomaticComplexitySniff.php66 * @param int $stackPtr The position of the current token
71 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
78 if (isset($tokens[$stackPtr]['scope_opener']) === false) {
83 $start = $tokens[$stackPtr]['scope_opener'];
84 $end = $tokens[$stackPtr]['scope_closer'];
114 $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data);
121 $phpcsFile->addWarning($warning, $stackPtr, 'TooHigh', $data);
H A DNestingLevelSniff.php62 * @param int $stackPtr The position of the current token
67 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
72 if (isset($tokens[$stackPtr]['scope_opener']) === false) {
77 $start = $tokens[$stackPtr]['scope_opener'];
78 $end = $tokens[$stackPtr]['scope_closer'];
91 $nestingLevel = ($nestingLevel - $tokens[$stackPtr]['level'] - 1);
99 $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data);
106 $phpcsFile->addWarning($warning, $stackPtr, 'TooHigh', $data);
/plugin/icalevents/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/
H A DCamelCapsFunctionNameSniff.php111 * @param int $stackPtr The position where this token was
119 $methodName = $phpcsFile->getDeclarationName($stackPtr);
154 $methodProps = $phpcsFile->getMethodProperties($stackPtr);
162 $phpcsFile->addError($error, $stackPtr, 'ScopeNotCamelCaps', $data);
168 $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'no');
171 $phpcsFile->recordMetric($stackPtr, 'CamelCase method name', 'yes');
181 * @param int $stackPtr The position where this token was
188 $functionName = $phpcsFile->getDeclarationName($stackPtr);
212 $phpcsFile->addError($error, $stackPtr, 'NotCamelCaps', $errorData);
213 $phpcsFile->recordMetric($stackPtr, 'CamelCase function name', 'no');
[all …]
H A DConstructorNameSniff.php66 * @param int $stackPtr The position of the current token
74 $stackPtr, argument
83 $methodName = $phpcsFile->getDeclarationName($stackPtr);
88 $phpcsFile->addError($error, $stackPtr, 'OldStyle');
103 if (isset($tokens[$stackPtr]['scope_closer']) === false) {
107 $endFunctionIndex = $tokens[$stackPtr]['scope_closer'];
108 $startIndex = $stackPtr;
H A DUpperCaseConstantNameSniff.php50 * @param int $stackPtr The position of the current token in the
55 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
58 $constName = $tokens[$stackPtr]['content'];
61 if ($phpcsFile->hasCondition($stackPtr, T_START_HEREDOC) === true) {
67 && $tokens[($stackPtr - 1)]['code'] === T_DOUBLE_COLON
98 ($stackPtr - 1),
122 $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'upper');
169 $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'lower');
171 $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'mixed');
179 $phpcsFile->addError($error, $stackPtr, 'ConstantNotUpperCase', $data);
[all …]

123456789