1 | <?php |
||
16 | class Bitcoin |
||
17 | { |
||
18 | /** |
||
19 | * @var NetworkInterface |
||
20 | */ |
||
21 | private static $network; |
||
22 | |||
23 | /** |
||
24 | * @var EcAdapterInterface |
||
25 | */ |
||
26 | 2914 | private static $adapter; |
|
27 | |||
28 | 2914 | /** |
|
29 | * @var ParamsInterface |
||
30 | */ |
||
31 | private static $params; |
||
32 | |||
33 | /** |
||
34 | 3 | * @return Math |
|
35 | */ |
||
36 | 3 | public static function getMath() |
|
40 | |||
41 | /** |
||
42 | * Load the generator to be used throughout |
||
43 | */ |
||
44 | 483 | public static function getGenerator() |
|
48 | |||
49 | /** |
||
50 | * @param Math $math |
||
51 | * @param GeneratorPoint $generator |
||
52 | * @return EcAdapterInterface |
||
53 | 483 | */ |
|
54 | public static function getEcAdapter(Math $math = null, GeneratorPoint $generator = null) |
||
65 | |||
66 | 3 | /** |
|
67 | 3 | * @param ParamsInterface $params |
|
68 | */ |
||
69 | public static function setParams(ParamsInterface $params) |
||
73 | |||
74 | 99 | /** |
|
75 | 3 | * @return ParamsInterface |
|
76 | 2 | */ |
|
77 | public function getParams() |
||
85 | |||
86 | /** |
||
87 | * @param Math|null $math |
||
88 | * @return ParamsInterface |
||
89 | */ |
||
90 | public static function getDefaultParams(Math $math = null) |
||
94 | |||
95 | /** |
||
96 | * @param EcAdapterInterface $adapter |
||
97 | */ |
||
98 | public static function setAdapter(EcAdapterInterface $adapter) |
||
102 | |||
103 | /** |
||
104 | * @param NetworkInterface $network |
||
105 | */ |
||
106 | public static function setNetwork(NetworkInterface $network) |
||
110 | |||
111 | /** |
||
112 | * @return Network |
||
113 | */ |
||
114 | public static function getNetwork() |
||
122 | |||
123 | /** |
||
124 | * @return NetworkInterface |
||
125 | */ |
||
126 | public static function getDefaultNetwork() |
||
130 | } |
||
131 |
This check looks for accesses to local static members using the fully qualified name instead of
self::
.While this is perfectly valid, the fully qualified name of
Certificate::TRIPLEDES_CBC
could just as well be replaced byself::TRIPLEDES_CBC
. Referencing local members withself::
assured the access will still work when the class is renamed, makes it perfectly clear that the member is in fact local and will usually be shorter.