FEATURE: Display new class name in error

* To be more helpful while searching without fixing.
* E.g. if sniffs are integrated into IDE, the user has a chance to fix
  them while checking.
This commit is contained in:
Daniel Siepmann 2017-03-09 08:49:52 +01:00
parent 04a1b860a6
commit 1a17e160b5

View file

@ -83,10 +83,10 @@ trait ClassnameCheckerTrait
} }
$fix = $phpcsFile->addFixableError( $fix = $phpcsFile->addFixableError(
'Legacy classes are not allowed; found %s', 'Legacy classes are not allowed; found "%s", use "%s" instead',
$classnamePosition, $classnamePosition,
'legacyClassname', 'legacyClassname',
[$classname] [$classname, $this->getNewClassname($classname)]
); );
if ($fix === true) { if ($fix === true) {