Code Duplication    Length = 7-7 lines in 2 locations

src/Math/Stats.php 2 locations

@@ 1043-1049 (lines=7) @@
1040
            }
1041
            $invsum = 0.0;
1042
            if ($this->_dataOption == self::STATS_DATA_CUMMULATIVE) {
1043
                foreach ($this->_data as $val => $freq) {
1044
                    if ($val == 0) {
1045
                        throw new \PEAR_Exception('cannot calculate a ' .
1046
                            'harmonic mean with data values of zero.');
1047
                    }
1048
                    $invsum += $freq / $val;
1049
                }
1050
            } else {
1051
                foreach ($this->_data as $val) {
1052
                    if ($val == 0) {
@@ 1051-1057 (lines=7) @@
1048
                    $invsum += $freq / $val;
1049
                }
1050
            } else {
1051
                foreach ($this->_data as $val) {
1052
                    if ($val == 0) {
1053
                        throw new \PEAR_Exception('cannot calculate a ' .
1054
                            'harmonic mean with data values of zero.');
1055
                    }
1056
                    $invsum += 1 / $val;
1057
                }
1058
            }
1059
            $this->_calculatedValues['harmonicMean'] = $count / $invsum;
1060
        }