Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
BulkEventResult
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 created
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace LambdaTwelve\OneRecord\Client;
6
7use LambdaTwelve\OneRecord\Api\Error;
8use LambdaTwelve\OneRecord\Rdf\Iri;
9
10/**
11 * The outcome of posting one event to one object, whether it went through
12 * the 2.3 bulk endpoint or a per-object POST.
13 */
14final readonly class BulkEventResult
15{
16    public function __construct(
17        public Iri $logisticsObject,
18        public int $status,
19        public ?Iri $event,
20        public ?Error $error,
21    ) {}
22
23    public function created(): bool
24    {
25        return $this->status === 201;
26    }
27}