PreAdapterSendEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 42
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTarget() 0 4 1
A getRequest() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of Transfer.
5
 *
6
 * For the full copyright and license information, please view the LICENSE file located
7
 * in the root directory.
8
 */
9
10
namespace Transfer\Event;
11
12
use Symfony\Component\EventDispatcher\Event;
13
use Transfer\Adapter\TargetAdapterInterface;
14
use Transfer\Adapter\Transaction\Request;
15
16
/**
17
 * Event triggered before a target adapter receives a request.
18
 */
19
class PreAdapterSendEvent extends Event
20
{
21
    /**
22
     * @var TargetAdapterInterface Target adapter
23
     */
24
    protected $target;
25
26
    /**
27
     * @var Request Request sent to adapter
28
     */
29
    protected $request;
30
31
    /**
32
     * @param TargetAdapterInterface $target  Target adapter
33
     * @param Request                $request Request sent to adapter
34
     */
35 7
    public function __construct(TargetAdapterInterface $target, Request $request)
36
    {
37 7
        $this->target = $target;
38 7
        $this->request = $request;
39 7
    }
40
41
    /**
42
     * Returns target adapter.
43
     *
44
     * @return TargetAdapterInterface Target adapter
45
     */
46 1
    public function getTarget()
47
    {
48 1
        return $this->target;
49
    }
50
51
    /**
52
     * Returns request which is going to be sent to adapter.
53
     *
54
     * @return Request Request sent to adapter
55
     */
56 5
    public function getRequest()
57
    {
58 5
        return $this->request;
59
    }
60
}
61