@@ -101,7 +101,7 @@ protected function processScopes(File $phpcsFile, int $stackPtr): void {
101101
102102 if ($ fileblock === null ) {
103103 $ objectName = TokenUtil::getObjectName ($ phpcsFile , $ stackPtr );
104- $ phpcsFile ->addError ('Missing docblock for file %s ' , $ stackPtr , 'Missing ' , [$ objectName ]);
104+ $ phpcsFile ->addError ('Missing docblock for file %s ' , $ stackPtr , 'File ' , [$ objectName ]);
105105 }
106106 }
107107
@@ -110,7 +110,7 @@ protected function processScopes(File $phpcsFile, int $stackPtr): void {
110110 $ objectName = TokenUtil::getObjectName ($ phpcsFile , $ typePtr );
111111 $ objectType = TokenUtil::getObjectType ($ phpcsFile , $ typePtr );
112112
113- $ phpcsFile ->addError ('Missing docblock for %s %s ' , $ typePtr , ' Missing ' , [$ objectType , $ objectName ]);
113+ $ phpcsFile ->addError ('Missing docblock for %s %s ' , $ typePtr , ucfirst ( $ objectType ) , [$ objectType , $ objectName ]);
114114 }
115115
116116 if ($ artifactCount === 1 ) {
@@ -208,7 +208,7 @@ protected function processFunctions(File $phpcsFile, int $stackPtr): void {
208208 );
209209 }
210210 } else {
211- $ phpcsFile ->addError ('Missing docblock for %s %s ' , $ typePtr , ' Missing ' , [$ objectType , $ objectName ]);
211+ $ phpcsFile ->addError ('Missing docblock for %s %s ' , $ typePtr , ucfirst ( $ objectType ) , [$ objectType , $ objectName ]);
212212 }
213213 }
214214 }
@@ -255,14 +255,14 @@ protected function processConstants(File $phpcsFile, int $stackPtr): void {
255255 $ phpcsFile ->addError (
256256 'Missing docblock for constant %s::%s ' ,
257257 $ typePtr ,
258- 'Missing ' ,
258+ 'Constant ' ,
259259 [$ containerName , $ objectName ]
260260 );
261261 } else {
262262 $ phpcsFile ->addError (
263263 'Missing docblock for constant %s ' ,
264264 $ typePtr ,
265- 'Missing ' ,
265+ 'Constant ' ,
266266 [$ objectName ]
267267 );
268268 }
0 commit comments