Completed
Push — master ( 18b606...1191a0 )
by yuuki
04:00
created

Column   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 47
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getName() 0 4 1
A getType() 0 4 1
A getTypeSignature() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Ytake\PrestoClient;
5
6
/**
7
 * Class Column
8
 */
9
final class Column
10
{
11
    /** @var string */
12
    private $name = '';
13
14
    /** @var string */
15
    private $type = '';
16
17
    /** @var \stdClass */
18
    private $typeSignature;
19
20
    /**
21
     * Column constructor.
22
     *
23
     * @param \stdClass $jsonContent
24
     */
25
    public function __construct(\stdClass $jsonContent)
26
    {
27
        $this->name = $jsonContent->name;
28
        $this->type = $jsonContent->type;
29
        $this->typeSignature = $jsonContent->typeSignature;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getName(): string
36
    {
37
        return $this->name;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getType(): string
44
    {
45
        return $this->type;
46
    }
47
48
    /**
49
     * @return mixed
50
     */
51
    public function getTypeSignature()
52
    {
53
        return $this->typeSignature;
54
    }
55
}
56