Info   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 7
lcom 1
cbo 1
dl 0
loc 39
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCardType() 0 4 1
A getCardTypeName() 0 4 1
A getBankInfo() 0 4 1
A getBankCode() 0 4 1
A getBankName() 0 4 1
A getBankIcon() 0 4 1
1
<?php
2
3
4
namespace Sco\Bankcard;
5
6
use Sco\Bankcard\Contracts\Info as InfoContract;
7
use Sco\Bankcard\Traits\HasAttributes;
8
9
class Info implements InfoContract
10
{
11
    use HasAttributes;
12
13
    public function __construct(array $attributes)
14
    {
15
        $this->attributes = $attributes;
16
    }
17
18
    public function getBankInfo()
19
    {
20
        return $this->getAttributes();
21
    }
22
23
    public function getBankCode()
24
    {
25
        return $this->getAttribute('bankCode');
26
    }
27
28
    public function getBankName()
29
    {
30
        return $this->getAttribute('bankName');
31
    }
32
33
    public function getBankIcon()
34
    {
35
        return $this->getAttribute('bankIcon');
36
    }
37
38
    public function getCardType()
39
    {
40
        return $this->getAttribute('cardType');
41
    }
42
43
    public function getCardTypeName()
44
    {
45
        return $this->getAttribute('cardTypeName');
46
    }
47
}
48