Code Duplication    Length = 11-13 lines in 2 locations

src/Generics/Client/HttpClient.php 1 location

@@ 40-52 (lines=13) @@
37
     * @param integer $timeout
38
     *            Optional timeout for request (default = 10 seconds)
39
     */
40
    public function __construct(Url $url, $proto = 'HTTP/1.1', $timeout = 10)
41
    {
42
        parent::__construct($url);
43
        
44
        $this->secure = $url->getScheme() == 'https';
45
46
        $this->setTimeout($timeout);
47
        $this->setPath($url->getPath());
48
        $this->setProtocol($proto);
49
        $this->setQueryString($url->getQueryString());
50
        $this->reset();
51
        $this->resetHeaders();
52
    }
53
54
    /**
55
     *

src/Generics/Client/HttpsClient.php 1 location

@@ 32-42 (lines=11) @@
29
     * @param integer $timeout
30
     *            Optional timeout for request (default = 10 seconds)
31
     */
32
    public function __construct(Url $url, $proto = 'HTTP/1.1', $timeout = 10)
33
    {
34
        parent::__construct($url);
35
        
36
        $this->setTimeout($timeout);
37
        $this->setPath($url->getPath());
38
        $this->setProtocol($proto);
39
        $this->setQueryString($url->getQueryString());
40
        $this->reset();
41
        $this->resetHeaders();
42
    }
43
    
44
    /**
45
     *