Passed
Pull Request — master (#767)
by thomas
28:03
created

NetworkFactory::dashTestnet()   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 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BitWasp\Bitcoin\Network;
6
7
class NetworkFactory
8
{
9
    /**
10
     * @return NetworkInterface
11
     * @throws \Exception
12
     */
13 85
    public static function bitcoin(): NetworkInterface
14
    {
15 85
        return new Networks\Bitcoin();
16
    }
17
18
    /**
19
     * @return NetworkInterface
20
     * @throws \Exception
21
     */
22 11
    public static function bitcoinTestnet(): NetworkInterface
23
    {
24 11
        return new Networks\BitcoinTestnet();
25
    }
26
27
    /**
28
     * @return NetworkInterface
29
     * @throws \Exception
30
     */
31 2
    public static function bitcoinRegtest(): NetworkInterface
32
    {
33 2
        return new Networks\BitcoinRegtest();
34
    }
35
}
36