Code Duplication    Length = 12-12 lines in 2 locations

Persister/ObjectPersister.php 2 locations

@@ 115-126 (lines=12) @@
112
    /**
113
     * {@inheritdoc}
114
     */
115
    public function insertMany(array $objects)
116
    {
117
        $documents = [];
118
        foreach ($objects as $object) {
119
            $documents[] = $this->transformToElasticaDocument($object);
120
        }
121
        try {
122
            return $this->type->addDocuments($documents);
123
        } catch (BulkException $e) {
124
            $this->log($e);
125
        }
126
    }
127
128
    /**
129
     * {@inheritdoc}
@@ 150-161 (lines=12) @@
147
    /**
148
     * {@inheritdoc}
149
     */
150
    public function deleteMany(array $objects)
151
    {
152
        $documents = [];
153
        foreach ($objects as $object) {
154
            $documents[] = $this->transformToElasticaDocument($object);
155
        }
156
        try {
157
            return $this->type->deleteDocuments($documents);
158
        } catch (BulkException $e) {
159
            $this->log($e);
160
        }
161
    }
162
163
    /**
164
     * {@inheritdoc}