Code Duplication    Length = 17-17 lines in 2 locations

src/Execution/BlockSerializer.php 2 locations

@@ 279-295 (lines=17) @@
276
     *
277
     * @return int
278
     */
279
    private function serializeAndExpression(AndExpressionInterface $andExpression): int
280
    {
281
        $index = $this->allocateIndex();
282
283
        $serialized = [
284
            static::TYPE                     => static::TYPE__AND_EXPRESSION,
285
            static::AND_EXPRESSION_PRIMARY   => $this->addBlock($andExpression->getPrimary()),
286
            static::AND_EXPRESSION_SECONDARY => $this->addBlock($andExpression->getSecondary()),
287
        ];
288
        if (empty($andExpression->getProperties()) === false) {
289
            $serialized[static::PROPERTIES] = $andExpression->getProperties();
290
        }
291
292
        $this->serializedBlocks[$index] = $serialized;
293
294
        return $index;
295
    }
296
297
    /**
298
     * @param OrExpressionInterface $orExpression
@@ 302-318 (lines=17) @@
299
     *
300
     * @return int
301
     */
302
    private function serializeOrExpression(OrExpressionInterface $orExpression): int
303
    {
304
        $index = $this->allocateIndex();
305
306
        $serialized = [
307
            static::TYPE                    => static::TYPE__OR_EXPRESSION,
308
            static::OR_EXPRESSION_PRIMARY   => $this->addBlock($orExpression->getPrimary()),
309
            static::OR_EXPRESSION_SECONDARY => $this->addBlock($orExpression->getSecondary()),
310
        ];
311
        if (empty($orExpression->getProperties()) === false) {
312
            $serialized[static::PROPERTIES] = $orExpression->getProperties();
313
        }
314
315
        $this->serializedBlocks[$index] = $serialized;
316
317
        return $index;
318
    }
319
320
    /**
321
     * @return int