AbstractTransport   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 37
ccs 0
cts 13
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setCredentials() 0 6 1
A getCredentials() 0 4 1
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