mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 08:47:45 +02:00
[ticket/16748] Enable code sniffing for static placement and adjust code
PHPBB3-16748
This commit is contained in:
@@ -51,7 +51,7 @@ class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff
|
||||
if (in_array($tokens[$stackPtr + 2]['code'], $disallowed_after_tokens))
|
||||
{
|
||||
$error = 'Access specifier (e.g. public) should not follow static scope attribute. Encountered "' . $tokens[$stackPtr + 2]['content'] . '" after static';
|
||||
$phpcsFile->addWarning($error, $stackPtr, 'InvalidStaticFunctionDeclaration', [], 1);
|
||||
$phpcsFile->addError($error, $stackPtr, 'InvalidStaticFunctionDeclaration');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user