Skip to content

Commit 5e3b792

Browse files
committed
SlevomatCodingStandard.TypeHints.UnionTypeHintFormat: Mark as deprecated
1 parent 9d1d153 commit 5e3b792

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

SlevomatCodingStandard/Sniffs/TypeHints/UnionTypeHintFormatSniff.php

+29-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace SlevomatCodingStandard\Sniffs\TypeHints;
44

55
use PHP_CodeSniffer\Files\File;
6+
use PHP_CodeSniffer\Sniffs\DeprecatedSniff;
67
use PHP_CodeSniffer\Sniffs\Sniff;
78
use SlevomatCodingStandard\Helpers\FixerHelper;
89
use SlevomatCodingStandard\Helpers\FunctionHelper;
@@ -22,7 +23,10 @@
2223
use const T_VARIABLE;
2324
use const T_WHITESPACE;
2425

25-
class UnionTypeHintFormatSniff implements Sniff
26+
/**
27+
* @deprecated
28+
*/
29+
class UnionTypeHintFormatSniff implements Sniff, DeprecatedSniff
2630
{
2731

2832
public const CODE_DISALLOWED_WHITESPACE = 'DisallowedWhitespace';
@@ -46,6 +50,30 @@ class UnionTypeHintFormatSniff implements Sniff
4650

4751
public ?string $nullPosition = null;
4852

53+
/**
54+
* @codeCoverageIgnore
55+
*/
56+
public function getDeprecationVersion(): string
57+
{
58+
return 'Slevomat Coding Standard 8.16.0';
59+
}
60+
61+
/**
62+
* @codeCoverageIgnore
63+
*/
64+
public function getRemovalVersion(): string
65+
{
66+
return 'Slevomat Coding Standard 9.0.0';
67+
}
68+
69+
/**
70+
* @codeCoverageIgnore
71+
*/
72+
public function getDeprecationMessage(): string
73+
{
74+
return 'Use SlevomatCodingStandard.TypeHints.DNFTypeHintFormat instead.';
75+
}
76+
4977
/**
5078
* @return array<int, (int|string)>
5179
*/

0 commit comments

Comments
 (0)