Conditions | 4 |
Paths | 6 |
Total Lines | 13 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 2 | public function stop($name = null) |
|
33 | { |
||
34 | 2 | $key = ($name !== null || ($name && array_key_exists($name, $this->timers))) ? $name : 'default'; |
|
35 | |||
36 | 2 | $this->timers[$key]['stop'] = microtime(true); |
|
37 | |||
38 | /** @var $start float */ |
||
39 | /** @var $stop float */ |
||
40 | 2 | extract($this->timers[$key]); |
|
41 | |||
42 | 2 | $this->timers[$key]['duration'] = $stop - $start; |
|
43 | |||
44 | 2 | return $this->timers[$key]; |
|
45 | } |
||
68 |