YaEtlEvent::getEventList()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 4
c 1
b 0
f 1
nc 2
nop 0
dl 0
loc 9
rs 10
1
<?php
2
3
/*
4
 * This file is part of YaEtl
5
 *     (c) Fabrice de Stefanis / https://github.com/fab2s/YaEtl
6
 * This source file is licensed under the MIT license which you will
7
 * find in the LICENSE file or at https://opensource.org/licenses/MIT
8
 */
9
10
namespace fab2s\YaEtl\Events;
11
12
use fab2s\NodalFlow\Events\FlowEvent;
13
14
/**
15
 * Class YaEtlEvent
16
 */
17
class YaEtlEvent extends FlowEvent
18
{
19
    /**
20
     * add flush Events
21
     */
22
    const FLOW_FLUSH = 'flow.flush';
23
24
    /**
25
     * @return array
26
     */
27
    public static function getEventList(): array
28
    {
29
        if (!isset(static::$eventList)) {
30
            static::$eventList = array_replace(parent::getEventList(), [
31
                static::FLOW_FLUSH => static::FLOW_FLUSH,
32
            ]);
33
        }
34
35
        return static::$eventList;
36
    }
37
}
38