Completed
Push — master ( ae5fca...d9758b )
by Julien
13s
created

VoidCommand::getEventName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace TheAentMachine\Command;
5
6
/**
7
 * A command that does nothing
8
 */
9
class VoidCommand extends EventCommand
10
{
11
    protected function configure()
12
    {
13
        parent::configure();
14
        $this->setHidden(true);
15
    }
16
17
    protected function getEventName(): string
18
    {
19
        return 'void';
20
    }
21
22
    protected function executeEvent(?string $payload): ?string
23
    {
24
        // Let's do nothing.
25
        $this->log->debug('Event cannot be handled. Ignoring.');
26
        return null;
27
    }
28
}
29