Passed
Push — master ( 62880d...2f714f )
by Sebastian
07:50
created

Mailcode_Commands_Command_ElseIf::getParentName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * File containing the {@see Mailcode_Commands_Command_ElseIf} class.
4
 *
5
 * @package Mailcode
6
 * @subpackage Commands
7
 * @see Mailcode_Commands_Command_ElseIf
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_ElseIf extends Mailcode_Commands_Command_Type_Sibling
22
{
23
    public function getName() : string
24
    {
25
        return 'elseif';
26
    }
27
    
28
    public function getLabel() : string
29
    {
30
        return t('ELSE IF condition');
31
    }
32
    
33
    public function supportsType(): bool
34
    {
35
        return true;
36
    }
37
38
    public function requiresParameters(): bool
39
    {
40
        return true;
41
    }
42
43
    public function generatesContent(): bool
44
    {
45
        return false;
46
    }
47
48
    public function getSupportedTypes() : array
49
    {
50
        return array(
51
            'variable',
52
            'command'
53
        );
54
    }
55
    
56
    protected function getValidations(): array
57
    {
58
        return array();
59
    }
60
    
61
    public function getParentName() : string
62
    {
63
        return 'if';
64
    }
65
}
66