Completed
Push — master ( 689ba3...487dca )
by Richard
05:45
created

Compound   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 31
ccs 9
cts 9
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A left() 0 3 1
A right() 0 3 1
1
<?php
2
/******************************************************************************
3
 * An implementation of dicto (scg.unibe.ch/dicto) in and for PHP.
4
 * 
5
 * Copyright (c) 2016, 2015 Richard Klees <[email protected]>
6
 *
7
 * This software is licensed under The MIT License. You should have received 
8
 * a copy of the licence along with the code.
9
 */
10
11
namespace Lechimp\Dicto\Variables;
12
13
abstract class Compound extends Variable {
14
    /**
15
     * @var Variable
16
     */
17
    private $left;
18
19
    /**
20
     * @var Variable
21
     */
22
    private $right;
23
24 107
    public function __construct($name, Variable $left, Variable $right) {
25 107
        parent::__construct($name);
26 107
        $this->left = $left;
27 107
        $this->right = $right;
28 107
    }
29
30
    /**
31
     * @return  Variable
32
     */
33 21
    public function left() {
34 21
        return $this->left;
35
    }
36
37
    /**
38
     * @return  Variable
39
     */
40 21
    public function right() {
41 21
        return $this->right;
42
    }
43
}
44