EventDispatcherLaravel::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
/*
4
 * This file is part of Laravel HTTP Adapter.
5
 *
6
 * (c) Hidde Beydals <[email protected]>, Mark Redeman
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace HiddeCo\HttpAdapter\Adapters;
13
14
use Illuminate\Contracts\Events\Dispatcher as LaravelDispatcher;
15
use Symfony\Component\EventDispatcher\EventDispatcherInterface as SymfonyDispatcher;
16
17
/**
18
 * This adapter provides a Laravel integration for applications
19
 * using the Symfony EventDispatcherInterface.
20
 *
21
 * It passes any request on to a Symfony Dispatcher and only
22
 * uses the Laravel Dispatcher when dispatching events.
23
 */
24
class EventDispatcherLaravel extends AbstractEventDispatcher
25
{
26
    /**
27
     * Forward all methods to the Laravel Events Dispatcher.
28
     *
29
     * @param LaravelDispatcher $laravelDispatcher
30
     * @param SymfonyDispatcher $symfonyDispatcher
31
     */
32
    public function __construct(LaravelDispatcher $laravelDispatcher, SymfonyDispatcher $symfonyDispatcher)
33
    {
34
        $this->laravelDispatcher = $laravelDispatcher;
35
        $this->symfonyDispatcher = $symfonyDispatcher;
36
    }
37
}
38