Code Duplication    Length = 6-6 lines in 2 locations

PHPDaemon/Thread/IPC.php 1 location

@@ 202-207 (lines=6) @@
199
    public function shutdown($hard = false)
200
    {
201
        $error = error_get_last();
202
        if ($error) {
203
            if ($error['type'] === E_ERROR) {
204
                $this->log('crashed by error \'' . $error['message'] . '\' at ' . $error['file'] . ':' . $error['line']);
205
            }
206
        }
207
208
        if (Daemon::$config->throwexceptiononshutdown->value) {
209
            throw new \Exception('event shutdown');
210
        }

PHPDaemon/Thread/Worker.php 1 location

@@ 546-551 (lines=6) @@
543
    protected function shutdown($hard = false)
544
    {
545
        $error = error_get_last();
546
        if ($error) {
547
            if ($error['type'] === E_ERROR) {
548
                Daemon::log('W#' . $this->pid . ' crashed by error \'' . $error['message'] . '\' at ' . $error['file'] . ':' . $error['line']);
549
            }
550
        }
551
552
        if (Daemon::$config->throwexceptiononshutdown->value) {
553
            throw new \Exception('event shutdown');
554
        }