2) { $this->addWarning('Missing docblock for myMethod', $stackPtr, 'MissingDocblock'); } } } ?>
2) { $this->addWarning('Line length violation for $longVariableName', $stackPtr, 'LineLengthViolation'); } } } ?>In this example, a warning message is added if the line length exceeds the maximum length defined in the coding standard. The addWarning function takes three parameters as in the previous example. Package/Library: PHP_CodeSniffer.