Code Duplication    Length = 12-12 lines in 2 locations

Persister/ObjectPersister.php 2 locations

@@ 99-110 (lines=12) @@
96
    /**
97
     * {@inheritdoc}
98
     */
99
    public function insertMany(array $objects)
100
    {
101
        $documents = [];
102
        foreach ($objects as $object) {
103
            $documents[] = $this->transformToElasticaDocument($object);
104
        }
105
        try {
106
            $this->type->addDocuments($documents);
107
        } catch (BulkException $e) {
108
            $this->log($e);
109
        }
110
    }
111
112
    /**
113
     * {@inheritdoc}
@@ 134-145 (lines=12) @@
131
    /**
132
     * {@inheritdoc}
133
     */
134
    public function deleteMany(array $objects)
135
    {
136
        $documents = [];
137
        foreach ($objects as $object) {
138
            $documents[] = $this->transformToElasticaDocument($object);
139
        }
140
        try {
141
            $this->type->deleteDocuments($documents);
142
        } catch (BulkException $e) {
143
            $this->log($e);
144
        }
145
    }
146
147
    /**
148
     * {@inheritdoc}