Skip to content

Commit dd7257e

Browse files
committed
Generic/CallTimePassByReference: hard deprecate the sniff
Related to 921
1 parent 0b3ba7b commit dd7257e

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

src/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php

+38-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Functions;
1313

1414
use PHP_CodeSniffer\Files\File;
15+
use PHP_CodeSniffer\Sniffs\DeprecatedSniff;
1516
use PHP_CodeSniffer\Sniffs\Sniff;
1617
use PHP_CodeSniffer\Util\Tokens;
1718

18-
class CallTimePassByReferenceSniff implements Sniff
19+
class CallTimePassByReferenceSniff implements Sniff, DeprecatedSniff
1920
{
2021

2122

@@ -140,4 +141,40 @@ public function process(File $phpcsFile, $stackPtr)
140141
}//end process()
141142

142143

144+
/**
145+
* Provide the version number in which the sniff was deprecated.
146+
*
147+
* @return string
148+
*/
149+
public function getDeprecationVersion()
150+
{
151+
return 'v3.12.1';
152+
153+
}//end getDeprecationVersion()
154+
155+
156+
/**
157+
* Provide the version number in which the sniff will be removed.
158+
*
159+
* @return string
160+
*/
161+
public function getRemovalVersion()
162+
{
163+
return 'v4.0.0';
164+
165+
}//end getRemovalVersion()
166+
167+
168+
/**
169+
* Provide a custom message to display with the deprecation.
170+
*
171+
* @return string
172+
*/
173+
public function getDeprecationMessage()
174+
{
175+
return '';
176+
177+
}//end getDeprecationMessage()
178+
179+
143180
}//end class

0 commit comments

Comments
 (0)