Code Duplication    Length = 3-4 lines in 2 locations

PHPDaemon/BoundSocket/TCP.php 1 location

@@ 53-56 (lines=4) @@
50
            return false;
51
        }
52
        $port = $this->getPort();
53
        if (!is_int($port)) {
54
            Daemon::log(get_class($this) . ' (' . get_class($this->pool) . '): no port defined for \'' . $this->uri['uri'] . '\'');
55
            return;
56
        }
57
        if (($port < 1024) && Daemon::$config->user->value !== 'root') {
58
            $this->listenerMode = false;
59
        }

PHPDaemon/BoundSocket/UDP.php 1 location

@@ 112-114 (lines=3) @@
109
        if (!isset($this->port)) {
110
            if (isset($this->defaultPort)) {
111
                $this->port = $this->defaultPort;
112
            } else {
113
                Daemon::log(get_class($this) . ' (' . get_class($this->pool) . '): no port defined for \'' . $this->uri['uri'] . '\'');
114
            }
115
        }
116
        if ($this->reuse) {
117
            if (!socket_set_option($sock, SOL_SOCKET, SO_REUSEADDR, 1)) {