FiresEvents::getEventDispatcher()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Nord\Lumen\Core\Traits;
4
5
use Illuminate\Contracts\Events\Dispatcher;
6
7
trait FiresEvents
8
{
9
    /**
10
     * @param string|object $event
11
     * @param array         $payload
12
     * @param bool|false    $halt
13
     *
14
     * @return array|null
15
     */
16
    private function fireEvent($event, $payload = [], $halt = false)
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
17
    {
18
        return $this->getEventDispatcher()->fire($event, $payload, $halt);
19
    }
20
21
    /**
22
     * @return Dispatcher
23
     */
24
    private function getEventDispatcher()
25
    {
26
        return app(Dispatcher::class);
27
    }
28
}
29