| Conditions | 2 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2.0017 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | 8 | private static function getDocumentDividers(): array |
|
| 45 | { |
||
| 46 | 8 | $constants = []; |
|
| 47 | |||
| 48 | try { |
||
| 49 | 8 | $reportingCloud = new ReportingCloud(); |
|
| 50 | 8 | $reflectionClass = new ReflectionClass($reportingCloud); |
|
| 51 | 8 | $constants = $reflectionClass->getConstants(); |
|
| 52 | 8 | unset($reportingCloud); |
|
| 53 | } catch (ReflectionException) { |
||
|
|
|||
| 54 | } |
||
| 55 | |||
| 56 | 8 | $array = array_filter( |
|
| 57 | 8 | $constants, |
|
| 58 | 8 | static fn(string $constantKey): bool => str_starts_with($constantKey, 'DOCUMENT_DIVIDER_'), |
|
| 59 | 8 | ARRAY_FILTER_USE_KEY |
|
| 60 | 8 | ); |
|
| 61 | |||
| 62 | 8 | return array_values($array); |
|
| 63 | } |
||
| 65 |