Completed
Pull Request — 1.4 (#66)
by
unknown
01:37
created

Hint   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 27
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getType() 0 4 1
A getList() 0 4 1
1
<?php
2
3
4
namespace SQLParser\Node;
5
6
7
/**
8
 * This class represent a SQL hint, for example USE INDEX (my_index)
9
 */
10
class Hint
11
{
12
    /**
13
     * @var string The hint type (example 'USE INDEX')
14
     */
15
    private $type;
16
    /**
17
     * @var string The hint list (example '(my_index)')
18
     */
19
    private $list;
20
21
    public function __construct(string $type, string $list)
22
    {
23
        $this->type = $type;
24
        $this->list = $list;
25
    }
26
27
    public function getType(): string
28
    {
29
        return $this->type;
30
    }
31
32
    public function getList(): string
33
    {
34
        return $this->list;
35
    }
36
}
37