Skip to content

Commit

Permalink
SlevomatCodingStandard.TypeHints.UnionTypeHintFormat: Mark as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
kukulich committed Feb 23, 2025
1 parent 9d1d153 commit f83b4cb
Showing 1 changed file with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SlevomatCodingStandard\Sniffs\TypeHints;

use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\DeprecatedSniff;
use PHP_CodeSniffer\Sniffs\Sniff;
use SlevomatCodingStandard\Helpers\FixerHelper;
use SlevomatCodingStandard\Helpers\FunctionHelper;
Expand All @@ -22,7 +23,10 @@
use const T_VARIABLE;
use const T_WHITESPACE;

class UnionTypeHintFormatSniff implements Sniff
/**
* @deprecated
*/
class UnionTypeHintFormatSniff implements Sniff, DeprecatedSniff
{

public const CODE_DISALLOWED_WHITESPACE = 'DisallowedWhitespace';
Expand All @@ -46,6 +50,21 @@ class UnionTypeHintFormatSniff implements Sniff

public ?string $nullPosition = null;

public function getDeprecationVersion(): string
{
return 'Slevomat Coding Standard 8.16.0';
}

public function getRemovalVersion(): string
{
return 'Slevomat Coding Standard 9.0.0';
}

public function getDeprecationMessage(): string
{
return 'Use SlevomatCodingStandard.TypeHints.DNFTypeHintFormat instead.';
}

/**
* @return array<int, (int|string)>
*/
Expand Down

0 comments on commit f83b4cb

Please sign in to comment.