From 0ee10ea61fe218d02d7df8a269f3d49fbf89d106 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 28 Mar 2017 11:44:06 +0200 Subject: [PATCH] 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 --- .../Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php | 6 +++--- .../Sniffs/Deprecated/GenericFunctionCallSniff.php | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php b/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php index 73a2061..603ea88 100644 --- a/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php @@ -81,9 +81,9 @@ 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" - . 'See: %s', + '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, '', [ diff --git a/src/Standards/Typo3Update/Sniffs/Deprecated/GenericFunctionCallSniff.php b/src/Standards/Typo3Update/Sniffs/Deprecated/GenericFunctionCallSniff.php index d6cd39a..9dac445 100644 --- a/src/Standards/Typo3Update/Sniffs/Deprecated/GenericFunctionCallSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Deprecated/GenericFunctionCallSniff.php @@ -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, [