Completed
Push — master ( 1efb78...46dbb7 )
by Hong
03:27
created

Update::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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\Clause\FromTrait;
18
use Phossa2\Query\Traits\Clause\WhereTrait;
19
use Phossa2\Query\Traits\StatementAbstract;
20
use Phossa2\Query\Traits\Clause\ClauseTrait;
21
use Phossa2\Query\Traits\Clause\UpdateTrait;
22
use Phossa2\Query\Interfaces\Statement\UpdateStatementInterface;
23
24
/**
25
 * Update
26
 *
27
 * @package Phossa2\Query
28
 * @author  Hong Zhang <[email protected]>
29
 * @see     StatementAbstract
30
 * @see     UpdateStatementInterface
31
 * @version 2.0.0
32
 * @since   2.0.0 added
33
 */
34
class Update extends StatementAbstract implements UpdateStatementInterface
35
{
36
    use ClauseTrait, UpdateTrait, FromTrait, WhereTrait;
37
38
    /**
39
     * {@inheritDoc}
40
     */
41
    protected $configs = [
42
        'FROM' => '',
43
        'SET' => 'SET',
44
        'WHERE' => 'WHERE',
45
    ];
46
47
    /**
48
     * {@inheritDoc}
49
     */
50
    protected function getType()/*# : string */
51
    {
52
        return 'UPDATE';
53
    }
54
}
55