for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Threema GmbH
* @copyright Copyright (c) 2015-2016 Threema GmbH
*/
namespace Threema\MsgApi\Messages;
class ImageMessage extends ThreemaMessage {
const TYPE_CODE = 0x02;
* @var string
private $blobId;
private $length;
* @var int
private $nonce;
* @param string $blobId
* @param int $length
* @param string $nonce
public function __construct($blobId, $length, $nonce) {
$this->blobId = $blobId;
$this->length = $length;
$length
string
integer
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.
$answer = 42; $correct = false; $correct = (bool) $answer;
$this->nonce = $nonce;
$nonce
}
* @return string
public function getBlobId() {
return $this->blobId;
public function getLength() {
return $this->length;
* @return int
public function getNonce() {
return $this->nonce;
public function __toString() {
return 'image message';
* Get the message type code of this message.
*
* @return int message type code
public final function getTypeCode() {
return self::TYPE_CODE;
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.