Test Failed
Push — master ( 728016...1ac98c )
by P.R.
01:34
created

BaseCommand.execute()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.4218

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 1
cts 4
cp 0.25
rs 9.4285
cc 1
crap 1.4218
1
"""
2
SDoc
3
4
Copyright 2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8 1
from cleo import Command
9
10
11 1
class BaseCommand(Command):
12
    """
13
    Abstract parent command for all out commands.
14
    """
15
16
    # ------------------------------------------------------------------------------------------------------------------
17 1
    def __init__(self, name=None):
18
        """
19
        Object constructor.
20
21
        :param str|None name: The name of the command.
22
        """
23
        Command.__init__(self, name)
24
25
        self.output = None
26
        """
27
        The IO object.
28
29
        :type: None|cleo.styles.output_style.OutputStyle
30
        """
31
32
    # ------------------------------------------------------------------------------------------------------------------
33 1
    def execute(self, i, o):
34
        self.input = i
35
        self.output = o
36
37
        return self.handle()
38
39
# ----------------------------------------------------------------------------------------------------------------------
40