Code Duplication    Length = 12-12 lines in 2 locations

Persister/ObjectPersister.php 2 locations

@@ 106-117 (lines=12) @@
103
    /**
104
     * {@inheritdoc}
105
     */
106
    public function insertMany(array $objects)
107
    {
108
        $documents = array();
109
        foreach ($objects as $object) {
110
            $documents[] = $this->transformToElasticaDocument($object);
111
        }
112
        try {
113
            $this->type->addDocuments($documents);
114
        } catch (BulkException $e) {
115
            $this->log($e);
116
        }
117
    }
118
119
    /**
120
     * {@inheritdoc}
@@ 141-152 (lines=12) @@
138
    /**
139
     * {@inheritdoc}
140
     */
141
    public function deleteMany(array $objects)
142
    {
143
        $documents = array();
144
        foreach ($objects as $object) {
145
            $documents[] = $this->transformToElasticaDocument($object);
146
        }
147
        try {
148
            $this->type->deleteDocuments($documents);
149
        } catch (BulkException $e) {
150
            $this->log($e);
151
        }
152
    }
153
154
    /**
155
     * {@inheritdoc}