Passed
Push — master ( 138b71...c5c69e )
by Sebastian
04:58
created

Mailcode_Factory_CommandSets::show()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 8
rs 10
1
<?php
2
/**
3
 * File containing the {@see Mailcode_Factory} class.
4
 *
5
 * @package Mailcode
6
 * @subpackage Utilities
7
 * @see Mailcode_Factory
8
 */
9
10
declare(strict_types=1);
11
12
namespace Mailcode;
13
14
/**
15
 * Factory utility used to create commands.
16
 *
17
 * @package Mailcode
18
 * @subpackage Utilities
19
 * @author Sebastian Mordziol <[email protected]>
20
 */
21
class Mailcode_Factory_CommandSets
22
{
23
    /**
24
     * @var Mailcode_Factory_CommandSets_Set_If
25
     */
26
    private $if;
27
    
28
    /**
29
     * @var Mailcode_Factory_CommandSets_Set_Show
30
     */
31
    private $show;
32
    
33
    /**
34
     * @var Mailcode_Factory_CommandSets_Set_Misc
35
     */
36
    private $misc;
37
    
38
   /**
39
    * @var Mailcode_Factory_CommandSets_Set_Set
40
    */
41
    private $set;
42
    
43
   /**
44
    * @var Mailcode_Factory_CommandSets_Set_ElseIf
45
    */
46
    private $elseIf;
47
    
48
    public function if() : Mailcode_Factory_CommandSets_Set_If
49
    {
50
        if(!isset($this->if))
51
        {
52
            $this->if = new Mailcode_Factory_CommandSets_Set_If();
53
        }
54
        
55
        return $this->if;
56
    }
57
    
58
    public function elseIf() : Mailcode_Factory_CommandSets_Set_ElseIf
59
    {
60
        if(!isset($this->elseIf))
61
        {
62
            $this->elseIf = new Mailcode_Factory_CommandSets_Set_ElseIf();
63
        }
64
        
65
        return $this->elseIf;
66
    }
67
    
68
    public function show() : Mailcode_Factory_CommandSets_Set_Show
69
    {
70
        if(!isset($this->show))
71
        {
72
            $this->show = new Mailcode_Factory_CommandSets_Set_Show();
73
        }
74
        
75
        return $this->show;
76
    }
77
    
78
    public function misc() : Mailcode_Factory_CommandSets_Set_Misc
79
    {
80
        if(!isset($this->misc))
81
        {
82
            $this->misc = new Mailcode_Factory_CommandSets_Set_Misc();
83
        }
84
        
85
        return $this->misc;
86
    }
87
    
88
    public function set() : Mailcode_Factory_CommandSets_Set_Set
89
    {
90
        if(!isset($this->set))
91
        {
92
            $this->set = new Mailcode_Factory_CommandSets_Set_Set();
93
        }
94
        
95
        return $this->set;
96
    }
97
}
98