Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| NotificationReceived | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace LambdaTwelve\OneRecord\Server\Event; |
| 6 | |
| 7 | use LambdaTwelve\OneRecord\Api\Notification; |
| 8 | use LambdaTwelve\OneRecord\Server\Spi\Agent; |
| 9 | |
| 10 | /** |
| 11 | * A partner told us about one of its objects or the status of a request we |
| 12 | * made. The server stores nothing; the host reacts (fetch the object, update |
| 13 | * its records). |
| 14 | */ |
| 15 | final readonly class NotificationReceived |
| 16 | { |
| 17 | /** |
| 18 | * @param ?string $idempotencyKey the sender's Idempotency-Key header when it sent one; the same |
| 19 | * value on a later delivery means a retry of this notification |
| 20 | */ |
| 21 | public function __construct( |
| 22 | public Notification $notification, |
| 23 | public Agent $sentBy, |
| 24 | public ?string $idempotencyKey = null, |
| 25 | ) {} |
| 26 | } |