StepNode   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 44
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getExecute() 0 3 1
A getType() 0 3 1
1
<?php
2
3
/**
4
 * \AppserverIo\Provisioning\Api\Node\StepNode
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 5
13
 *
14
 * @author    Tim Wagner <[email protected]>
15
 * @copyright 2018 TechDivision GmbH <[email protected]>
16
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link      https://github.com/appserver-io/provisioning
18
 * @link      http://www.appserver.io
19
 */
20
21
namespace AppserverIo\Provisioning\Api\Node;
22
23
use AppserverIo\Description\Annotations as DI;
24
use AppserverIo\Description\Api\Node\AbstractNode;
25
use AppserverIo\Description\Api\Node\ParamsNodeTrait;
26
use AppserverIo\Provisioning\Configuration\StepConfigurationInterface;
27
28
/**
29
 * DTO to transfer a applications provision configuration.
30
 *
31
 * @author    Tim Wagner <[email protected]>
32
 * @copyright 2018 TechDivision GmbH <[email protected]>
33
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
 * @link      https://github.com/appserver-io/provisioning
35
 * @link      http://www.appserver.io
36
 */
37
class StepNode extends AbstractNode implements StepConfigurationInterface
38
{
39
40
    /**
41
     * A params node trait.
42
     *
43
     * @var \AppserverIo\Description\Api\Node\ParamsNodeTrait
44
     */
45
    use ParamsNodeTrait;
46
47
    /**
48
     * The step type
49
     *
50
     * @var string
51
     * @DI\Mapping(nodeType="string")
52
     */
53
    protected $type;
54
55
    /**
56
     * The node containing the information to execute something like a script.
57
     *
58
     * @var \AppserverIo\Provisioning\Api\Node\ExecuteNode
59
     * @DI\Mapping(nodeName="execute", nodeType="AppserverIo\Provisioning\Api\Node\ExecuteNode")
60
     */
61
    protected $execute;
62
63
    /**
64
     * Returns the step type
65
     *
66
     * @return string The step type
67
     */
68
    public function getType()
69
    {
70
        return $this->type;
71
    }
72
73
    /**
74
     * Returns the node containing installation information.
75
     *
76
     * @return \AppserverIo\Provisioning\Api\Node\InstallationNode The node containing installation information
77
     */
78
    public function getExecute()
79
    {
80
        return $this->execute;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->execute returns the type AppserverIo\Provisioning\Api\Node\ExecuteNode which is incompatible with the documented return type AppserverIo\Provisioning\Api\Node\InstallationNode.
Loading history...
81
    }
82
}
83