Completed
Push — master ( f97a49...281390 )
by Dmitry
10:44
created

Event::fire()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
1
<?php
2
3
namespace Basis;
4
5
class Event
6
{
7
    private $dispatcher;
8
9
    public function __construct(Dispatcher $dispatcher)
10
    {
11
        $this->dispatcher = $dispatcher;
12
    }
13
14
    public function fire($event, $context)
15
    {
16
        $this->dispatcher->dispatch('event.fire', [
17
            'event' => $event,
18
            'context' => $context
19
        ]);
20
    }
21
}
22