Passed
Push — master ( ce6932...018f80 )
by Gabriel
16:56
created

event()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 1
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
use ByTIC\EventDispatcher\Events\EventInterface;
4
5
if (!function_exists('event')) {
6
    /**
7
     * Dispatch an event and call the listeners.
8
     *
9
     * @param  EventInterface $event
10
     * @return EventInterface
11
     */
12
    function event(EventInterface $event)
13
    {
14
        return app('events')->dispatch($event);
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
        return /** @scrutinizer ignore-call */ app('events')->dispatch($event);
Loading history...
15
    }
16
}
17