Completed
Push — master ( 912266...b661a7 )
by Kirill
13:33
created

CompletedEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 4
dl 11
loc 11
rs 9.4285
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Personnage\Tinkoff\SDK\Event;
4
5
use League\Event\AbstractEvent;
6
use Psr\Http\Message\RequestInterface;
7
use Psr\Http\Message\ResponseInterface;
8
9 View Code Duplication
final class CompletedEvent extends AbstractEvent
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    /**
12
     * @var RequestInterface
13
     */
14
    public $request;
15
16
    /**
17
     * @var ResponseInterface|null
18
     */
19
    public $response;
20
21
    /**
22
     * @var float
23
     */
24
    public $startedAt;
25
26
    /**
27
     * @var float
28
     */
29
    public $completedAt;
30
31
    /**
32
     * Init a new instance.
33
     *
34
     * @param float                   $startedAt
35
     * @param RequestInterface        $request
36
     * @param float                   $completedAt
37
     * @param ResponseInterface|null  $response
38
     */
39
    public function __construct(
40
        float $startedAt,
41
        RequestInterface $request,
42
        float $completedAt,
43
        ResponseInterface $response = null
44
    ) {
45
        $this->request = $request;
46
        $this->response = $response;
47
        $this->startedAt = $startedAt;
48
        $this->completedAt = $completedAt;
49
    }
50
}
51