Code Duplication    Length = 4-4 lines in 2 locations

src/Classification/DecisionTree/DecisionTreeLeaf.php 2 locations

@@ 106-109 (lines=4) @@
103
        $nodeSampleCount = (float) count($this->records);
104
        $iT = $this->giniIndex;
105
106
        if ($this->leftLeaf !== null) {
107
            $pL = count($this->leftLeaf->records) / $nodeSampleCount;
108
            $iT -= $pL * $this->leftLeaf->giniIndex;
109
        }
110
111
        if ($this->rightLeaf !== null) {
112
            $pR = count($this->rightLeaf->records) / $nodeSampleCount;
@@ 111-114 (lines=4) @@
108
            $iT -= $pL * $this->leftLeaf->giniIndex;
109
        }
110
111
        if ($this->rightLeaf !== null) {
112
            $pR = count($this->rightLeaf->records) / $nodeSampleCount;
113
            $iT -= $pR * $this->rightLeaf->giniIndex;
114
        }
115
116
        return $iT * $nodeSampleCount / $parentRecordCount;
117
    }