Issuer   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 65
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 3 1
A getPaymentMethod() 0 3 1
A getName() 0 3 1
1
<?php
2
/**
3
 * Issuer
4
 */
5
6
namespace Omnipay\Common;
7
8
/**
9
 * Issuer
10
 *
11
 * This class abstracts some functionality around card issuers used in the
12
 * Omnipay system.
13
 */
14
class Issuer
15
{
16
    /**
17
     * The identifier of the issuer.
18
     *
19
     * @var string
20
     */
21
    protected $id;
22
    
23
    /**
24
     * The full name of the issuer.
25
     *
26
     * @var string
27
     */
28
    protected $name;
29
    
30
    /**
31
     * The ID of a payment method that the issuer belongs to.
32
     **
33
     * @var string
34
     */
35
    protected $paymentMethod;
36
37
    /**
38
     * Create a new Issuer
39
     *
40
     * @param string      $id            The identifier of this issuer
41
     * @param string      $name          The name of this issuer
42
     * @param string|null $paymentMethod The ID of a payment method this issuer belongs to
43
     */
44 6
    public function __construct($id, $name, $paymentMethod = null)
45
    {
46 6
        $this->id = $id;
47 6
        $this->name = $name;
48 6
        $this->paymentMethod = $paymentMethod;
49 6
    }
50
51
    /**
52
     * The identifier of this issuer
53
     *
54
     * @return string
55
     */
56 6
    public function getId()
57
    {
58 6
        return $this->id;
59
    }
60
61
    /**
62
     * The name of this issuer
63
     *
64
     * @return string
65
     */
66 6
    public function getName()
67
    {
68 6
        return $this->name;
69
    }
70
71
    /**
72
     * The ID of a payment method this issuer belongs to
73
     *
74
     * @return string
75
     */
76 6
    public function getPaymentMethod()
77
    {
78 6
        return $this->paymentMethod;
79
    }
80
}
81