diff --git a/Sniffs/Commenting/DocCommentAlignmentSniff.php b/Sniffs/Commenting/DocCommentAlignmentSniff.php index c58a586..06edc11 100644 --- a/Sniffs/Commenting/DocCommentAlignmentSniff.php +++ b/Sniffs/Commenting/DocCommentAlignmentSniff.php @@ -122,9 +122,9 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) $data = array($length); $phpcsFile->addError($error, $commentPointer, 'SpaceBeforeTag', $data); } else { - $length -= 1; - if ($length > 0 && $length % 4 !== 0) { - $error = 'Space between asterisk and tag must be dividable by 4'; + $remainingSpaces = $length - 1; + if ($remainingSpaces > 0 && $remainingSpaces % 4 !== 0) { + $error = 'Space between asterisk and tag must be divisible by 4'; $phpcsFile->addError($error, $commentPointer, 'SpaceBeforeTag'); } }