Code Duplication    Length = 12-12 lines in 2 locations

src/Indexer/MemcachedIndexer.php 1 location

@@ 67-78 (lines=12) @@
64
    /**
65
     * {@inheritdoc}
66
     */
67
    public function add($elements)
68
    {
69
        $str = $this->serializer->serialize((array) $elements);
70
71
        $success = $this->getAdapter()->append($this->name, $str);
72
73
        if (false === $success) {
74
            $success = $this->getAdapter()->add($this->name, $str);
75
        }
76
77
        return (boolean) $success;
78
    }
79
80
    /**
81
     * {@inheritdoc}

src/Indexer/MemcacheIndexer.php 1 location

@@ 67-78 (lines=12) @@
64
    /**
65
     * {@inheritdoc}
66
     */
67
    public function add($elements)
68
    {
69
        $str = $this->serializer->serialize((array) $elements);
70
71
        $success = $this->getAdapter()->append($this->name, $str);
72
73
        if (false === $success) {
74
            $success = $this->getAdapter()->add($this->name, $str);
75
        }
76
77
        return (boolean) $success;
78
    }
79
80
    /**
81
     * {@inheritdoc}