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

Event   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

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