1 | <?php |
||
8 | class NetworkHdKeyPrefixConfig |
||
9 | { |
||
10 | /** |
||
11 | * @var Network |
||
12 | */ |
||
13 | private $network; |
||
14 | |||
15 | /** |
||
16 | * @var NetworkScriptPrefix[] |
||
17 | */ |
||
18 | private $scriptPrefixMap = []; |
||
19 | |||
20 | /** |
||
21 | * @var NetworkScriptPrefix[] |
||
22 | */ |
||
23 | private $scriptTypeMap = []; |
||
24 | |||
25 | /** |
||
26 | * NetworkHdKeyPrefixConfig constructor. |
||
27 | * @param NetworkInterface $network |
||
28 | * @param NetworkScriptPrefix[] $prefixConfigList |
||
29 | */ |
||
30 | 1 | public function __construct(NetworkInterface $network, array $prefixConfigList) |
|
41 | |||
42 | /** |
||
43 | * @param NetworkScriptPrefix $config |
||
44 | */ |
||
45 | 1 | private function setupConfig(NetworkScriptPrefix $config) |
|
53 | |||
54 | /** |
||
55 | * @param NetworkScriptPrefix $config |
||
56 | */ |
||
57 | 1 | private function checkForOverwriting(NetworkScriptPrefix $config) |
|
71 | |||
72 | /** |
||
73 | * @param NetworkScriptPrefix $config |
||
74 | * @param string $prefix |
||
75 | */ |
||
76 | private function rejectConflictPrefix(NetworkScriptPrefix $config, $prefix) |
||
86 | |||
87 | /** |
||
88 | * @param NetworkScriptPrefix $config |
||
89 | */ |
||
90 | private function rejectConflictScriptType(NetworkScriptPrefix $config) |
||
97 | |||
98 | /** |
||
99 | * @return Network |
||
100 | */ |
||
101 | 1 | public function getNetwork() |
|
105 | |||
106 | /** |
||
107 | * @return NetworkScriptPrefix[] |
||
108 | */ |
||
109 | public function getPrefixList() |
||
113 | |||
114 | /** |
||
115 | * @param string $prefix |
||
116 | * @return NetworkScriptPrefix |
||
117 | */ |
||
118 | public function getConfigForPrefix($prefix) |
||
126 | |||
127 | /** |
||
128 | * @param string $scriptType |
||
129 | * @return NetworkScriptPrefix |
||
130 | */ |
||
131 | 1 | public function getConfigForScriptType($scriptType) |
|
139 | } |
||
140 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.