Completed
Push — master ( 46dbb7...9c8538 )
by Hong
02:48
created

Select   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 66.67 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 16
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigs() 16 16 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

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\Mysql;
16
17
use Phossa2\Query\Traits\Clause\PartitionTrait;
18
use Phossa2\Query\Interfaces\Clause\PartitionInterface;
19
use Phossa2\Query\Dialect\Common\Select as CommonSelect;
20
21
/**
22
 * Mysql Select
23
 *
24
 * @package Phossa2\Query
25
 * @author  Hong Zhang <[email protected]>
26
 * @see     PartitionInterface
27
 * @version 2.0.0
28
 * @since   2.0.0 added
29
 */
30
class Select extends CommonSelect implements PartitionInterface
31
{
32
    use PartitionTrait;
33
34
    /**
35
     * {@inheritDoc}
36
     */
37 View Code Duplication
    protected function getConfigs()/*# : array */
1 ignored issue
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
38
    {
39
        return [
40
            'DISTINCT' => '',
41
            'COL' => '',
42
            'TABLE' => 'FROM',
43
            'JOIN' => '',
44
            'PARTITION' => 'PARTITION', // added partition here
45
            'WHERE' => 'WHERE',
46
            'GROUP' => 'GROUP BY',
47
            'HAVING' => 'HAVING',
48
            'ORDER' => 'ORDER BY',
49
            'LIMIT' => 'LIMIT',
50
            'UNION' => '',
51
        ];
52
    }
53
}
54