MagicJoinSelect   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 40
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getSelect() 0 4 1
A getMainTable() 0 4 1
1
<?php
2
3
namespace SQLParser\Node\Traverser;
4
5
use SQLParser\Query\Select;
6
7
/**
8
 * Wraps a select that contains a MagicJoin.
9
 */
10
class MagicJoinSelect
11
{
12
    /**
13
     * @var Select
14
     */
15
    private $select;
16
17
    /**
18
     * @var string
19
     */
20
    private $mainTable;
21
22
    /**
23
     * MagicJoinSelect constructor.
24
     *
25
     * @param Select $select
26
     * @param string $mainTable
27
     */
28
    public function __construct(Select $select, $mainTable)
29
    {
30
        $this->select = $select;
31
        $this->mainTable = $mainTable;
32
    }
33
34
    /**
35
     * @return Select
36
     */
37
    public function getSelect()
38
    {
39
        return $this->select;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getMainTable()
46
    {
47
        return $this->mainTable;
48
    }
49
}
50