Row   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
dl 0
loc 25
ccs 13
cts 13
cp 1
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getWidthByContent() 0 3 1
A getHeightByContent() 0 3 1
A addCell() 0 13 1
1
<?php
2
3
4
namespace VPA\Console\Glyphs;
5
6
class Row extends GlyphBlock
7
{
8 13
    public function addCell(array $config = []): Cell
9
    {
10 13
        $cell = new Cell($this->globalConfig);
11
        // Colors are inherited from the parent and override default values
12 13
        $symbolConfig = [
13 13
            'mode' => $this->__get('mode'),
14 13
            'color' => $this->__get('color'),
15 13
            'borderColor' => $this->__get('borderColor'),
16
            'backgroundColor' => $this->__get('backgroundColor'),
17 13
        ];
18 13
        $cell->setConfig(array_merge($cell->getConfig(), $symbolConfig, $config));
19 13
        $this->addChild($cell);
20
        return $cell;
21
    }
22 8
23
    public function getWidthByContent(int $endOfPreviousSibling = 0): int
24 8
    {
25
        return $this->width;
26
    }
27 8
28
    public function getHeightByContent(int $endOfPreviousSibling = 0): int
29 8
    {
30
        return $this->height;
31
    }
32
}