| Conditions | 4 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | 1 | public function create(string $className): TestCase |
|
| 31 | { |
||
| 32 | 1 | foreach ($this->suites as $suite) { |
|
| 33 | 1 | if ($suite instanceof $className && $suite instanceof TestCase) { |
|
| 34 | 1 | return $suite; |
|
| 35 | } |
||
| 36 | } |
||
| 37 | 1 | throw new InvalidTestCaseException("$className is not a descendant of " . TestCase::class . "."); |
|
| 38 | } |
||
| 40 |