1 | <?php |
||
8 | class NetworkConfig |
||
9 | { |
||
10 | /** |
||
11 | * @var Network |
||
12 | */ |
||
13 | private $network; |
||
14 | |||
15 | /** |
||
16 | * @var ScriptPrefix[] |
||
17 | */ |
||
18 | private $scriptPrefixMap = []; |
||
19 | |||
20 | /** |
||
21 | * @var ScriptPrefix[] |
||
22 | */ |
||
23 | private $scriptTypeMap = []; |
||
24 | |||
25 | /** |
||
26 | * NetworkHdKeyPrefixConfig constructor. |
||
27 | * @param NetworkInterface $network |
||
28 | * @param ScriptPrefix[] $prefixConfigList |
||
29 | */ |
||
30 | 14 | public function __construct(NetworkInterface $network, array $prefixConfigList) |
|
41 | |||
42 | /** |
||
43 | * @param ScriptPrefix $config |
||
44 | */ |
||
45 | 8 | private function setupConfig(ScriptPrefix $config) |
|
53 | |||
54 | /** |
||
55 | * @param ScriptPrefix $config |
||
56 | */ |
||
57 | 8 | private function checkForOverwriting(ScriptPrefix $config) |
|
71 | |||
72 | /** |
||
73 | * @param ScriptPrefix $config |
||
74 | * @param string $prefix |
||
75 | */ |
||
76 | 2 | private function rejectConflictPrefix(ScriptPrefix $config, $prefix) |
|
86 | |||
87 | /** |
||
88 | * @param ScriptPrefix $config |
||
89 | */ |
||
90 | 1 | private function rejectConflictScriptType(ScriptPrefix $config) |
|
97 | |||
98 | /** |
||
99 | * @return Network |
||
100 | */ |
||
101 | 6 | public function getNetwork() |
|
105 | |||
106 | /** |
||
107 | * @param string $prefix |
||
108 | * @return ScriptPrefix |
||
109 | */ |
||
110 | 2 | public function getConfigForPrefix($prefix) |
|
118 | |||
119 | /** |
||
120 | * @param string $scriptType |
||
121 | * @return ScriptPrefix |
||
122 | */ |
||
123 | 4 | public function getConfigForScriptType($scriptType) |
|
131 | } |
||
132 |
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.