Code Duplication    Length = 10-12 lines in 2 locations

src/MySQLReplication/JsonBinaryDecoder/JsonBinaryDecoderService.php 2 locations

@@ 144-155 (lines=12) @@
141
142
        $this->jsonBinaryDecoderFormatter->formatBeginObject();
143
144
        for ($i = 0; $i !== $elementCount; ++$i)
145
        {
146
            if ($i !== 0)
147
            {
148
                $this->jsonBinaryDecoderFormatter->formatNextEntry();
149
            }
150
151
            $this->jsonBinaryDecoderFormatter->formatName($keys[$i]);
152
153
            /* @var JsonBinaryDecoderValue[] $entries */
154
            $this->assignValues($entries[$i]);
155
        }
156
157
        $this->jsonBinaryDecoderFormatter->formatEndObject();
158
    }
@@ 293-302 (lines=10) @@
290
291
        $this->jsonBinaryDecoderFormatter->formatBeginArray();
292
293
        for ($i = 0; $i !== $numElements; ++$i)
294
        {
295
            if ($i !== 0)
296
            {
297
                $this->jsonBinaryDecoderFormatter->formatNextEntry();
298
            }
299
300
            /* @var JsonBinaryDecoderValue[] $entries */
301
            $this->assignValues($entries[$i]);
302
        }
303
304
        $this->jsonBinaryDecoderFormatter->formatEndArray();
305
    }