Passed
Push — master ( 71b580...625333 )
by Harry
01:57
created

EventDispatcherFake::doDispatch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
/**
3
 * This file is part of graze/parallel-process.
4
 *
5
 * Copyright © 2018 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/parallel-process/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/parallel-process
12
 */
13
14
namespace Graze\ParallelProcess\Test;
15
16
use Graze\ParallelProcess\Event\EventDispatcherTrait;
17
use Symfony\Component\EventDispatcher\Event;
18
19
class EventDispatcherFake
20
{
21
    const EVENT_VALID   = 'valid';
22
    const EVENT_INVALID = 'invalid';
23
24
    use EventDispatcherTrait;
25
26
    /**
27
     * @return string[]
28
     */
29
    protected function getEventNames()
30
    {
31
        return [static::EVENT_VALID];
32
    }
33
34
    /**
35
     * @param string $eventName
36
     * @param Event  $event
37
     */
38
    public function doDispatch($eventName, Event $event)
39
    {
40
        $this->dispatch($eventName, $event);
41
    }
42
}
43