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

AddEventCommand::executeEvent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
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