GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Account   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 7
eloc 22
c 2
b 0
f 1
dl 0
loc 70
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A id() 0 3 1
A creditLimit() 0 3 1
A balance() 0 3 1
A __construct() 0 7 1
A fromResponse() 0 8 1
A cashbackType() 0 3 1
A currencyCode() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Monobank\Response\Model;
6
7
final class Account
8
{
9
    /**
10
     * @var string
11
     */
12
    private $id;
13
14
    /**
15
     * @var int
16
     */
17
    private $balance;
18
19
    /**
20
     * @var int
21
     */
22
    private $creditLimit;
23
24
    /**
25
     * @var int
26
     */
27
    private $currencyCode;
28
29
    /**
30
     * @var string
31
     */
32
    private $cashbackType;
33
34
    public function __construct(string $id, int $balance, int $creditLimit, int $currencyCode, string $cashbackType)
35
    {
36
        $this->id = $id;
37
        $this->balance = $balance;
38
        $this->creditLimit = $creditLimit;
39
        $this->currencyCode = $currencyCode;
40
        $this->cashbackType = $cashbackType;
41
    }
42
43
    public static function fromResponse(array $data): self
44
    {
45
        return new self(
46
            $data['id'],
47
            $data['balance'],
48
            $data['creditLimit'],
49
            $data['currencyCode'],
50
            $data['cashbackType']
51
        );
52
    }
53
54
    public function id(): string
55
    {
56
        return $this->id;
57
    }
58
59
    public function balance(): int
60
    {
61
        return $this->balance;
62
    }
63
64
    public function creditLimit(): int
65
    {
66
        return $this->creditLimit;
67
    }
68
69
    public function currencyCode(): int
70
    {
71
        return $this->currencyCode;
72
    }
73
74
    public function cashbackType(): string
75
    {
76
        return $this->cashbackType;
77
    }
78
}
79