File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1313
1414class LicenseSniff implements Sniff
1515{
16- private const WARNING_CODE = 'FoundLegacyTextInCopyright ' ;
17-
16+ /**
17+ * A list of tokenizers this sniff supports.
18+ *
19+ * @var array
20+ */
1821 public $ supportedTokenizers = [TokenizerSymbolsInterface::TOKENIZER_CSS , 'PHP ' ];
22+
23+ private const WARNING_CODE = 'FoundLegacyTextInCopyright ' ;
1924
2025 /**
2126 * @inheritdoc
@@ -42,12 +47,14 @@ public function process(File $phpcsFile, $stackPtr)
4247 if ($ tokens [$ stackPtr ]['code ' ] === T_INLINE_HTML ) {
4348 $ content = $ phpcsFile ->getTokensAsString ($ stackPtr , 1 );
4449 }
45- if ($ content != null ){
46- $ this ->checkLicense ($ content , $ stackPtr , $ phpcsFile );
50+ if ($ content != null ) {
51+ $ this ->checkLicense ($ content , $ stackPtr , $ phpcsFile );
4752 }
4853 }
4954
5055 /**
56+ * Check that the copyright license does not contain legacy text
57+ *
5158 * @param string $content
5259 * @param int $stackPtr
5360 * @param File $phpcsFile
You can’t perform that action at this time.
0 commit comments