for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kerox\Messenger\Request;
class CodeRequest extends AbstractRequest
{
/**
* @var int
*/
protected $imageSize;
* @var string
protected $codeType;
* CodeRequest constructor.
*
* @param string $pageToken
* @param int $imageSize
* @param string $codeType
public function __construct(string $pageToken, int $imageSize, string $codeType)
parent::__construct($pageToken);
$this->imageSize = $imageSize;
$this->codeType = $codeType;
}
* @return array
protected function buildHeaders(): array
return [
'Content-Type' => 'application/json',
];
protected function buildBody(): array
$body = [
'type' => $this->codeType,
'image_size' => $this->imageSize,
return array_filter($body);
protected function buildQuery(): array
return parent::buildQuery();