Code Duplication    Length = 6-6 lines in 2 locations

src/Socket/Socket.php 1 location

@@ 313-318 (lines=6) @@
310
            $context
311
        );
312
313
        if (!$socket || $errno > 0)
314
        {
315
            throw new LogicException(
316
                sprintf('Could not connect socket [%s] because of error [%d; %s]', $endpoint, $errno, $errstr)
317
            );
318
        }
319
320
        stream_set_blocking($socket, false);
321

src/Socket/SocketListener.php 1 location

@@ 428-433 (lines=6) @@
425
            $context
426
        );
427
428
        if (!$socket || $errno > 0)
429
        {
430
            throw new LogicException(
431
                sprintf('Could not bind socket [%s] because of error [%d; %s]', $endpoint, $errno, $errstr)
432
            );
433
        }
434
435
        return $socket;
436
    }