Completed
Push — master ( 9033ab...337f95 )
by thomas
38:43
created

DnsSeedList::getHosts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace BitWasp\Bitcoin\Networking\DnsSeeds;
4
5
class DnsSeedList
6
{
7
    /**
8
     * @var array
9
     */
10
    private $seeds = [];
11
12
    /**
13
     * DnsSeedList constructor.
14
     * @param array $seeds
15
     */
16
    public function __construct(array $seeds)
17
    {
18
        $this->seeds = $seeds;
19
    }
20
21
    /**
22
     * @param string $host
23
     * @return $this
24
     */
25
    public function addHost($host)
26
    {
27
        $this->seeds[] = $host;
28
        return $this;
29
    }
30
31
    /**
32
     * @return array
33
     */
34
    public function getHosts()
35
    {
36
        return $this->seeds;
37
    }
38
}
39