Passed
Pull Request — 3.x (#323)
by Eduardo Gulias
09:09 queued 07:19
created

DNSRecords   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 27
ccs 7
cts 7
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getRecords() 0 3 1
A withError() 0 3 1
1
<?php
2
3
namespace Egulias\EmailValidator\Validation;
4
5
class DNSRecords
6
{
7
    
8
    /**
9
     * @var array $records
10
     */
11
    private $records = [];
12
13
    /**
14
     * @var bool $error
15
     */
16
    private $error = false;
17
18 13
    public function __construct(array $records, bool $error = false)
19
    {
20 13
        $this->records = $records;
21 13
        $this->error = $error;
22
    }
23
24 13
    public function getRecords() : array
25
    {
26 13
        return $this->records;
27
    }
28
29 13
    public function withError() : bool
30
    {
31 13
        return $this->error;
32
    }
33
34
35
}