PublishDraft::getLogMessage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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