Code Duplication    Length = 10-10 lines in 2 locations

src/Generics/Socket/ClientSocket.php 1 location

@@ 33-42 (lines=10) @@
30
     * @param resource $clientHandle
31
     *            optional existing client handle
32
     */
33
    public function __construct(Endpoint $endpoint, $clientHandle = null)
34
    {
35
        $this->endpoint = $endpoint;
36
        $this->handle = $clientHandle;
37
        $this->conntected = false;
38
        
39
        if (! is_resource($clientHandle)) {
40
            parent::__construct($endpoint);
41
        }
42
    }
43
44
    /**
45
     * Connect to remote endpoint

src/Generics/Socket/SecureClientSocket.php 1 location

@@ 32-41 (lines=10) @@
29
     * @param resource $clientHandle
30
     *            optional existing client handle
31
     */
32
    public function __construct(Endpoint $endpoint, $clientHandle = null)
33
    {
34
        $this->endpoint = $endpoint;
35
        $this->handle = $clientHandle;
36
        $this->conntected = false;
37
        
38
        if (! is_resource($clientHandle)) {
39
            parent::__construct($endpoint);
40
        }
41
    }
42
43
    /**
44
     * Connect to remote endpoint