Code Duplication    Length = 11-11 lines in 3 locations

src/Manager.php 3 locations

@@ 130-140 (lines=11) @@
127
     *
128
     * @return PromiseInterface
129
     */
130
    public function insert(array $data)
131
    {
132
        return Coroutine\create(function () use ($data) {
133
            $builder = $this->builder->insert($data);
134
            $builder = $this->applyOperationsTo($builder);
135
136
            yield $this->connector->query(
137
                $this->interpolate($builder->build())
138
            );
139
        });
140
    }
141
142
    /**
143
     * @param Builder $builder
@@ 162-172 (lines=11) @@
159
     *
160
     * @return PromiseInterface
161
     */
162
    public function update(array $data)
163
    {
164
        return Coroutine\create(function () use ($data) {
165
            $builder = $this->builder->update($data);
166
            $builder = $this->applyOperationsTo($builder);
167
168
            yield $this->connector->query(
169
                $this->interpolate($builder->build())
170
            );
171
        });
172
    }
173
174
    /**
175
     * @return PromiseInterface
@@ 177-187 (lines=11) @@
174
    /**
175
     * @return PromiseInterface
176
     */
177
    public function delete()
178
    {
179
        return Coroutine\create(function () {
180
            $builder = $this->builder->delete();
181
            $builder = $this->applyOperationsTo($builder);
182
183
            yield $this->connector->query(
184
                $this->interpolate($builder->build())
185
            );
186
        });
187
    }
188
}
189