File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 13
13
14
14
class LicenseSniff implements Sniff
15
15
{
16
- private const WARNING_CODE = 'FoundLegacyTextInCopyright ' ;
17
-
16
+ /**
17
+ * A list of tokenizers this sniff supports.
18
+ *
19
+ * @var array
20
+ */
18
21
public $ supportedTokenizers = [TokenizerSymbolsInterface::TOKENIZER_CSS , 'PHP ' ];
22
+
23
+ private const WARNING_CODE = 'FoundLegacyTextInCopyright ' ;
19
24
20
25
/**
21
26
* @inheritdoc
@@ -42,12 +47,14 @@ public function process(File $phpcsFile, $stackPtr)
42
47
if ($ tokens [$ stackPtr ]['code ' ] === T_INLINE_HTML ) {
43
48
$ content = $ phpcsFile ->getTokensAsString ($ stackPtr , 1 );
44
49
}
45
- if ($ content != null ){
46
- $ this ->checkLicense ($ content , $ stackPtr , $ phpcsFile );
50
+ if ($ content != null ) {
51
+ $ this ->checkLicense ($ content , $ stackPtr , $ phpcsFile );
47
52
}
48
53
}
49
54
50
55
/**
56
+ * Check that the copyright license does not contain legacy text
57
+ *
51
58
* @param string $content
52
59
* @param int $stackPtr
53
60
* @param File $phpcsFile
You can’t perform that action at this time.
0 commit comments