Completed
Pull Request — master (#42)
by Julien
02:42
created

CannotHandleAddEventCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEventName() 0 3 1
A executeEvent() 0 3 1
1
<?php
2
3
4
namespace TheAentMachine\Command;
5
6
use TheAentMachine\Exception\EventException;
7
8
class CannotHandleAddEventCommand extends EventCommand
9
{
10
    protected function getEventName(): string
11
    {
12
        return 'ADD';
13
    }
14
15
    /**
16
     * @param null|string $payload
17
     * @return null|string
18
     * @throws EventException
19
     * @throws \TheAentMachine\Exception\MissingEnvironmentVariableException
20
     */
21
    protected function executeEvent(?string $payload): ?string
22
    {
23
        throw EventException::cannotHandleAddEvent();
24
    }
25
}
26