Passed
Push — master ( 1515ff...7c0b30 )
by Sebastian
04:21
created

Mailcode_Commands_Command_ShowVariable::validateSyntax_require_variable()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 8
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 14
rs 10
1
<?php
2
/**
3
 * File containing the {@see Mailcode_Commands_Command_ShowVariable} class.
4
 *
5
 * @package Mailcode
6
 * @subpackage Commands
7
 * @see Mailcode_Commands_Command_ShowVariable
8
 */
9
10
declare(strict_types=1);
11
12
namespace Mailcode;
13
14
/**
15
 * Mailcode command: show a variable value.
16
 *
17
 * @package Mailcode
18
 * @subpackage Commands
19
 * @author Sebastian Mordziol <[email protected]>
20
 */
21
class Mailcode_Commands_Command_ShowVariable extends Mailcode_Commands_Command implements Mailcode_Commands_Command_Type_Standalone
22
{
23
    use Mailcode_Traits_Commands_Validation_Variable;
24
    
25
    public function getName() : string
26
    {
27
        return 'showvar';
28
    }
29
    
30
    public function getLabel() : string
31
    {
32
        return t('Show variable');
33
    }
34
    
35
    public function supportsType(): bool
36
    {
37
        return false;
38
    }
39
    
40
    public function getDefaultType() : string
41
    {
42
        return '';
43
    }
44
45
    public function requiresParameters(): bool
46
    {
47
        return true;
48
    }
49
    
50
    public function supportsLogicKeywords() : bool
51
    {
52
        return false;
53
    }
54
    
55
    protected function getValidations() : array
56
    {
57
        return array('variable');
58
    }
59
    
60
    public function generatesContent() : bool
61
    {
62
        return true;
63
    }
64
}
65