File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ abstract class Sniff implements PHPCS_Sniff {
5252 * normal file processing.
5353 */
5454 public function process ( File $ phpcsFile , $ stackPtr ) {
55- $ this ->init ( $ phpcsFile );
55+ $ this ->phpcsFile = $ phpcsFile ;
56+ $ this ->tokens = $ phpcsFile ->getTokens ();
57+
5658 return $ this ->process_token ( $ stackPtr );
5759 }
5860
@@ -67,21 +69,4 @@ public function process( File $phpcsFile, $stackPtr ) {
6769 * normal file processing.
6870 */
6971 abstract public function process_token ( $ stackPtr );
70-
71- /**
72- * Initialize the class for the current process.
73- *
74- * This method must be called by child classes before using many of the methods
75- * below.
76- *
77- * @since 0.4.0
78- *
79- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file currently being processed.
80- *
81- * @return void
82- */
83- protected function init ( File $ phpcsFile ) {
84- $ this ->phpcsFile = $ phpcsFile ;
85- $ this ->tokens = $ phpcsFile ->getTokens ();
86- }
8772}
You can’t perform that action at this time.
0 commit comments