GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

QueuedEventHandler::fire()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 14
rs 9.7998
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
4
namespace SmoothPhp\LaravelAdapter\QueuedEventDispatcher;
5
6
use Illuminate\Container\Container;
7
8
9
/**
10
 * Class QueuedEventHandler
11
 * @package SmoothPhp\LaravelAdapter\QueuedEventDispatcher
12
 * @author Simon Bennett <[email protected]>
13
 */
14
final class QueuedEventHandler
15
{
16
    /** @var Container */
17
    private $container;
18
19
    /**
20
     * QueuedEventHandler constructor.
21
     * @param Container $container
22
     * @internal param $Container
23
     */
24
    public function __construct(Container $container)
25
    {
26
        $this->container = $container;
27
    }
28
29
    /**
30
     * @param $job
31
     * @param $data
32
     */
33
    public function fire($job, $data)
34
    {
35
        $event = call_user_func(
36
            [
37
                str_replace('.', '\\', $data['event']['class']),
38
                'deserialize'
39
            ],
40
            $data['event']['payload']
41
        );
42
43
        $this->container->make($data['listener_class'])->{$data['listener_method']}($event);
44
45
        $job->delete();
46
    }
47
}
48