PreAdapterSendEvent::getRequest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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