function File::addFixableWarning
Records a fixable warning against a specific token in the file.
Returns true if the warning was recorded and should be fixed.
Parameters
string $warning The error message.:
int $stackPtr The stack position where the error occurred.:
string $code A violation code unique to the sniff message.:
array $data Replacements for the warning message.:
int $severity The severity level for this warning. A value of 0: will be converted into the default severity level.
Return value
boolean
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Files/ File.php, line 833
Class
Namespace
PHP_CodeSniffer\FilesCode
public function addFixableWarning($warning, $stackPtr, $code, $data = [], $severity = 0) {
$recorded = $this->addWarning($warning, $stackPtr, $code, $data, $severity, true);
if ($recorded === true && $this->fixer->enabled === true) {
return true;
}
return false;
}