Code Duplication    Length = 13-13 lines in 2 locations

src/Repository/ElasticsearchRepository.php 2 locations

@@ 86-98 (lines=13) @@
83
        return $models;
84
    }
85
86
    public function insert(Storable $model)
87
    {
88
        $relationshipKey = RelationshipKey::parse($model->getPrimaryKey());
89
        $collection = new ElasticsearchCollectionParser($model->getCollection());
90
        $params = [
91
            'index' => $collection->getIndex(),
92
            'type' => $collection->getType(),
93
            'id' => $relationshipKey->getId(),
94
            'parent' => $relationshipKey->getParentId(),
95
            'body' => $model->toArray()
96
        ];
97
        $this->client->index($params);
98
    }
99
100
    public function update(Storable $model)
101
    {
@@ 100-112 (lines=13) @@
97
        $this->client->index($params);
98
    }
99
100
    public function update(Storable $model)
101
    {
102
        $relationshipKey = RelationshipKey::parse($model->getPrimaryKey());
103
        $collection = new ElasticsearchCollectionParser($model->getCollection());
104
        $params = [
105
            'index' => $collection->getIndex(),
106
            'type' => $collection->getType(),
107
            'id' => $relationshipKey->getId(),
108
            'parent' => $relationshipKey->getParentId(),
109
            'body' => $model->toArray()
110
        ];
111
        $this->client->index($params);
112
    }
113
114
    public function delete(Storable $model)
115
    {