Code Duplication    Length = 10-11 lines in 2 locations

src/Histogram/Histogram.php 2 locations

@@ 163-173 (lines=11) @@
160
     * @access  public
161
     * @return  mixed   an associative array on success, a \PEAR_Error object otherwise
162
     */
163
    public function getDataStats()
164
    {
165
        if ($this->isCalculated()) {
166
            $this->_stats->setData($this->_data);
167
168
            return $this->_stats->calc($this->_statsMode);
169
        } else {
170
            throw new \PEAR_Exception("histogram has not been calculated");
171
        }
172
    }
173
174
    /**
175
     * Returns the statistics for the data set, filtered using the bin range
176
     *
@@ 180-189 (lines=10) @@
177
     * @access  public
178
     * @return  mixed   an associative array on success, a \PEAR_Error object otherwise
179
     */
180
    public function getHistogramDataStats()
181
    {
182
        if ($this->isCalculated()) {
183
            $this->_stats->setData($this->_histogramData());
184
            return $this->_stats->calc($this->_statsMode);
185
        } else {
186
            throw new \PEAR_Exception("histogram has not been calculated");
187
        }
188
    }
189
190
    /**
191
     * Returns the bins and frequencies calculated using the given
192
     * bin mode and separator