Lines
100.00%
1 / 1
Methods
100.00%
1 / 1
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| isInTestCode | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 10 | final readonly class TestCodeScope | |
| 11 | { | |
| 12 | private const string TEST_CASE = 'PHPUnit\\Framework\\TestCase'; | |
| 13 | ||
| 14 | public function isInTestCode(Scope $scope): bool | |
| 15 | { | |
| 16 | return $scope->getClassReflection()?->is(self::TEST_CASE) === true; | |
| 17 | } | |
| 18 | } |