Skip to content

Commit

Permalink
chore(deps): directly require slevomat/coding-standard (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod authored Apr 12, 2023
1 parent 39a49e5 commit a73ce17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"require": {
"php": "^8.1",
"doctrine/coding-standard": "^11.0"
"doctrine/coding-standard": "^11.0",
"slevomat/coding-standard": "^8.9.2"
},
"require-dev": {
"phpstan/extension-installer": "^1.2",
Expand Down
7 changes: 6 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

use SlevomatCodingStandard\Sniffs\TestCase as SlevomatTestCase;

use function assert;
use function class_exists;
use function str_replace;
use function strlen;
use function substr;
Expand All @@ -14,6 +16,9 @@ abstract class TestCase extends SlevomatTestCase
{
protected static function getSniffClassName(): string
{
return str_replace('\\Tests\\', '\\', substr(static::class, 0, -strlen('Test')));
$class = str_replace('\\Tests\\', '\\', substr(static::class, 0, -strlen('Test')));
assert(class_exists($class));

return $class;
}
}

0 comments on commit a73ce17

Please sign in to comment.