Code Duplication    Length = 9-9 lines in 2 locations

src/Response/StreamReader.php 2 locations

@@ 131-139 (lines=9) @@
128
     * @param array $definition [$valueType]
129
     * @return array
130
     */
131
    public function readList(array $definition) {
132
        list($valueType) = $definition;
133
        $list = [];
134
        $count = $this->readInt();
135
        for ($i = 0; $i < $count; ++$i) {
136
            $list[] = $this->readValue($valueType);
137
        }
138
        return $list;
139
    }
140
141
    /**
142
     * Read map.
@@ 147-155 (lines=9) @@
144
     * @param array $definition [$keyType, $valueType]
145
     * @return array
146
     */
147
    public function readMap(array $definition) {
148
        list($keyType, $valueType) = $definition;
149
        $map = [];
150
        $count = $this->readInt();
151
        for ($i = 0; $i < $count; ++$i) {
152
            $map[$this->readValue($keyType)] = $this->readValue($valueType);
153
        }
154
        return $map;
155
    }
156
157
    /**
158
     *