Total Complexity | 5 |
Total Lines | 60 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | class TextElement implements ITextElement |
||
8 | { |
||
9 | /** |
||
10 | * Text. |
||
11 | */ |
||
12 | private string $text; |
||
13 | |||
14 | /** |
||
15 | * Create a new TextElement instance. |
||
16 | * |
||
17 | * @param string $text Text |
||
18 | */ |
||
19 | 269 | public function __construct(string $text = '') |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * Get text. |
||
27 | * |
||
28 | * @return string Text |
||
29 | */ |
||
30 | 239 | public function getText(): string |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * Set text. |
||
37 | * |
||
38 | * @param string $text Text |
||
39 | * |
||
40 | * @return $this |
||
41 | */ |
||
42 | 11 | public function setText(string $text): self |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * Get font. For this class, the return value is always null. |
||
51 | */ |
||
52 | 3 | public function getFont(): ?Font |
|
53 | { |
||
54 | 3 | return null; |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * Get hash code. |
||
59 | * |
||
60 | * @return string Hash code |
||
61 | */ |
||
62 | 17 | public function getHashCode(): string |
|
67 | 17 | ); |
|
68 | } |
||
70 |