Skip to content

Commit 0304898

Browse files
committed
Generic/CallTimePassByReference: hard deprecate the sniff
Related to 921
1 parent 64440b2 commit 0304898

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
@@ -10,10 +10,11 @@
1010
namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Functions;
1111

1212
use PHP_CodeSniffer\Files\File;
13+
use PHP_CodeSniffer\Sniffs\DeprecatedSniff;
1314
use PHP_CodeSniffer\Sniffs\Sniff;
1415
use PHP_CodeSniffer\Util\Tokens;
1516

16-
class CallTimePassByReferenceSniff implements Sniff
17+
class CallTimePassByReferenceSniff implements Sniff, DeprecatedSniff
1718
{
1819

1920

@@ -138,4 +139,40 @@ public function process(File $phpcsFile, $stackPtr)
138139
}//end process()
139140

140141

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

0 commit comments

Comments
 (0)