Passed
Push — master ( 689ec5...45f08c )
by Sebastian
05:26
created

FontSize::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AppUtils\StyleCollection\StyleBuilder\Flavors\Font;
6
7
use AppUtils\StyleCollection\StyleBuilder;
8
use AppUtils\StyleCollection\StyleBuilder\StyleContainer;
9
10
class FontSize extends StyleContainer
11
{
12
    protected function getName() : string
13
    {
14
        return 'font-size';
15
    }
16
17
    public function relativeLarger(bool $important=false) : StyleBuilder
18
    {
19
        return $this->setStyle('larger', $important);
20
    }
21
22
    public function relativeSmaller(bool $important=false) : StyleBuilder
23
    {
24
        return $this->setStyle('smaller', $important);
25
    }
26
27
    public function custom(string $value, bool $important=false) : StyleBuilder
28
    {
29
        return $this->setStyle($value, $important);
30
    }
31
32
    public function percent(float $percent, bool $important=false) : StyleBuilder
33
    {
34
        return $this->setStylePercent($percent, $important);
35
    }
36
37
    public function px(int $pixels, bool $important=false) : StyleBuilder
38
    {
39
        return $this->setStylePX($pixels, $important);
40
    }
41
42
    public function em(float $em, bool $important=false) : StyleBuilder
43
    {
44
        return $this->setStyleEM($em, $important);
45
    }
46
47
    public function rem(float $rem, bool $important=false) : StyleBuilder
48
    {
49
        return $this->setStyleREM($rem, $important);
50
    }
51
}
52