Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function addText(array $config = []): Text |
||
30 | 26 | { |
|
31 | $text = new Text($this->globalConfig); |
||
32 | 26 | // Colors are inherited from the parent and override default values |
|
33 | $symbolConfig = [ |
||
34 | 26 | 'mode' => $this->__get('mode'), |
|
35 | 26 | 'color' => $this->__get('color'), |
|
36 | 26 | 'borderColor' => $this->__get('borderColor'), |
|
37 | 26 | 'backgroundColor' => $this->__get('backgroundColor'), |
|
38 | ]; |
||
39 | 26 | $text->setConfig(array_merge($text->getConfig(), $symbolConfig, $config)); |
|
40 | 26 | $this->addChild($text); |
|
41 | 26 | return $text; |
|
42 | } |
||
44 |