Completed
Push — master ( 529fe2...73a6c4 )
by thomas
31:21
created

NetworkFactory   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 93
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 11

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 93
ccs 22
cts 22
cp 1
rs 10
c 1
b 0
f 0
wmc 11
lcom 0
cbo 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A bitcoinRegtest() 0 4 1
A litecoinTestnet() 0 4 1
A viacoinTestnet() 0 4 1
A bitcoin() 0 4 1
A bitcoinTestnet() 0 4 1
A litecoin() 0 4 1
A viacoin() 0 4 1
A dogecoin() 0 4 1
A dogecoinTestnet() 0 4 1
A dash() 0 4 1
A dashTestnet() 0 4 1
1
<?php
2
3
namespace BitWasp\Bitcoin\Network;
4
5
class NetworkFactory
6
{
7
    /**
8
     * @return NetworkInterface
9
     * @throws \Exception
10
     */
11 46
    public static function bitcoin()
12
    {
13 46
        return new Networks\Bitcoin();
14
    }
15
16
    /**
17
     * @return NetworkInterface
18
     * @throws \Exception
19
     */
20 17
    public static function bitcoinTestnet()
21
    {
22 17
        return new Networks\BitcoinTestnet();
23
    }
24
25
    /**
26
     * @return NetworkInterface
27
     * @throws \Exception
28
     */
29 1
    public static function bitcoinRegtest()
30
    {
31 1
        return new Networks\BitcoinRegtest();
32
    }
33
34
    /**
35
     * @return Networks\Litecoin
36
     */
37 2
    public static function litecoin()
38
    {
39 2
        return new Networks\Litecoin();
40
    }
41
42
    /**
43
     * @return Networks\LitecoinTestnet
44
     */
45 1
    public static function litecoinTestnet()
46
    {
47 1
        return new Networks\LitecoinTestnet();
48
    }
49
50
    /**
51
     * @return Networks\Viacoin
52
     */
53 3
    public static function viacoin()
54
    {
55 3
        return new Networks\Viacoin();
56
    }
57
58
    /**
59
     * @return Networks\ViacoinTestnet
60
     */
61 2
    public static function viacoinTestnet()
62
    {
63 2
        return new Networks\ViacoinTestnet();
64
    }
65
66
    /**
67
     * @return Networks\Dogecoin
68
     */
69 2
    public static function dogecoin()
70
    {
71 2
        return new Networks\Dogecoin();
72
    }
73
74
    /**
75
     * @return Networks\DogecoinTestnet
76
     */
77 2
    public static function dogecoinTestnet()
78
    {
79 2
        return new Networks\DogecoinTestnet();
80
    }
81
82
    /**
83
     * @return Networks\Dash
84
     */
85 2
    public static function dash()
86
    {
87 2
        return new Networks\Dash();
88
    }
89
90
    /**
91
     * @return Networks\DashTestnet
92
     */
93 2
    public static function dashTestnet()
94
    {
95 2
        return new Networks\DashTestnet();
96
    }
97
}
98