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

Display::inlineBlock()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 1
c 2
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 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