Passed
Push — master ( 6b0e6b...43789e )
by Stephen
03:30
created

TrackTrafficEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
namespace Sfneal\Tracking\Events;
4
5
use Illuminate\Http\RedirectResponse;
6
use Illuminate\Http\Request;
7
use Illuminate\Http\Response;
8
use Sfneal\Events\AbstractEvent;
9
use Sfneal\Tracking\Actions\ParseTrafficAction;
10
11
class TrackTrafficEvent extends AbstractEvent
12
{
13
    /**
14
     * @var array
15
     */
16
    public $tracking = [];
17
18
    /**
19
     * Create a new event instance.
20
     *
21
     * @param Request                   $request
22
     * @param Response|RedirectResponse $response
23
     * @param string                    $time_stamp
24
     */
25
    public function __construct(Request $request, $response, string $time_stamp)
26
    {
27
        $this->tracking = (new ParseTrafficAction($request, $response, $time_stamp))->execute();
28
    }
29
}
30