Completed
Push — master ( 47d481...b68680 )
by Julián
12:05
created

EventEnvelope   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getWrappedEvent() 0 4 1
1
<?php
2
3
/*
4
 * event-symfony-event-dispatcher (https://github.com/phpgears/event-symfony-event-dispatcher).
5
 * Event bus with Symfony Event Dispatcher.
6
 *
7
 * @license MIT
8
 * @link https://github.com/phpgears/event-symfony-event-dispatcher
9
 * @author Julián Gutiérrez <[email protected]>
10
 */
11
12
declare(strict_types=1);
13
14
namespace Gears\Event\Symfony\Dispatcher;
15
16
use Gears\Event\Event;
17
use Symfony\Component\EventDispatcher\Event as SymfonyEvent;
18
19
final class EventEnvelope extends SymfonyEvent
20
{
21
    /**
22
     * @var Event
23
     */
24
    private $wrappedEvent;
25
26
    /**
27
     * EventWrapper constructor.
28
     *
29
     * @param Event $event
30
     */
31
    public function __construct(Event $event)
32
    {
33
        $this->wrappedEvent = $event;
34
    }
35
36
    /**
37
     * Get wrapped event.
38
     *
39
     * @return Event
40
     */
41
    public function getWrappedEvent(): Event
42
    {
43
        return $this->wrappedEvent;
44
    }
45
}
46