-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathDeprecatedSniff.php
63 lines (53 loc) · 1.88 KB
/
DeprecatedSniff.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
* Marks a sniff as deprecated.
*
* Implementing this interface allows for marking a sniff as deprecated and
* displaying information about the deprecation to the end-user.
*
* A sniff will still need to implement the `PHP_CodeSniffer\Sniffs\Sniff` interface
* as well, or extend an abstract sniff which does, to be recognized as a valid sniff.
*
* @author Juliette Reinders Folmer <[email protected]>
* @copyright 2024 PHPCSStandards Contributors
* @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
*/
namespace PHP_CodeSniffer\Sniffs;
interface DeprecatedSniff
{
/**
* Provide the version number in which the sniff was deprecated.
*
* Recommended format for PHPCS native sniffs: "v3.3.0".
* Recommended format for external sniffs: "StandardName v3.3.0".
*
* @return string
*/
public function getDeprecationVersion();
/**
* Provide the version number in which the sniff will be removed.
*
* Recommended format for PHPCS native sniffs: "v3.3.0".
* Recommended format for external sniffs: "StandardName v3.3.0".
*
* If the removal version is not yet known, it is recommended to set
* this to: "a future version".
*
* @return string
*/
public function getRemovalVersion();
/**
* Optionally provide an arbitrary custom message to display with the deprecation.
*
* Typically intended to allow for displaying information about what to
* replace the deprecated sniff with.
* Example: "Use the Stnd.Cat.SniffName sniff instead."
* Multi-line messages (containing new line characters) are supported.
*
* An empty string can be returned if there is no replacement/no need
* for a custom message.
*
* @return string
*/
public function getDeprecationMessage();
}//end interface