TASK: Cleanup missing vendor

* Add configured vendor in message for easer migration in IDEs (by
  hand).
* Remove non existing function from checks.

Relates: #36
This commit is contained in:
Daniel Siepmann 2017-03-23 11:40:17 +01:00
parent 1561c13b46
commit 8fbe25a422
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -58,7 +58,7 @@ class Typo3Update_Sniffs_LegacyClassnames_MissingVendorForPluginsAndModulesSniff
*/
public function process(PhpCsFile $phpcsFile, $stackPtr)
{
$functionsToHandle = ['registerPlugin', 'configurePlugin', 'registerModule', 'configureModule'];
$functionsToHandle = ['registerPlugin', 'configurePlugin', 'registerModule'];
if (!$this->isFunctionCall($phpcsFile, $stackPtr)) {
return;
}
@ -75,9 +75,10 @@ class Typo3Update_Sniffs_LegacyClassnames_MissingVendorForPluginsAndModulesSniff
$fix = $phpcsFile->addFixableError(
'No vendor is given, that will break TYPO3 handling for namespaced classes.'
. ' Add vendor before Extensionkey like: "Vendor." . $_EXTKEY',
. ' Add vendor before Extensionkey like: "%s." . $_EXTKEY',
$firstArgument,
'missingVendor'
'missingVendor',
[$this->getVendor()]
);
if ($fix === true) {