Code Duplication    Length = 12-12 lines in 2 locations

src/Persister/ObjectPersister.php 2 locations

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