Code Duplication    Length = 3-5 lines in 2 locations

src/URI.php 1 location

@@ 118-120 (lines=3) @@
115
        foreach ($headers as $header) {
116
            $split = array_map('trim', mb_split($delimiter, $header));
117
            foreach ($split as $string) {
118
                if (mb_stripos($string, $part . '=') === 0) {
119
                    return mb_split('=', $string, 2)[1];
120
                }
121
            }
122
        }
123
        return false;

src/Client/Directives/DisAllowClient.php 1 location

@@ 73-77 (lines=5) @@
70
    {
71
        // Encode
72
        $url = $this->urlEncode($url);
73
        if (mb_stripos($url, '/') === 0) {
74
            // Strip fragments
75
            $url = mb_split('#', $url)[0];
76
            return $url;
77
        }
78
        if (!$this->urlValidate($url)) {
79
            throw new ClientException('Invalid URL');
80
        }