Code Duplication    Length = 4-4 lines in 2 locations

PHPDaemon/Network/Connection.php 1 location

@@ 353-356 (lines=4) @@
350
        if (!$this->ctxname) {
351
            return;
352
        }
353
        if (!isset(Daemon::$config->{'TransportContext:' . $this->ctxname})) {
354
            Daemon::log(get_class($this) . ': undefined transport context \'' . $this->ctxname . '\'');
355
            return;
356
        }
357
        $ctx = Daemon::$config->{'TransportContext:' . $this->ctxname};
358
        foreach ($ctx as $key => $entry) {
359
            $value = ($entry instanceof Config\Entry\Generic) ? $entry->value : $entry;

PHPDaemon/BoundSocket/Generic.php 1 location

@@ 231-234 (lines=4) @@
228
        if (!$this->ctxname) {
229
            return;
230
        }
231
        if (!isset(Daemon::$config->{'TransportContext:' . $this->ctxname})) {
232
            Daemon::log(get_class($this) . ': undefined transport context \'' . $this->ctxname . '\'');
233
            return;
234
        }
235
        $ctx = Daemon::$config->{'TransportContext:' . $this->ctxname};
236
        foreach ($ctx as $key => $entry) {
237
            $value = ($entry instanceof \PHPDaemon\Config\Entry\Generic) ? $entry->value : $entry;