Skip to content

Commit 04e3279

Browse files
Gido2935kukulich
authored andcommitted
Changed the way getSniffClassName method is called from self to static so that when the method is overridden it uses the overridden method
1 parent 945c5d0 commit 04e3279

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SlevomatCodingStandard/Sniffs/TestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected static function checkFile(string $filePath, array $sniffProperties = [
4646
$codeSniffer->ruleset->ruleset[self::getSniffName()]['properties'] = $sniffProperties;
4747
}
4848

49-
$sniffClassName = self::getSniffClassName();
49+
$sniffClassName = static::getSniffClassName();
5050
/** @var Sniff $sniff */
5151
$sniff = new $sniffClassName();
5252

@@ -147,15 +147,15 @@ private static function getSniffName(): string
147147
'',
148148
'',
149149
],
150-
self::getSniffClassName()
150+
static::getSniffClassName()
151151
);
152152
}
153153

154154
private static function getSniffClassReflection(): ReflectionClass
155155
{
156156
static $reflections = [];
157157

158-
$className = self::getSniffClassName();
158+
$className = static::getSniffClassName();
159159

160160
return $reflections[$className] ?? $reflections[$className] = new ReflectionClass($className);
161161
}

0 commit comments

Comments
 (0)