Code Duplication    Length = 3-3 lines in 2 locations

src/Histogram/Histogram.php 1 location

@@ 280-282 (lines=3) @@
277
        $bins    = $this->_filterBins($mode);
278
        $maxfreq = max(array_values($bins));
279
        $total   = count($this->_data);
280
        foreach ($bins as $bin => $freq) {
281
            $out .= sprintf($fmt, $bin, $freq, $this->_bar($freq, $maxfreq, $total));
282
        }
283
284
        return $out;
285
    }

src/Histogram/Printer/Text.php 1 location

@@ 52-54 (lines=3) @@
49
        $out .= "\tData range: [" . min($hdata) . ", " . max($hdata) . "]\n";
50
        $out .= "\tOriginal data range: [" . min($data) . ", " . max($data) . "]\n";
51
        $out .= "BIN (FREQUENCY) ASCII_BAR (%)\n";
52
        foreach ($bins as $bin => $freq) {
53
            $out .= sprintf($fmt, $bin, $freq, $this->_bar($freq, $maxfreq, $total));
54
        }
55
        if ($this->_options['outputStats']) {
56
            $out .= "\n --- Histogram Statistics ---\n";
57
            $out .= $this->_printStats($this->_hist->getHistogramDataStats());