Record::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Thruster\Component\Dns;
4
5
/**
6
 * Class Record
7
 *
8
 * @package Thruster\Component\Dns
9
 * @author  Aurimas Niekis <[email protected]>
10
 */
11
class Record
12
{
13
    /**
14
     * @var string
15
     */
16
    private $name;
17
18
    /**
19
     * @var int
20
     */
21
    private $type;
22
23
    /**
24
     * @var int
25
     */
26
    private $class;
27
28
    /**
29
     * @var int
30
     */
31
    private $ttl;
32
33
    /**
34
     * @var mixed
35
     */
36
    private $data;
37
38
    public function __construct(string $name, int $type, int $class, int $ttl = 0, $data = null)
39
    {
40
        $this->name     = $name;
41
        $this->type     = $type;
42
        $this->class    = $class;
43
        $this->ttl      = $ttl;
44
        $this->data     = $data;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getName()
51
    {
52
        return $this->name;
53
    }
54
55
    /**
56
     * @return int
57
     */
58
    public function getType()
59
    {
60
        return $this->type;
61
    }
62
63
    /**
64
     * @return int
65
     */
66
    public function getClass()
67
    {
68
        return $this->class;
69
    }
70
71
    /**
72
     * @return int
73
     */
74
    public function getTtl()
75
    {
76
        return $this->ttl;
77
    }
78
79
    /**
80
     * @return mixed
81
     */
82
    public function getData()
83
    {
84
        return $this->data;
85
    }
86
}
87