Code Duplication    Length = 4-4 lines in 3 locations

PHPDaemon/Core/ShellCommand.php 2 locations

@@ 234-237 (lines=4) @@
231
        if ($this->timeout !== null) {
232
            $this->setTimeout($this->timeout);
233
        }
234
        if (!$this->bev->enable(\Event::READ | \Event::TIMEOUT | \Event::PERSIST)) {
235
            $this->finish();
236
            return;
237
        }
238
        if (!$this->bevWrite->enable(\Event::WRITE | \Event::TIMEOUT | \Event::PERSIST)) {
239
            $this->finish();
240
            return;
@@ 238-241 (lines=4) @@
235
            $this->finish();
236
            return;
237
        }
238
        if (!$this->bevWrite->enable(\Event::WRITE | \Event::TIMEOUT | \Event::PERSIST)) {
239
            $this->finish();
240
            return;
241
        }
242
        $this->bev->setWatermark(\Event::READ, $this->lowMark, $this->highMark);
243
244
        init:

PHPDaemon/Network/IOStream.php 1 location

@@ 342-345 (lines=4) @@
339
            $this->finish();
340
            return;
341
        }
342
        if (!$this->bev->enable(\Event::READ | \Event::WRITE | \Event::TIMEOUT | \Event::PERSIST)) {
343
            $this->finish();
344
            return;
345
        }
346
        $this->bev->setWatermark(\Event::READ, $this->lowMark, $this->highMark);
347
        init:
348
        if ($this->keepalive && $this->fd != null) {