AbstractVariable::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
/**
3
 * NextFlow (http://github.com/nextflow)
4
 *
5
 * @link http://github.com/nextflow/nextflow-php for the canonical source repository
6
 * @copyright Copyright (c) 2014-2016 NextFlow (http://github.com/nextflow)
7
 * @license https://raw.github.com/nextflow/nextflow-php/master/LICENSE MIT
8
 */
9
10
namespace NextFlow\Core\Variable;
11
12
use NextFlow\Core\Node\AbstractNode;
13
14
/**
15
 * The base final class for all variables.
16
 */
17
abstract class AbstractVariable extends AbstractNode implements VariableInterface
18
{
19
    /**
20
     * Initializes a new instance of this class.
21
     *
22
     * @param mixed $value The value to set.
23
     */
24
    public function __construct($value = null)
25
    {
26
        parent::__construct();
27
28
        if ($value !== null) {
29
            $this->setValue($value);
30
        }
31
    }
32
33
    /**
34
     * Executes the node's logic.
35
     */
36
    public function execute()
37
    {
38
        // There is nothing to execute but we keep it here so that all variables don't have to
39
        // implement this method.
40
    }
41
}
42