| Total Complexity | 12 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | trait TPrettyTable |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var PrettyTable |
||
| 15 | */ |
||
| 16 | protected $prettyTable = null; |
||
| 17 | |||
| 18 | 9 | public function setTableColors($values): void |
|
| 19 | { |
||
| 20 | 9 | $this->init(); |
|
| 21 | 9 | $this->prettyTable->setColors($values); |
|
| 22 | 9 | } |
|
| 23 | |||
| 24 | 2 | public function setTableColorsHeader($values): void |
|
| 25 | { |
||
| 26 | 2 | $this->init(); |
|
| 27 | 2 | $this->prettyTable->setColorsHeader($values); |
|
| 28 | 2 | } |
|
| 29 | |||
| 30 | 13 | public function setTableHeaders($values): void |
|
| 31 | { |
||
| 32 | 13 | $this->init(); |
|
| 33 | 13 | $this->prettyTable->setHeaders($values); |
|
| 34 | 13 | } |
|
| 35 | |||
| 36 | 8 | public function setTableDataLine($values): void |
|
| 37 | { |
||
| 38 | 8 | $this->init(); |
|
| 39 | 8 | $this->prettyTable->setDataLine($values); |
|
| 40 | 8 | } |
|
| 41 | |||
| 42 | 13 | private function init(): void |
|
| 43 | { |
||
| 44 | 13 | if (empty($this->prettyTable)) { |
|
| 45 | 13 | $this->prettyTable = new PrettyTable(); |
|
| 46 | } |
||
| 47 | 13 | } |
|
| 48 | |||
| 49 | 10 | public function resetTable(): void |
|
| 52 | 10 | } |
|
| 53 | |||
| 54 | 10 | public function dumpTable(bool $displayHeader = true, bool $linesAround = true): void |
|
| 70 | 10 | } |
|
| 71 | |||
| 72 | abstract public function writeLn(string $output = ''): void; |
||
| 73 | } |
||
| 74 |