Code Duplication    Length = 8-8 lines in 2 locations

PHPDaemon/Thread/IPC.php 1 location

@@ 133-140 (lines=8) @@
130
        }
131
132
        if (Daemon::$config->chroot->value !== '/') {
133
            if (posix_getuid() != 0) {
134
                $this->log('You must have the root privileges to change root.');
135
                exit(0);
136
            } elseif (!chroot(Daemon::$config->chroot->value)) {
137
                Daemon::log('Couldn\'t change root to \'' . Daemon::$config->chroot->value . '\'.');
138
                exit(0);
139
            }
140
        }
141
142
        if (isset(Daemon::$config->group->value)) {
143
            if ($sg === false) {

PHPDaemon/Thread/Worker.php 1 location

@@ 373-380 (lines=8) @@
370
371
        $flushCache = false;
372
        if (Daemon::$config->chroot->value !== '/') {
373
            if (posix_getuid() != 0) {
374
                Daemon::log('You must have the root privileges to change root.');
375
                exit(0);
376
            } elseif (!chroot(Daemon::$config->chroot->value)) {
377
                Daemon::log('Couldn\'t change root to \'' . Daemon::$config->chroot->value . '\'.');
378
                exit(0);
379
            }
380
            $flushCache = true;
381
        }
382
383
        if (isset(Daemon::$config->group->value)) {