Passed
Push — master ( d65c20...a7ba41 )
by Christian
02:11
created

MapperAbstract::mapFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace RemotelyLiving\PHPDNS\Mappers;
3
4
use RemotelyLiving\PHPDNS\Entities\DNSRecord;
5
use RemotelyLiving\PHPDNS\Entities\DNSRecordType;
6
7
abstract class MapperAbstract implements MapperInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $fields = [];
13
14
    public function __construct(array $fields = [])
15
    {
16
        $this->fields = $fields;
17
    }
18
19
    public function mapFields(array $fields): self
20
    {
21
        return new static($fields);
22
    }
23
24
    abstract public function toDNSRecord(): DNSRecord;
25
}
26