Code Duplication    Length = 6-6 lines in 2 locations

src/SubStream.php 2 locations

@@ 62-67 (lines=6) @@
59
            return false;
60
        }
61
62
        if (!isset($parts['host']) || !\is_numeric($parts['host'])) {
63
            $errors && \trigger_error("Invalid start offset.", \E_USER_ERROR);
64
            return false;
65
        } else {
66
            $offset = \intval($parts['host']);
67
        }
68
69
        if (!isset($parts['port']) || !\is_numeric($parts['port'])) {
70
            $errors && \trigger_error("Invalid length.", \E_USER_ERROR);
@@ 69-74 (lines=6) @@
66
            $offset = \intval($parts['host']);
67
        }
68
69
        if (!isset($parts['port']) || !\is_numeric($parts['port'])) {
70
            $errors && \trigger_error("Invalid length.", \E_USER_ERROR);
71
            return false;
72
        } else {
73
            $length = \intval($parts['port']);
74
        }
75
76
        if (!isset($parts['path']) || !\is_numeric(\substr($parts['path'], 1))) {
77
            $errors && \trigger_error("Invalid resource to wrap.", \E_USER_ERROR);