Completed
Push — master ( f560d6...a27d66 )
by WEBEWEB
01:15
created

AbstractBadge::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the bootstrap-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\BootstrapBundle\Badge;
13
14
/**
15
 * Abstract badge.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Bundle\BootstrapBundle\Badge
19
 * @abstract
20
 */
21
abstract class AbstractBadge implements BadgeInterface {
22
23
    /**
24
     * Content.
25
     *
26
     * @var string
27
     */
28
    private $content;
29
30
    /**
31
     * Pill.
32
     *
33
     * @var bool
34
     */
35
    private $pill;
36
37
    /**
38
     * Type.
39
     *
40
     * @var string
41
     */
42
    private $type;
43
44
    /**
45
     * Constructor.
46
     *
47
     * @param string type.
48
     */
49
    protected function __construct($type) {
50
        $this->setType($type);
51
    }
52
53
    /**
54
     * {@inheritDoc}
55
     */
56
    public function getContent() {
57
        return $this->content;
58
    }
59
60
    /**
61
     * {@inheritDoc}
62
     */
63
    public function getPill() {
64
        return $this->pill;
65
    }
66
67
    /**
68
     * {@inheritDoc}
69
     */
70
    public function getPrefix() {
71
        return "badge-";
72
    }
73
74
    /**
75
     * {@inheritDoc}
76
     */
77
    public function getType() {
78
        return $this->type;
79
    }
80
81
    /**
82
     * {@inheritDoc}
83
     */
84
    public function setContent($content) {
85
        $this->content = $content;
86
        return $this;
87
    }
88
89
    /**
90
     * {@inheritDoc}
91
     */
92
    public function setPill($pill) {
93
        $this->pill = $pill;
94
        return $this;
95
    }
96
97
    /**
98
     * {@inheritDoc}
99
     */
100
    public function setType($type) {
101
        $this->type = $type;
102
        return $this;
103
    }
104
}
105