AbstractTransport::getCredentials()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Transport;
4
5
use Speicher210\Fastbill\Api\ApiCredentials;
6
7
/**
8
 * Abstract implementation for transport.
9
 */
10
abstract class AbstractTransport implements TransportInterface
11
{
12
    /**
13
     * The API credentials.
14
     *
15
     * @var ApiCredentials
16
     */
17
    protected $apiCredentials;
18
19
    /**
20
     * Constructor.
21
     *
22
     * @param ApiCredentials $credentials The API credentials.
23
     */
24
    public function __construct(ApiCredentials $credentials)
25
    {
26
        $this->setCredentials($credentials);
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function setCredentials(ApiCredentials $credentials)
33
    {
34
        $this->apiCredentials = $credentials;
35
36
        return $this;
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function getCredentials()
43
    {
44
        return $this->apiCredentials;
45
    }
46
}
47