Code Duplication    Length = 8-9 lines in 2 locations

PHPDaemon/Thread/Worker.php 2 locations

@@ 496-504 (lines=9) @@
493
     * Graceful restart
494
     * @return void
495
     */
496
    public function gracefulRestart()
497
    {
498
        $this->graceful = true;
499
        $this->reload = true;
500
        Timer::add(function () {
501
            EventLoop::$instance->stop();
502
        }, $this->reloadDelay * 1e6);
503
        $this->setState($this->state);
504
    }
505
506
    /**
507
     * Graceful stop
@@ 510-517 (lines=8) @@
507
     * Graceful stop
508
     * @return void
509
     */
510
    public function gracefulStop()
511
    {
512
        $this->graceful = true;
513
        Timer::add(function () {
514
            EventLoop::$instance->stop();
515
        }, $this->reloadDelay * 1e6);
516
        $this->setState($this->state);
517
    }
518
519
    /**
520
     * Asks the running applications the whether we can go to shutdown current (old) worker.