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
        if (Daemon::$config->logevents->value) {
208
            $this->log('event shutdown(' . ($hard ? 'HARD' : '') . ') invoked.');
209
        }
210

PHPDaemon/Thread/Worker.php 1 location

@@ 535-540 (lines=6) @@
532
    protected function shutdown($hard = false)
533
    {
534
        $error = error_get_last();
535
        if ($error) {
536
            if ($error['type'] === E_ERROR) {
537
                Daemon::log('W#' . $this->pid . ' crashed by error \'' . $error['message'] . '\' at ' . $error['file'] . ':' . $error['line']);
538
            }
539
        }
540
        if (Daemon::$config->logevents->value) {
541
            $this->log('event shutdown(' . ($hard ? 'HARD' : '') . ') invoked.');
542
        }
543