Code Duplication    Length = 11-11 lines in 2 locations

src/Comodojo/Extender/Components/Ipc.php 2 locations

@@ 57-67 (lines=11) @@
54
55
    }
56
57
    public function read($uid) {
58
59
        $reader = $this->ipc[$uid][self::READER];
60
61
        $result = socket_read($reader, $this->bytes, PHP_BINARY_READ);
62
63
        if ( $result === false ) throw new Exception("Socket error: ".socket_strerror(socket_last_error($reader)));
64
65
        return $result;
66
67
    }
68
69
    public function write($uid, $data) {
70
@@ 69-79 (lines=11) @@
66
67
    }
68
69
    public function write($uid, $data) {
70
71
        $writer = $this->ipc[$uid][self::WRITER];
72
73
        $result = socket_write($writer, $data, strlen($data));
74
75
        if ( $result === false ) throw new Exception("Socket error: ".socket_strerror(socket_last_error($writer)));
76
77
        return $result;
78
79
    }
80
81
    public function close($uid, $handler) {
82