BUGFIX: Allow deprecations to work in vim too.

* Remove line breaks from output, as syntastic will not parse them.
* It's up to the report to format the messages, not the Sniff.

Relates: #33
This commit is contained in:
Daniel Siepmann 2017-03-28 11:44:06 +02:00
parent 65773c88b5
commit 0ee10ea61f
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 4 additions and 6 deletions

View file

@ -81,8 +81,8 @@ class Typo3Update_Sniffs_Deprecated_AjaxRegistrationSniff implements PhpCsSniff
}
$phpcsFile->addWarning(
"Defining AJAX using %s is no longer supported with a single String like %s.\n"
. "Since TYPO3 7.6, use PSR-7-based Routing for Backend AJAX Requests.\n"
'Defining AJAX using %s is no longer supported with a single String like %s.'
. ' Since TYPO3 7.6, use PSR-7-based Routing for Backend AJAX Requests.'
. ' See: %s',
$tokenToCheck,
'',

View file

@ -101,9 +101,7 @@ class Typo3Update_Sniffs_Deprecated_GenericFunctionCallSniff implements PhpCsSni
$functionCall = $token['content'];
$phpcsFile->addWarning(
"Legacy function calls are not allowed; found %s.\n"
. "%s.\n"
. "See: %s",
'Legacy function calls are not allowed; found %s. %s. See: %s',
$tokenPosition,
$functionCall,
[