Lines Matching refs:phpcsFile

57      * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
63 … protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope) argument
65 $tokens = $phpcsFile->getTokens();
72 … $fix = $phpcsFile->addFixableError($error, $calledClassName, 'IncorrectCase', $data);
74 $phpcsFile->fixer->replaceToken($calledClassName, 'self');
85 $fullQualifiedClassName = $this->getNamespaceOfScope($phpcsFile, $currScope);
92 $fullQualifiedClassName .= $phpcsFile->getDeclarationName($currScope);
94 $declarationName = $phpcsFile->getDeclarationName($currScope);
101 if ($phpcsFile->hasCondition($stackPtr, T_CLOSURE) === false) {
103 $fix = $phpcsFile->addFixableError($error, $calledClassName, 'NotUsed');
106 … $prev = $phpcsFile->findPrevious(array(T_NS_SEPARATOR, T_STRING), ($stackPtr - 1), null, true);
107 $phpcsFile->fixer->beginChangeset();
109 $phpcsFile->fixer->replaceToken($i, '');
112 $phpcsFile->fixer->replaceToken($stackPtr, 'self::');
113 $phpcsFile->fixer->endChangeset();
125 $fix = $phpcsFile->addFixableError($error, $calledClassName, 'SpaceBefore', $data);
128 $phpcsFile->fixer->replaceToken(($stackPtr - 1), '');
136 $fix = $phpcsFile->addFixableError($error, $calledClassName, 'SpaceAfter', $data);
139 $phpcsFile->fixer->replaceToken(($stackPtr + 1), '');
174 * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
180 protected function getNamespaceOfScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr) argument
183 $namespaceDeclaration = $phpcsFile->findPrevious(T_NAMESPACE, $stackPtr);
186 $endOfNamespaceDeclaration = $phpcsFile->findNext(T_SEMICOLON, $namespaceDeclaration);
188 $phpcsFile->getTokens(),