VoidEvent::executeEvent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace TheAentMachine\Aent\Event;
4
5
final class VoidEvent extends AbstractEvent
6
{
7
    /**
8
     * @return void
9
     */
10
    protected function configure()
11
    {
12
        parent::configure();
13
        $this->setHidden(true);
14
    }
15
16
    /**
17
     * @return string
18
     */
19
    protected function getEventName(): string
20
    {
21
        return 'VOID';
22
    }
23
24
    /**
25
     * @return bool
26
     */
27
    protected function shouldRegisterEvents(): bool
28
    {
29
        return false;
30
    }
31
32
    /**
33
     * @return void
34
     */
35
    protected function beforeExecute(): void
36
    {
37
        // Let's do nothing.
38
    }
39
40
    /**
41
     * @param null|string $payload
42
     * @return null|string
43
     */
44
    protected function executeEvent(?string $payload): ?string
45
    {
46
        // Let's do nothing.
47
        return null;
48
    }
49
50
    /**
51
     * @return void
52
     */
53
    protected function afterExecute(): void
54
    {
55
        // Let's do nothing.
56
    }
57
}
58