src/ErrorHandler/ErrorEmailer.php
protected function throttleDataGarbageCollection()
    {
        $tsNow     = \time();
        $tsCutoff  = $tsNow - $this->cfg['emailMin'] * 60;
        if ($this->throttleData['tsGarbageCollection'] > $tsCutoff) {
            // we've recently performed garbage collection
            return;
        }
        // garbage collection time
        $emailBody = '';
        $sendEmailSummary = false;
        $this->throttleData['tsGarbageCollection'] = $tsNow;
        foreach ($this->throttleData['errors'] as $k => $err) {
            if ($err['tsEmailed'] > $tsCutoff) {
                continue;
            }
            // it's been a while since this error was emailed
            if ($err['emailedTo'] != $this->cfg['emailTo']) {
                // it was emailed to a different address
                if ($err['countSince'] < 1 || $err['tsEmailed'] < $tsNow - 60*60*24) {
                    unset($this->throttleData['errors'][$k]);
                }
                continue;
            }
            unset($this->throttleData['errors'][$k]);
            if ($err['countSince'] > 0) {
                $dateLastEmailed = \date('Y-m-d H:i:s', $err['tsEmailed']);
                $emailBody .= ''
                    .'File: '.$err['file']."\n"
                    .'Line: '.$err['line']."\n"
                    .'Error: '.$this->errTypes[ $err['errType'] ].': '.$err['errMsg']."\n"
                    .'Has occured '.$err['countSince'].' times since '.$dateLastEmailed."\n\n";
                $sendEmailSummary = $this->cfg['emailThrottledSummary'];
            }
        }
        if ($sendEmailSummary) {
            $this->email($this->cfg['emailTo'], 'Website Errors: '.$_SERVER['SERVER_NAME'], $emailBody);
        }
    }
protected function throttleDataGarbageCollection()
    {
        $tsNow     = \time();
        $tsCutoff  = $tsNow - $this->cfg['emailMin'] * 60;
        if ($this->throttleData['tsGarbageCollection'] > $tsCutoff) {
            // we've recently performed garbage collection
            return;
        }
        // garbage collection time
        $emailBody = '';
        $sendEmailSummary = false;
        $this->throttleData['tsGarbageCollection'] = $tsNow;
        foreach ($this->throttleData['errors'] as $k => $err) {
            if ($err['tsEmailed'] > $tsCutoff) {
                continue;
            }
            // it's been a while since this error was emailed
            if ($err['emailedTo'] != $this->cfg['emailTo']) {
                // it was emailed to a different address
                if ($err['countSince'] < 1 || $err['tsEmailed'] < $tsNow - 60*60*24) {
                    unset($this->throttleData['errors'][$k]);
                }
                continue;
            }
            unset($this->throttleData['errors'][$k]);
            if ($err['countSince'] > 0) {
                $dateLastEmailed = \date('Y-m-d H:i:s', $err['tsEmailed']);
                $emailBody .= ''
                    .'File: '.$err['file']."\n"
                    .'Line: '.$err['line']."\n"
                    .'Error: '.$this->errTypes[ $err['errType'] ].': '.$err['errMsg']."\n"
                    .'Has occured '.$err['countSince'].' times since '.$dateLastEmailed."\n\n";
                $sendEmailSummary = $this->cfg['emailThrottledSummary'];
            }
        }
        if ($sendEmailSummary) {
            $this->email($this->cfg['emailTo'], 'Website Errors: '.$_SERVER['SERVER_NAME'], $emailBody);
        }
    }
Remove errors in throttleData that haven't occured recently
If error(s) have occured since they were last emailed, a summary email will be sent

@return void