FiresEvents   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 22
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fireEvent() 0 4 1
A getEventDispatcher() 0 4 1
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