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.

TopupHttpApiParams::toArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace LBHurtado\EngageSpark\Classes;
4
5
use LBHurtado\EngageSpark\EngageSpark;
6
use LBHurtado\Common\Contracts\HttpApiParams;
7
8
class TopupHttpApiParams implements HttpApiParams
9
{
10
    /**
11
     * @var EngageSpark
12
     */
13
    protected $service;
14
15
    /**
16
     * @var string
17
     */
18
    protected $mobile;
19
20
    /**
21
     * @var int
22
     */
23
    protected $amount;
24
25
    /**
26
     * @var string
27
     */
28
    protected $recipientType = 'mobile_number';
29
30
    /**
31
     * @var string
32
     */
33
    protected $reference;
34
35
    /**
36
     * SendParams constructor.
37
     * @param $service
38
     * @param $mobile_number
39
     * @param $amount
40
     * @param $reference
41
     */
42
    public function __construct(EngageSpark $service, string $mobile, int $amount, string $reference)
43
    {
44
        $this->service = $service;
45
        $this->mobile = $mobile;
46
        $this->amount = $amount;
47
        $this->reference = $reference;
48
    }
49
50
    //TODO: make this independent of provider, right now it's engagespark
51
    public function toArray(): array
52
    {
53
        return [
54
            'organizationId' => $this->service->getOrgId(),
55
            'phoneNumber' => $this->mobile,
56
            'maxAmount' => $this->amount,
57
            'clientRef'  => $this->reference,
58
        ];
59
    }
60
}
61