From d082a29288e7b5cae62dc6335ff2fee4c17c9edb Mon Sep 17 00:00:00 2001 From: Laurynas Gavienas Date: Fri, 21 Nov 2014 16:38:49 +0200 Subject: [PATCH] Fix grammar in error message (Closes #7) --- Sniffs/Commenting/DocCommentAlignmentSniff.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'); } }