Passed
Push — master ( 1b54b9...ff455f )
by Sam
10:10 queued 11s
created

RdataTrait::encodeName()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 7
c 0
b 0
f 0
nc 3
nop 1
dl 0
loc 14
ccs 8
cts 8
cp 1
crap 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of Badcow DNS Library.
7
 *
8
 * (c) Samuel Williams <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Badcow\DNS\Rdata;
15
16
trait RdataTrait
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21 43
    public function getType(): string
22
    {
23
        /* @const TYPE */
24 43
        return static::TYPE;
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30 17
    public function getTypeCode(): int
31
    {
32
        /* @const TYPE_CODE */
33 17
        return static::TYPE_CODE;
34
    }
35
}
36