Row::getHeightByContent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
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
}