Code Duplication    Length = 40-40 lines in 2 locations

src/Variables/AsWellAs.php 1 location

@@ 13-52 (lines=40) @@
10
11
namespace Lechimp\Dicto\Variables;
12
13
class AsWellAs extends Variable {
14
    /**
15
     * @var Variable
16
     */
17
    private $left;
18
19
    /**
20
     * @var Variable
21
     */
22
    private $right;
23
24
    public function __construct($name, Variable $left, Variable $right) {
25
        parent::__construct($name);
26
        $this->left = $left;
27
        $this->right = $right;
28
    }
29
30
    /**
31
     * @return  Variable
32
     */
33
    public function left() {
34
        return $this->left;
35
    }
36
37
    /**
38
     * @return  Variable
39
     */
40
    public function right() {
41
        return $this->right;
42
    }
43
44
    /**
45
     * @inheritdoc
46
     */
47
    public function explain($text) {
48
        $v = new AsWellAs($this->name(), $this->left, $this->right);
49
        $v->setExplanation($text);
50
        return $v;
51
    }
52
}
53

src/Variables/ButNot.php 1 location

@@ 13-52 (lines=40) @@
10
11
namespace Lechimp\Dicto\Variables;
12
13
class ButNot extends Variable {
14
    /**
15
     * @var Variable
16
     */
17
    private $left;
18
19
    /**
20
     * @var Variable
21
     */
22
    private $right;
23
24
    public function __construct($name, Variable $left, Variable $right) {
25
        parent::__construct($name);
26
        $this->left = $left;
27
        $this->right = $right;
28
    }
29
30
    /**
31
     * @return  Variable
32
     */
33
    public function left() {
34
        return $this->left;
35
    }
36
37
    /**
38
     * @return  Variable
39
     */
40
    public function right() {
41
        return $this->right;
42
    }
43
44
    /**
45
     * @inheritdoc
46
     */
47
    public function explain($text) {
48
        $v = new ButNot($this->name(), $this->left, $this->right);
49
        $v->setExplanation($text);
50
        return $v;
51
    }
52
}
53