Completed
Push — master ( ae5fca...d9758b )
by Julien
13s
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
use TheAentMachine\Exception\MissingEnvironmentVariableException;
8
9
class CannotHandleAddEventCommand extends EventCommand
10
{
11
    protected function getEventName(): string
12
    {
13
        return 'ADD';
14
    }
15
16
    /**
17
     * @param null|string $payload
18
     * @return null|string
19
     * @throws EventException
20
     * @throws MissingEnvironmentVariableException
21
     */
22
    protected function executeEvent(?string $payload): ?string
23
    {
24
        throw EventException::cannotHandleAddEvent();
25
    }
26
}
27