Captioning\File::getStats PHP Method

getStats() public method

Computes reading speed statistics
public getStats ( )
    public function getStats()
    {
        $this->stats = array('tooSlow' => 0, 'slowAcceptable' => 0, 'aBitSlow' => 0, 'goodSlow' => 0, 'perfect' => 0, 'goodFast' => 0, 'aBitFast' => 0, 'fastAcceptable' => 0, 'tooFast' => 0);
        $cuesCount = $this->getCuesCount();
        for ($i = 0; $i < $cuesCount; $i++) {
            $rs = $this->getCue($i)->getReadingSpeed();
            if ($rs < 5) {
                $this->stats['tooSlow']++;
            } elseif ($rs < 10) {
                $this->stats['slowAcceptable']++;
            } elseif ($rs < 13) {
                $this->stats['aBitSlow']++;
            } elseif ($rs < 15) {
                $this->stats['goodSlow']++;
            } elseif ($rs < 23) {
                $this->stats['perfect']++;
            } elseif ($rs < 27) {
                $this->stats['goodFast']++;
            } elseif ($rs < 31) {
                $this->stats['aBitFast']++;
            } elseif ($rs < 35) {
                $this->stats['fastAcceptable']++;
            } else {
                $this->stats['tooFast']++;
            }
        }
        return $this->stats;
    }