Skip to content

Commit

Permalink
fix: use getSniffName() from slevomat's testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Feb 16, 2024
1 parent 7434e73 commit ebf4a34
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ parameters:
count: 1
path: tests/TestCase.php

-
message: "#^Method Cdn77\\\\TestCase\\:\\:getSniffName\\(\\) should return string but returns string\\|null\\.$#"
count: 1
path: tests/TestCase.php

-
message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
count: 1
Expand Down
18 changes: 0 additions & 18 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use function define;
use function defined;
use function in_array;
use function preg_replace;
use function sprintf;
use function str_replace;
use function strlen;
Expand Down Expand Up @@ -80,23 +79,6 @@ protected static function checkFile(string $filePath, array $sniffProperties = [
return $file;
}

private static function getSniffName(): string
{
return preg_replace(
[
'~\\\~',
'~\.Sniffs~',
'~Sniff$~',
],
[
'.',
'',
'',
],
static::getSniffClassName(),
);
}

private static function getSniffClassReflection(): ReflectionClass
{
static $reflections = [];
Expand Down

0 comments on commit ebf4a34

Please sign in to comment.