1 | <?php |
||
10 | class ImageMessage extends ThreemaMessage { |
||
11 | const TYPE_CODE = 0x02; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $blobId; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $length; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | private $nonce; |
||
27 | |||
28 | /** |
||
29 | * @param string $blobId |
||
30 | * @param int $length |
||
31 | * @param string $nonce |
||
32 | */ |
||
33 | public function __construct($blobId, $length, $nonce) { |
||
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getBlobId() { |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getLength() { |
||
52 | |||
53 | /** |
||
54 | * @return int |
||
55 | */ |
||
56 | public function getNonce() { |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | public function __toString() { |
||
66 | |||
67 | /** |
||
68 | * Get the message type code of this message. |
||
69 | * |
||
70 | * @return int message type code |
||
71 | */ |
||
72 | public final function getTypeCode() { |
||
75 | } |
||
76 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.