Conditions | 8 |
Paths | 6 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 8 |
Changes | 0 |
1 | <?php |
||
16 | 3 | public function getString(): string |
|
17 | { |
||
18 | 3 | $r = ''; |
|
19 | 3 | $elapsed = ''; |
|
20 | 3 | foreach ($this->report->getReports() as $reports) { |
|
21 | 3 | foreach ($reports as $report) { |
|
22 | 3 | if ($report instanceof TimerReport && DEFAULT_NAME === $report->getName()) { |
|
23 | 3 | $elapsed .= $report; |
|
24 | 3 | } elseif ($report instanceof CounterReport && DEFAULT_NAME === $report->getName()) { |
|
25 | 3 | $r .= $report->isStarted() ? $report : ''; |
|
26 | } else { |
||
27 | 3 | $r .= $report; |
|
28 | } |
||
29 | } |
||
30 | } |
||
31 | 3 | return $r . $elapsed; |
|
32 | } |
||
34 |