Completed
Push — master ( 52ead2...fd316a )
by David
12s queued 10s
created

AddEventCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
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 5 1
1
<?php
2
3
namespace TheAentMachine\AentDockerCompose\Command;
4
5
use TheAentMachine\AentDockerCompose\Aenthill\Enum\EventEnum;
6
use TheAentMachine\EventCommand;
7
use TheAentMachine\Hercule;
8
use TheAentMachine\Hermes;
9
10
class AddEventCommand extends EventCommand
11
{
12
    protected function getEventName(): string
13
    {
14
        return EventEnum::ADD;
15
    }
16
17
    protected function executeEvent(?string $payload): void
18
    {
19
        Hercule::setHandledEvents(EventEnum::getHandledEvents());
20
21
        Hermes::dispatch(EventEnum::ASKING_FOR_DOCKER_SERVICE_INFO);
22
    }
23
}
24