Total Complexity | 6 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class MyStudentsQuizTrackingEvent extends AbstractEvent |
||
10 | { |
||
11 | public function getHeaders(): array |
||
12 | { |
||
13 | return $this->data['headers'] ?? []; |
||
14 | } |
||
15 | |||
16 | public function addHeader(string $title, array $attrs): static |
||
17 | { |
||
18 | $headers = $this->getHeaders(); |
||
19 | |||
20 | $this->data['headers'] = [ |
||
21 | ...$headers, |
||
22 | [ |
||
23 | 'title' => $title, |
||
24 | 'attrs' => $attrs, |
||
25 | ], |
||
26 | ]; |
||
27 | |||
28 | return $this; |
||
29 | } |
||
30 | |||
31 | public function getContents(): array |
||
34 | } |
||
35 | |||
36 | public function addContent(string $value, array $attrs): static |
||
37 | { |
||
38 | $contents = $this->getContents(); |
||
39 | |||
40 | $this->data['contents'] = [ |
||
41 | ...$contents, |
||
42 | [ |
||
43 | 'value' => $value, |
||
44 | 'attrs' => $attrs, |
||
45 | ], |
||
46 | ]; |
||
47 | |||
48 | return $this; |
||
49 | } |
||
50 | |||
51 | public function getExerciseId(): ?int |
||
54 | } |
||
55 | |||
56 | public function getStudentId(): ?int |
||
59 | } |
||
60 | } |
||
61 |