VoidEvent   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 50
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A shouldRegisterEvents() 0 3 1
A beforeExecute() 0 2 1
A afterExecute() 0 2 1
A executeEvent() 0 4 1
A getEventName() 0 3 1
A configure() 0 4 1
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