AbstractVariable   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A execute() 0 5 1
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