Record   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 76
rs 10
c 1
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getName() 0 4 1
A getType() 0 4 1
A getClass() 0 4 1
A getTtl() 0 4 1
A getData() 0 4 1
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