Initial commit
This commit is contained in:
27
src/Message.php
Normal file
27
src/Message.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Nsq;
|
||||
|
||||
/**
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Message
|
||||
{
|
||||
public int $timestamp;
|
||||
|
||||
public int $attempts;
|
||||
|
||||
public string $id;
|
||||
|
||||
public string $body;
|
||||
|
||||
public function __construct(int $timestamp, int $attempts, string $id, string $body)
|
||||
{
|
||||
$this->timestamp = $timestamp;
|
||||
$this->attempts = $attempts;
|
||||
$this->id = $id;
|
||||
$this->body = $body;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user