GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#7)
by Fábio Tadeu da
03:01 queued 55s
created

SecondOutboxEntry   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 10
eloc 11
dl 0
loc 53
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getAggregateType() 0 3 1
A getMessageRoute() 0 3 1
A getPayloadType() 0 3 1
A getMessageKey() 0 3 1
A __construct() 0 3 1
A getMessageType() 0 3 1
A getName() 0 3 1
A getSchemaVersion() 0 3 1
A getAggregateId() 0 3 1
A getPayload() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Dsantang\DomainEventsDoctrine\Tests\Unit\Outbox\Stub\OutboxEntries;
6
7
use Dsantang\DomainEvents\DomainEvent;
8
use Dsantang\DomainEventsDoctrine\Outbox\OutboxEntry;
9
use Ramsey\Uuid\Uuid;
10
use Ramsey\Uuid\UuidInterface;
11
use function json_encode;
12
13
final class SecondOutboxEntry implements OutboxEntry
14
{
15
    /** @var DomainEvent */
16
    private $domainEvent;
17
18
    public function __construct(DomainEvent $domainEvent)
19
    {
20
        $this->domainEvent = $domainEvent;
21
    }
22
23
    public function getName() : string
24
    {
25
        return 'CartCreated';
26
    }
27
28
    public function getAggregateId() : UuidInterface
29
    {
30
        return Uuid::fromString('cece22ea-57ae-11e9-8647-d663bd873d93');
31
    }
32
33
    public function getAggregateType() : string
34
    {
35
        return 'Cart';
36
    }
37
38
    public function getPayloadType() : string
39
    {
40
        return $this->domainEvent->getName();
41
    }
42
43
    public function getMessageKey() : string
44
    {
45
        return 'af422e7a';
46
    }
47
48
    public function getMessageRoute() : string
49
    {
50
        return 'snapshot.cart';
51
    }
52
53
    public function getMessageType() : string
54
    {
55
        return 'CartCreated';
56
    }
57
58
    public function getPayload() : string
59
    {
60
        return json_encode(['foo' => 'bar']);
61
    }
62
63
    public function getSchemaVersion() : int
64
    {
65
        return 1;
66
    }
67
}
68