@@ -228,15 +228,15 @@ private function validateParameterAnnotationForArgumentExists(
228228 $ phpcsFile ->addError (
229229 '{@inheritdoc} does not import parameter annotation ' ,
230230 $ stackPtr ,
231- 'MethodArguments '
231+ 'InheritDoc '
232232 );
233233 } elseif ($ this ->validateCommentBlockExists ($ phpcsFile , $ previousCommentClosePtr , $ stackPtr )
234234 && !$ inheritdocAnnotationWithoutBracesExists
235235 ) {
236236 $ phpcsFile ->addError (
237237 'Missing @param for argument in method annotation ' ,
238238 $ stackPtr ,
239- 'MethodArguments '
239+ 'ParamMissing '
240240 );
241241 }
242242 }
@@ -260,13 +260,13 @@ private function validateCommentBlockDoesnotHaveExtraParameterAnnotation(
260260 $ phpcsFile ->addError (
261261 'Extra @param found in method annotation ' ,
262262 $ stackPtr ,
263- 'MethodArguments '
263+ 'ExtraParam '
264264 );
265265 } elseif ($ argumentsCount > 0 && $ argumentsCount != $ parametersCount && $ parametersCount != 0 ) {
266266 $ phpcsFile ->addError (
267267 '@param is not found for one or more params in method annotation ' ,
268268 $ stackPtr ,
269- 'MethodArguments '
269+ 'ParamMissing '
270270 );
271271 }
272272 }
@@ -290,7 +290,7 @@ private function validateArgumentNameInParameterAnnotationExists(
290290 $ parameterNames = $ this ->getMethodParameters ($ paramDefinitions );
291291 if (!in_array ($ methodArguments [$ ptr ], $ parameterNames )) {
292292 $ error = $ methodArguments [$ ptr ] . ' parameter is missing in method annotation ' ;
293- $ phpcsFile ->addError ($ error , $ stackPtr , 'MethodArguments ' );
293+ $ phpcsFile ->addError ($ error , $ stackPtr , 'ArgumentMissing ' );
294294 }
295295 }
296296
@@ -314,7 +314,7 @@ private function validateParameterPresentInMethodSignature(
314314 $ phpcsFile ->addError (
315315 $ paramDefinitionsArguments . ' parameter is missing in method arguments signature ' ,
316316 $ paramPointers [$ ptr ],
317- 'MethodArguments '
317+ 'ArgumentMissing '
318318 );
319319 }
320320 }
@@ -343,7 +343,7 @@ private function validateParameterOrderIsCorrect(
343343 $ phpcsFile ->addError (
344344 $ methodArguments [$ ptr ] . ' parameter is not in order ' ,
345345 $ paramPointers [$ ptr ],
346- 'MethodArguments '
346+ 'ParamOrder '
347347 );
348348 }
349349 }
@@ -386,7 +386,7 @@ private function validateDuplicateAnnotationDoesnotExists(
386386 $ phpcsFile ->addError (
387387 $ value . ' duplicate found in method annotation ' ,
388388 $ stackPtr ,
389- 'MethodArguments '
389+ 'DuplicateParam '
390390 );
391391 }
392392 }
@@ -413,15 +413,15 @@ private function validateParameterAnnotationFormatIsCorrect(
413413 $ phpcsFile ->addError (
414414 'Missing both type and parameter ' ,
415415 $ paramPointers [$ ptr ],
416- 'MethodArguments '
416+ 'Malformed '
417417 );
418418 break ;
419419 case 1 :
420420 if (preg_match ('/^\$.*/ ' , $ paramDefinitions [0 ])) {
421421 $ phpcsFile ->addError (
422422 'Type is not specified ' ,
423423 $ paramPointers [$ ptr ],
424- 'MethodArguments '
424+ 'NoTypeSpecified '
425425 );
426426 }
427427 break ;
@@ -430,7 +430,7 @@ private function validateParameterAnnotationFormatIsCorrect(
430430 $ phpcsFile ->addError (
431431 $ paramDefinitions [0 ] . ' is not a valid PHP type ' ,
432432 $ paramPointers [$ ptr ],
433- 'MethodArguments '
433+ 'NotValidType '
434434 );
435435 }
436436 $ this ->validateParameterPresentInMethodSignature (
@@ -446,13 +446,13 @@ private function validateParameterAnnotationFormatIsCorrect(
446446 $ phpcsFile ->addError (
447447 'Type is not specified ' ,
448448 $ paramPointers [$ ptr ],
449- 'MethodArguments '
449+ 'NoTypeSpecified '
450450 );
451451 if ($ this ->isInvalidType ($ paramDefinitions [0 ])) {
452452 $ phpcsFile ->addError (
453453 $ paramDefinitions [0 ] . ' is not a valid PHP type ' ,
454454 $ paramPointers [$ ptr ],
455- 'MethodArguments '
455+ 'NotValidType '
456456 );
457457 }
458458 }
@@ -552,7 +552,7 @@ public function process(File $phpcsFile, $stackPtr)
552552 $ previousCommentClosePtr = $ phpcsFile ->findPrevious (T_DOC_COMMENT_CLOSE_TAG , $ stackPtr - 1 , 0 );
553553 if ($ previousCommentClosePtr && $ previousCommentOpenPtr ) {
554554 if (!$ this ->validateCommentBlockExists ($ phpcsFile , $ previousCommentClosePtr , $ stackPtr )) {
555- $ phpcsFile ->addError ('Comment block is missing ' , $ stackPtr , 'MethodArguments ' );
555+ $ phpcsFile ->addError ('Comment block is missing ' , $ stackPtr , 'NoCommentBlock ' );
556556 return ;
557557 }
558558 } else {
@@ -636,7 +636,7 @@ private function validateFormattingConsistency(
636636 $ phpcsFile ->addError (
637637 'Method arguments visual alignment must be consistent ' ,
638638 $ paramPointers [0 ],
639- 'MethodArguments '
639+ 'VisualAlignment '
640640 );
641641 }
642642 }
0 commit comments