Test Failed
Push — master ( f51294...9c5f94 )
by Sebastian
03:08
created

Mailcode_Commands_Command_Else   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 45
rs 10
c 1
b 0
f 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getLabel() 0 3 1
A getName() 0 3 1
A supportsType() 0 3 1
A getDefaultType() 0 3 1
A requiresParameters() 0 3 1
A generatesContent() 0 3 1
A getValidations() 0 3 1
A getParentName() 0 3 1
A supportsLogicKeywords() 0 3 1
1
<?php
2
/**
3
 * File containing the {@see Mailcode_Commands_Command_Else} class.
4
 *
5
 * @package Mailcode
6
 * @subpackage Commands
7
 * @see Mailcode_Commands_Command_Else
8
 */
9
10
declare(strict_types=1);
11
12
namespace Mailcode;
13
14
/**
15
 * Mailcode command: An ELSE statement in an IF condition.
16
 *
17
 * @package Mailcode
18
 * @subpackage Commands
19
 * @author Sebastian Mordziol <[email protected]>
20
 */
21
class Mailcode_Commands_Command_Else extends Mailcode_Commands_Command implements Mailcode_Commands_Command_Type_Sibling
22
{
23
    public function getName() : string
24
    {
25
        return 'else';
26
    }
27
    
28
    public function getLabel() : string
29
    {
30
        return t('ELSE condition');
31
    }
32
    
33
    public function supportsType(): bool
34
    {
35
        return false;
36
    }
37
    
38
    public function getDefaultType() : string
39
    {
40
        return '';
41
    }
42
43
    public function requiresParameters(): bool
44
    {
45
        return false;
46
    }
47
    
48
    public function supportsLogicKeywords() : bool
49
    {
50
        return false;
51
    }
52
53
    public function generatesContent(): bool
54
    {
55
        return false;
56
    }
57
58
    protected function getValidations(): array
59
    {
60
        return array();
61
    }
62
    
63
    public function getParentName() : string
64
    {
65
        return 'if';
66
    }
67
}
68