Completed
Push — master ( 38797d...534d41 )
by Nate
03:48
created

MultipleByEvent::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 0
cts 12
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * @author    Flipbox Factory
5
 * @copyright Copyright (c) 2017, Flipbox Digital
6
 * @link      https://github.com/flipbox/queue/releases/latest
7
 * @license   https://github.com/flipbox/queue/blob/master/LICENSE
8
 */
9
10
namespace flipbox\queue\queues;
11
12
use flipbox\queue\events\RegisterQueues;
13
14
/**
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 1.0.0
17
 */
18
class MultipleByEvent extends Multiple
19
{
20
    /**
21
     * The register queues event name
22
     */
23
    const EVENT_REGISTER_QUEUES = 'registerQueues';
24
25
    /**
26
     * @inheritdoc
27
     */
28
    public function init()
29
    {
30
        $event = new RegisterQueues(
31
            $this->queues
32
        );
33
        $this->trigger(
34
            self::EVENT_REGISTER_QUEUES,
35
            $event
36
        );
37
        $this->queues = $event->queues;
38
        parent::init();
39
    }
40
}
41