Completed
Push — master ( 439406...4b2726 )
by Hong
03:09
created

Select   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 9

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 9
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A getConfigs() 0 6 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\Clause\ColTrait;
18
use Phossa2\Query\Traits\Clause\FromTrait;
19
use Phossa2\Query\Traits\StatementAbstract;
20
use Phossa2\Query\Traits\Clause\WhereTrait;
21
use Phossa2\Query\Traits\Clause\LimitTrait;
22
use Phossa2\Query\Traits\Clause\ClauseTrait;
23
use Phossa2\Query\Traits\Clause\HavingTrait;
24
use Phossa2\Query\Traits\Clause\GroupByTrait;
25
use Phossa2\Query\Traits\Clause\OrderByTrait;
26
use Phossa2\Query\Interfaces\Statement\SelectStatementInterface;
27
28
/**
29
 * Select
30
 *
31
 * Implementation of SelectStatementInterface for Common dialect
32
 *
33
 * @package Phossa2\Query
34
 * @author  Hong Zhang <[email protected]>
35
 * @see     StatementAbstract
36
 * @see     SelectStatementInterface
37
 * @version 2.0.0
38
 * @since   2.0.0 added
39
 */
40
class Select extends StatementAbstract implements SelectStatementInterface
41
{
42
    use ClauseTrait, ColTrait, FromTrait, WhereTrait, GroupByTrait,
43
        HavingTrait, OrderByTrait, LimitTrait;
44
45
    /**
46
     * {@inheritDoc}
47
     */
48
    protected function getType()/*# : string */
49
    {
50
        return 'SELECT';
51
    }
52
53
    /**
54
     * {@inheritDoc}
55
     */
56
    protected function getConfigs()/*# : array */
57
    {
58
        return ['DISTINCT', 'COL', 'FROM', 'WHERE', 'GROUPBY', 'HAVING',
59
            'ORDERBY', 'LIMIT'
60
        ];
61
    }
62
}
63