Completed
Branch 2.0 (acba87)
by Vermeulen
02:20
created

Delete   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A obtainGenerateOrder() 0 8 1
A defineQueriesParts() 0 5 1
1
<?php
2
3
namespace BfwSql\Queries;
4
5
/**
6
 * Class to write DELETE queries
7
 * 
8
 * @package bfw-sql
9
 * @author Vermeulen Maxime <[email protected]>
10
 * @version 2.0
11
 */
12
class Delete extends AbstractQuery
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    protected function defineQueriesParts()
18
    {
19
        parent::defineQueriesParts();
20
        
21
        $this->queriesParts['from'] = $this->queriesParts['table'];
22
    }
23
    
24
    /**
25
     * {@inheritdoc}
26
     */
27
    protected function obtainGenerateOrder(): array
28
    {
29
        return [
30
            'from' => [
31
                'prefix'     => 'DELETE FROM',
32
                'canBeEmpty' => false
33
            ],
34
            'where' => []
35
        ];
36
    }
37
}
38