Completed
Push — master ( 7c2cc0...12c942 )
by Beniamin
02:37
created

DeleteBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 36
c 0
b 0
f 0
wmc 2
lcom 0
cbo 7
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A from() 0 4 1
A addFrom() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of Phuria SQL Builder 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\SQLBuilder\QueryBuilder;
13
14
use Phuria\SQLBuilder\Table\AbstractTable;
15
16
/**
17
 * @author Beniamin Jonatan Šimko <[email protected]>
18
 */
19
class DeleteBuilder extends AbstractBuilder implements
20
    Clause\DeleteClauseInterface,
21
    Clause\WhereClauseInterface,
22
    Component\JoinComponentInterface,
23
    Component\QueryComponentInterface,
24
    Component\TableComponentInterface
25
{
26
    use Clause\DeleteClauseTrait;
27
    use Clause\WhereClauseTrait;
28
    use Component\JoinComponentTrait;
29
    use Component\ParameterComponentTrait;
30
    use Component\QueryComponentTrait;
31
    use Component\TableComponentTrait;
32
33
    /**
34
     * @param mixed  $table
35
     * @param string $alias
0 ignored issues
show
Documentation introduced by
Should the type for parameter $alias not be string|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
36
     *
37
     * @return AbstractTable
38
     */
39 2
    public function from($table, $alias = null)
40
    {
41 2
        return $this->addFrom($table, $alias);
42
    }
43
44
    /**
45
     * @param mixed  $table
46
     * @param string $alias
0 ignored issues
show
Documentation introduced by
Should the type for parameter $alias not be string|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
47
     *
48
     * @return AbstractTable
49
     */
50 2
    public function addFrom($table, $alias = null)
51
    {
52 2
        return $this->addRootTable($table, $alias);
53
    }
54
}