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

Display   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 6
eloc 7
c 2
b 0
f 0
dl 0
loc 40
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A inlineBlock() 0 3 1
A none() 0 3 1
A inline() 0 3 1
A block() 0 3 1
A custom() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AppUtils\StyleCollection\StyleBuilder\Flavors;
6
7
use AppUtils\StyleCollection\StyleBuilder;
8
use AppUtils\StyleCollection\StyleBuilder\StyleContainer;
9
10
class Display extends StyleContainer
11
{
12
    /**
13
     * @return string
14
     */
15
    public function getName() : string
16
    {
17
        return 'display';
18
    }
19
20
    /**
21
     * Sets a custom display value, e.g. "flex", "list-item"...
22
     *
23
     * @param string $value
24
     * @param bool $important
25
     * @return StyleBuilder
26
     */
27
    public function custom(string $value, bool $important=false) : StyleBuilder
28
    {
29
        return $this->setStyle($value, $important);
30
    }
31
32
    public function block(bool $important=false) : StyleBuilder
33
    {
34
        return $this->setStyle('block', $important);
35
    }
36
37
    public function none(bool $important=false) : StyleBuilder
38
    {
39
        return $this->setStyle('none', $important);
40
    }
41
42
    public function inline(bool $important=false) : StyleBuilder
43
    {
44
        return $this->setStyle('inline', $important);
45
    }
46
47
    public function inlineBlock(bool $important=false) : StyleBuilder
48
    {
49
        return $this->setStyle('inline-block', $important);
50
    }
51
}
52