SelectTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 29
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1
ccs 0
cts 6
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addSelect() 0 8 1
A getSelectClauses() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of UnderQuery package.
5
 *
6
 * Copyright (c) 2016 Beniamin Jonatan Šimko
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Phuria\UnderQuery\QueryBuilder\Clause;
13
14
use Phuria\UnderQuery\Utils\RecursiveArgs;
15
16
/**
17
 * @author Beniamin Jonatan Šimko <[email protected]>
18
 */
19
trait SelectTrait
20
{
21
    /**
22
     * @var array $selectClauses
23
     */
24
    private $selectClauses = [];
25
26
    /**
27
     * @param mixed $_
28
     *
29
     * @return $this
30
     */
31
    public function addSelect($_)
0 ignored issues
show
Unused Code introduced by
The parameter $_ is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
32
    {
33
        RecursiveArgs::each(func_get_args(), function ($arg) {
34
           $this->selectClauses[] = $arg;
35
        });
36
37
        return $this;
38
    }
39
40
    /**
41
     * @return array
42
     */
43
    public function getSelectClauses()
44
    {
45
        return $this->selectClauses;
46
    }
47
}