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

@@ 22-32 (lines=11) @@
19
     * @param integer $timeout
20
     *            Optional timeout for request (default = 10 seconds)
21
     */
22
    public function __construct(Url $url, $proto = 'HTTP/1.1', $timeout = 10)
23
    {
24
        parent::__construct($url);
25
        
26
        $this->setTimeout($timeout);
27
        $this->setPath($url->getPath());
28
        $this->setProtocol($proto);
29
        $this->setQueryString($url->getQueryString());
30
        $this->reset();
31
        $this->resetHeaders();
32
    }
33
    
34
    /**
35
     *