Code Duplication    Length = 10-10 lines in 2 locations

src/Request/UriParser.php 1 location

@@ 39-48 (lines=10) @@
36
    /**
37
     * {@inheritDoc}
38
     */
39
    public function toPsrUri($uri)
40
    {
41
        if ($uri instanceof UriInterface) {
42
            return $uri;
43
        } elseif (is_string($uri)) {
44
            return new Uri($uri);
45
        }
46
47
        throw new InvalidArgumentException('URI must be a string or an instance of \Psr\Http\Message\UriInterface.');
48
    }
49
}
50

src/Signature/BaseStringBuilder.php 1 location

@@ 126-135 (lines=10) @@
123
     * @return \Psr\Http\Message\UriInterface
124
     * @throws \InvalidArgumentException
125
     */
126
    public function parseToPsrUri($uri)
127
    {
128
        if ($uri instanceof UriInterface) {
129
            return $uri;
130
        } elseif (is_string($uri)) {
131
            return new Uri($uri);
132
        }
133
134
        throw new InvalidArgumentException('URI must be a string or an instance of \Psr\Http\Message\UriInterface');
135
    }
136
}
137