From 300e3511be942740bb80efc47c226a030a8ff557 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 4 Apr 2017 14:45:40 +0200 Subject: [PATCH] TASK: Remove example sniff * As this is just an example and we want to have a clean state. * Also cleanup imported interface which is not in use anymore. --- src/CodeSniffer/Tokenizers/TypoScript.php | 1 - .../TypoScript/ViewConfigurationSniff.php | 55 ------------------- 2 files changed, 56 deletions(-) delete mode 100644 src/Standards/Typo3Update/Sniffs/TypoScript/ViewConfigurationSniff.php diff --git a/src/CodeSniffer/Tokenizers/TypoScript.php b/src/CodeSniffer/Tokenizers/TypoScript.php index 98e2520..a6b8670 100644 --- a/src/CodeSniffer/Tokenizers/TypoScript.php +++ b/src/CodeSniffer/Tokenizers/TypoScript.php @@ -19,7 +19,6 @@ * 02110-1301, USA. */ -use Helmich\TypoScriptParser\Tokenizer\TokenInterface; use Helmich\TypoScriptParser\Tokenizer\Tokenizer; /** diff --git a/src/Standards/Typo3Update/Sniffs/TypoScript/ViewConfigurationSniff.php b/src/Standards/Typo3Update/Sniffs/TypoScript/ViewConfigurationSniff.php deleted file mode 100644 index e101fa4..0000000 --- a/src/Standards/Typo3Update/Sniffs/TypoScript/ViewConfigurationSniff.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ - public function register() - { - return [ - TokenInterface::TYPE_OBJECT_IDENTIFIER, - ]; - } - - /** - * Processes the tokens that this sniff is interested in. - * - * This is the default implementation, as most of the time next T_STRING is - * the class name. This way only the register method has to be registered - * in default cases. - * - * @param PhpCsFile $phpcsFile The file where the token was found. - * @param int $stackPtr The position in the stack where - * the token was found. - * - * @return void - */ - public function process(PhpCsFile $phpcsFile, $stackPtr) - { - $tokens = $phpcsFile->getTokens(); - $token = $tokens[$stackPtr]; - - if ($token['content'] === 'layoutRootPath') { - $phpcsFile->addWarning( - 'Do not use %s anymore, use %s instead.', - $stackPtr, - 'legacy', - [ - $token['content'], - 'layoutRootPaths' - ] - ); - } - } -}