Completed
Push — master ( 2c4f8d...8be794 )
by WEBEWEB
06:07
created

ButtonFactory   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 6
dl 0
loc 56
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A newDangerButton() 0 3 1
A newDefaultButton() 0 3 1
A newInfoButton() 0 3 1
A newPrimaryButton() 0 3 1
A newSuccessButton() 0 3 1
A newWarningButton() 0 3 1
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\Button;
13
14
/**
15
 * Button factory.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Bundle\BootstrapBundle\Button
19
 */
20
class ButtonFactory {
21
22
    /**
23
     * Creates a new danger button.
24
     *
25
     * @return ButtonInterface Returns the danger button.
26
     */
27
    public static function newDangerButton() {
28
        return new DangerButton();
29
    }
30
31
    /**
32
     * Creates a new default button.
33
     *
34
     * @return ButtonInterface Returns the default button.
35
     */
36
    public static function newDefaultButton() {
37
        return new DefaultButton();
38
    }
39
40
    /**
41
     * Creates a new info button.
42
     *
43
     * @return ButtonInterface Returns the info button.
44
     */
45
    public static function newInfoButton() {
46
        return new InfoButton();
47
    }
48
49
    /**
50
     * Creates a new primary button.
51
     *
52
     * @return ButtonInterface Returns the primary button.
53
     */
54
    public static function newPrimaryButton() {
55
        return new PrimaryButton();
56
    }
57
58
    /**
59
     * Creates a new success button.
60
     *
61
     * @return ButtonInterface Returns the success button.
62
     */
63
    public static function newSuccessButton() {
64
        return new SuccessButton();
65
    }
66
67
    /**
68
     * Creates a new warning button.
69
     *
70
     * @return ButtonInterface Returns the warning button.
71
     */
72
    public static function newWarningButton() {
73
        return new WarningButton();
74
    }
75
}
76