Total Complexity | 6 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 85.71% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class TimerEvent |
||
7 | { |
||
8 | public const TYPE_BEGIN = 'BEGIN'; |
||
9 | public const TYPE_END = 'END'; |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $type; |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $taskName; |
||
18 | /** |
||
19 | * @var float |
||
20 | */ |
||
21 | private $timestamp; |
||
22 | /** |
||
23 | * @var float |
||
24 | */ |
||
25 | private $duration; |
||
26 | |||
27 | 9 | public function __construct(string $type, string $taskName, float $timestamp, float $duration) |
|
28 | { |
||
29 | 9 | $this->type = $type; |
|
30 | 9 | $this->taskName = $taskName; |
|
31 | 9 | $this->timestamp = $timestamp; |
|
32 | 9 | $this->duration = $duration; |
|
33 | 9 | } |
|
34 | |||
35 | 9 | private function asArray() |
|
38 | } |
||
39 | |||
40 | 9 | public function asCsvLine(): string |
|
61 |