Code Duplication    Length = 7-8 lines in 5 locations

source/Spiral/Database/Drivers/Postgres/PostgresDriver.php 1 location

@@ 127-133 (lines=7) @@
124
     *
125
     * Postgres uses custom insert query builder in order to return value of inserted row.
126
     */
127
    public function insertBuilder(string $prefix, array $parameters = []): InsertQuery
128
    {
129
        return $this->factory->make(
130
            PostgresQuery::class,
131
            ['driver' => $this, 'compiler' => $this->queryCompiler($prefix),] + $parameters
132
        );
133
    }
134
135
    /**
136
     * {@inheritdoc}

source/Spiral/Database/Entities/Driver.php 4 locations

@@ 206-212 (lines=7) @@
203
     *
204
     * @return InsertQuery
205
     */
206
    public function insertBuilder(string $prefix, array $parameters = []): InsertQuery
207
    {
208
        return $this->factory->make(
209
            InsertQuery::class,
210
            ['driver' => $this, 'compiler' => $this->queryCompiler($prefix)] + $parameters
211
        );
212
    }
213
214
    /**
215
     * Get SelectQuery builder with driver specific query compiler.
@@ 223-229 (lines=7) @@
220
     *
221
     * @return SelectQuery
222
     */
223
    public function selectBuilder(string $prefix, array $parameters = []): SelectQuery
224
    {
225
        return $this->factory->make(
226
            SelectQuery::class,
227
            ['driver' => $this, 'compiler' => $this->queryCompiler($prefix)] + $parameters
228
        );
229
    }
230
231
    /**
232
     * Get DeleteQuery builder with driver specific query compiler.
@@ 240-247 (lines=8) @@
237
     *
238
     * @return DeleteQuery
239
     */
240
    public function deleteBuilder(string $prefix, array $parameters = []): DeleteQuery
241
    {
242
        return $this->factory->make(
243
            DeleteQuery::class,
244
            ['driver' => $this, 'compiler' => $this->queryCompiler($prefix)] + $parameters
245
        );
246
    }
247
248
    /**
249
     * Get UpdateQuery builder with driver specific query compiler.
250
     *
@@ 257-263 (lines=7) @@
254
     *
255
     * @return UpdateQuery
256
     */
257
    public function updateBuilder(string $prefix, array $parameters = []): UpdateQuery
258
    {
259
        return $this->factory->make(
260
            UpdateQuery::class,
261
            ['driver' => $this, 'compiler' => $this->queryCompiler($prefix)] + $parameters
262
        );
263
    }
264
265
    /**
266
     * Handler responsible for schema related operations. Handlers responsible for sync flow of