Code Duplication    Length = 8-8 lines in 2 locations

PHPDaemon/Thread/Worker.php 1 location

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

PHPDaemon/Thread/IPC.php 1 location

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