@@ -301,8 +301,9 @@ public function processHeaderLines(File $phpcsFile, $headerLines)
301301 // this block.
302302 $ next = $ phpcsFile ->findNext (T_WHITESPACE , ($ line ['end ' ] + 1 ), null , true );
303303 if ($ next !== false && $ tokens [$ next ]['line ' ] !== ($ tokens [$ line ['end ' ]]['line ' ] + 2 )) {
304- $ error = 'Header blocks must be separated by a single blank line ' ;
305- $ fix = $ phpcsFile ->addFixableError ($ error , $ line ['end ' ], 'SpacingAfterBlock ' );
304+ $ error = 'Header blocks must be separated by a single blank line ' ;
305+ $ errorCode = 'SpacingAfter ' .str_replace (' ' , '' , ucwords ($ line ['type ' ])).'Block ' ;
306+ $ fix = $ phpcsFile ->addFixableError ($ error , $ line ['end ' ], $ errorCode );
306307 if ($ fix === true ) {
307308 if ($ tokens [$ next ]['line ' ] === $ tokens [$ line ['end ' ]]['line ' ]) {
308309 $ phpcsFile ->fixer ->addContentBefore ($ next , $ phpcsFile ->eolChar .$ phpcsFile ->eolChar );
@@ -340,8 +341,9 @@ public function processHeaderLines(File $phpcsFile, $headerLines)
340341 // blank line after this statement.
341342 $ next = $ phpcsFile ->findNext (T_WHITESPACE , ($ line ['end ' ] + 1 ), null , true );
342343 if ($ tokens [$ next ]['line ' ] > ($ tokens [$ line ['end ' ]]['line ' ] + 1 )) {
343- $ error = 'Header blocks must not contain blank lines ' ;
344- $ fix = $ phpcsFile ->addFixableError ($ error , $ line ['end ' ], 'SpacingInsideBlock ' );
344+ $ error = 'Header blocks must not contain blank lines ' ;
345+ $ errorCode = 'SpacingInside ' .str_replace (' ' , '' , ucwords ($ line ['type ' ])).'Block ' ;
346+ $ fix = $ phpcsFile ->addFixableError ($ error , $ line ['end ' ], $ errorCode );
345347 if ($ fix === true ) {
346348 $ phpcsFile ->fixer ->beginChangeset ();
347349 for ($ i = ($ line ['end ' ] + 1 ); $ i < $ next ; $ i ++) {
@@ -358,7 +360,7 @@ public function processHeaderLines(File $phpcsFile, $headerLines)
358360
359361 $ phpcsFile ->fixer ->endChangeset ();
360362 }
361- }
363+ }//end if
362364 }//end if
363365
364366 if (isset ($ found [$ line ['type ' ]]) === false ) {
0 commit comments