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

DNSRecords::withError()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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
}