Skip to content

Commit ef49c1b

Browse files
committed
AC-672: Create phpcs static check for LicenseTest
1 parent 6691ae8 commit ef49c1b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Magento2/Sniffs/Legacy/LicenseSniff.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class LicenseSniff implements Sniff
2222

2323
private const WARNING_CODE = 'FoundLegacyTextInCopyright';
2424

25+
private const LEGACY_TEXTS = ['Irubin Consulting Inc', 'DBA Varien', 'Magento Inc'];
26+
2527
/**
2628
* @inheritdoc
2729
*/
@@ -65,7 +67,7 @@ private function checkLicense(string $content, int $stackPtr, File $phpcsFile):
6567
if (stripos($commentContent, 'copyright') === false) {
6668
return;
6769
}
68-
foreach (['Irubin Consulting Inc', 'DBA Varien', 'Magento Inc'] as $legacyText) {
70+
foreach (self::LEGACY_TEXTS as $legacyText) {
6971
if (stripos($commentContent, $legacyText) !== false) {
7072
$phpcsFile->addWarning(
7173
sprintf("The copyright license contains legacy text: %s.", $legacyText),

0 commit comments

Comments
 (0)