From c38e7e4265f9d297932ac3f558c8b54d1d7b6f44 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 13 Aug 2024 08:57:27 +0200 Subject: [PATCH] AbstractPatternSniff::__construct(): remove the $ignoreComments property PHPCS deprecated the `$ignoreComments` parameter of the `AbstractPatternSniff::__construct()` sniff in version 1.4.0. > - AbstractPatternSniff now sets the ignoreComments option using a public var rather than through the constructor > - This allows the setting to be overwritten in ruleset.xml files > - Old method remains for backwards compatibility Time to remove this dead code. Related to 6 --- src/Sniffs/AbstractPatternSniff.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Sniffs/AbstractPatternSniff.php b/src/Sniffs/AbstractPatternSniff.php index d9528dccf8..78f3ffd377 100644 --- a/src/Sniffs/AbstractPatternSniff.php +++ b/src/Sniffs/AbstractPatternSniff.php @@ -57,16 +57,9 @@ abstract class AbstractPatternSniff implements Sniff /** * Constructs a AbstractPatternSniff. - * - * @param boolean $ignoreComments If true, comments will be ignored. */ - public function __construct($ignoreComments=null) + public function __construct() { - // This is here for backwards compatibility. - if ($ignoreComments !== null) { - $this->ignoreComments = $ignoreComments; - } - $this->supplementaryTokens = $this->registerSupplementary(); }//end __construct()