Code Duplication    Length = 12-12 lines in 2 locations

src/Value/ArrayValue.php 1 location

@@ 30-41 (lines=12) @@
27
     *
28
     * @return array
29
     */
30
    public static function decode(Buffer $data)
31
    {
32
        $length = LongValue::decode($data);
33
        $buffer = new Buffer($data->read($length));
34
        $elements = [];
35
36
        while (!$buffer->eof()) {
37
            $elements[] = TypifiedValue::decode($buffer);
38
        }
39
40
        return $elements;
41
    }
42
}
43

src/Value/TableValue.php 1 location

@@ 30-41 (lines=12) @@
27
     *
28
     * @return array
29
     */
30
    public static function decode(Buffer $data)
31
    {
32
        $length = LongValue::decode($data);
33
        $buffer = new Buffer($data->read($length));
34
        $elements = [];
35
36
        while (!$buffer->eof()) {
37
            $elements[ShortStringValue::decode($buffer)] = TypifiedValue::decode($buffer);
38
        }
39
40
        return $elements;
41
    }
42
}
43