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.

WebhookCall   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

Changes 7
Bugs 3 Features 0
Metric Value
eloc 13
c 7
b 3
f 0
dl 0
loc 57
rs 10
wmc 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A btc() 0 3 1
A coin() 0 3 1
A transaction() 0 3 1
A amount() 0 3 1
A address() 0 3 1
A currency() 0 3 1
A type() 0 3 1
A txid() 0 3 1
A __construct() 0 3 1
A confirmations() 0 3 1
A from() 0 3 1
1
<?php
2
3
namespace Multicoin\Api;
4
5
class WebhookCall
6
{
7
    public $payload = [];
8
9
    public function __construct(array $payload)
10
    {
11
        $this->payload = $payload;
12
    }
13
14
    public function address(): string
15
    {
16
        return $this->payload['address_to'];
17
    }
18
19
    public function amount()
20
    {
21
        return $this->payload['value'];
22
    }
23
24
    public function btc()
25
    {
26
        return $this->payload['value'] / 100000000;
27
    }
28
29
    public function coin(): string
30
    {
31
        return $this->payload['coin'];
32
    }
33
34
    public function confirmations(): string
35
    {
36
        return $this->payload['confirmations'];
37
    }
38
39
    public function currency(): string
40
    {
41
        return $this->payload['currency'];
42
    }
43
44
    public function from(): string
45
    {
46
        return $this->payload['address_from'];
47
    }
48
49
    public function transaction(): array
50
    {
51
        return $this->payload['transaction'];
52
    }
53
54
    public function txid(): string
55
    {
56
        return $this->payload['txid'];
57
    }
58
59
    public function type(): string
60
    {
61
        return $this->payload['type'];
62
    }
63
}
64