PublishDraft   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 5
c 1
b 0
f 0
dl 0
loc 20
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getLogLevel() 0 3 1
A getLogContext() 0 3 1
A getDraftData() 0 3 1
A getLogMessage() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace RemotelyLiving\PHPCommandBus\Tests\Stubs\Commands;
6
7
use RemotelyLiving\PHPCommandBus\Enums;
8
use RemotelyLiving\PHPCommandBus\Interfaces;
9
10
class PublishDraft implements Interfaces\LoggableCommand
11
{
12
    public function getDraftData(): array
13
    {
14
        return ['some draft data'];
15
    }
16
17
    public function getLogContext(): array
18
    {
19
        return ['draftData' => $this->getDraftData()];
20
    }
21
22
    public function getLogMessage(): string
23
    {
24
        return 'Trying to publish a draft';
25
    }
26
27
    public function getLogLevel(): ?Enums\LogLevel
28
    {
29
        return null;
30
    }
31
}
32