Delete   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 6
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfigs() 0 9 1
A getType() 0 4 1
1
<?php
2
/**
3
 * Phossa Project
4
 *
5
 * PHP version 5.4
6
 *
7
 * @category  Library
8
 * @package   Phossa2\Query
9
 * @copyright Copyright (c) 2016 phossa.com
10
 * @license   http://mit-license.org/ MIT License
11
 * @link      http://www.phossa.com/
12
 */
13
/*# declare(strict_types=1); */
14
15
namespace Phossa2\Query\Dialect\Common;
16
17
use Phossa2\Query\Traits\StatementAbstract;
18
use Phossa2\Query\Traits\Clause\TableTrait;
19
use Phossa2\Query\Traits\Clause\WhereTrait;
20
use Phossa2\Query\Traits\Clause\OrderTrait;
21
use Phossa2\Query\Traits\Clause\LimitTrait;
22
use Phossa2\Query\Traits\Clause\ClauseTrait;
23
use Phossa2\Query\Interfaces\Statement\DeleteStatementInterface;
24
25
/**
26
 * Delete
27
 *
28
 * @package Phossa2\Query
29
 * @author  Hong Zhang <[email protected]>
30
 * @version 2.0.0
31
 * @since   2.0.0 added
32
 */
33
class Delete extends StatementAbstract implements DeleteStatementInterface
34
{
35
    use ClauseTrait, TableTrait, WhereTrait, OrderTrait, LimitTrait;
36
37
    /**
38
     * {@inheritDoc}
39
     */
40
    protected function getConfigs()/*# : array */
41
    {
42
        return [
43
            'TABLE' => 'FROM',
44
            'WHERE' => 'WHERE',
45
            'ORDER' => 'ORDER BY',
46
            'LIMIT' => 'LIMIT',
47
        ];
48
    }
49
50
    /**
51
     * {@inheritDoc}
52
     */
53
    protected function getType()/*# : string */
54
    {
55
        return 'DELETE';
56
    }
57
}
58