Code Duplication    Length = 8-9 lines in 3 locations

src/DiceCalc/CalcSet.php 3 locations

@@ 67-74 (lines=8) @@
64
        return $out;
65
    }
66
67
    public function calc($operator, $operand) {
68
        $out = [];
69
        foreach ($this->values as $value) {
70
            $out[] = CalcOperation::calc($operator, $operand, $value);
71
        }
72
73
        return new CalcSet($out);
74
    }
75
76
    public function rcalc($operator, $operand) {
77
        $out = [];
@@ 76-83 (lines=8) @@
73
        return new CalcSet($out);
74
    }
75
76
    public function rcalc($operator, $operand) {
77
        $out = [];
78
        foreach ($this->values as $value) {
79
            $out[] = CalcOperation::calc($operator, $value, $operand);
80
        }
81
82
        return new CalcSet($out);
83
    }
84
85
    public function mcalc($operator, $operand)
86
    {
@@ 85-93 (lines=9) @@
82
        return new CalcSet($out);
83
    }
84
85
    public function mcalc($operator, $operand)
86
    {
87
        $out = [];
88
        foreach ($this->values as $value) {
89
            $out[] = $operand->rcalc($operator, $value);
90
        }
91
92
        return new CalcSet($out);
93
    }
94
95
    public function value()
96
    {