1 | <?php |
||
16 | class TransactionInputSerializer |
||
17 | { |
||
18 | /** |
||
19 | * @var OutPointSerializer |
||
20 | */ |
||
21 | private $outpointSerializer; |
||
22 | |||
23 | /** |
||
24 | * @var \BitWasp\Buffertools\Types\VarString |
||
25 | */ |
||
26 | private $varstring; |
||
27 | |||
28 | /** |
||
29 | * @var \BitWasp\Buffertools\Types\Uint32 |
||
30 | */ |
||
31 | private $uint32le; |
||
32 | |||
33 | /** |
||
34 | * @var Opcodes |
||
35 | */ |
||
36 | private $opcodes; |
||
37 | |||
38 | /** |
||
39 | * TransactionInputSerializer constructor. |
||
40 | * @param OutPointSerializerInterface $outPointSerializer |
||
41 | * @param Opcodes|null $opcodes |
||
42 | */ |
||
43 | 5236 | public function __construct(OutPointSerializerInterface $outPointSerializer, Opcodes $opcodes = null) |
|
50 | |||
51 | /** |
||
52 | * @param TransactionInputInterface $input |
||
53 | * @return BufferInterface |
||
54 | */ |
||
55 | 5220 | public function serialize(TransactionInputInterface $input): BufferInterface |
|
63 | |||
64 | /** |
||
65 | * @param Parser $parser |
||
66 | * @return TransactionInputInterface |
||
67 | * @throws \BitWasp\Buffertools\Exceptions\ParserOutOfRange |
||
68 | * @throws \Exception |
||
69 | */ |
||
70 | 68 | public function fromParser(Parser $parser): TransactionInputInterface |
|
78 | |||
79 | /** |
||
80 | * @param BufferInterface $string |
||
81 | * @return TransactionInput |
||
82 | * @throws \BitWasp\Buffertools\Exceptions\ParserOutOfRange |
||
83 | * @throws \Exception |
||
84 | */ |
||
85 | 2 | public function parse(BufferInterface $string): TransactionInput |
|
89 | } |
||
90 |
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.