AbstractHyperwalletService::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 5
dl 0
loc 13
rs 10
1
<?php
2
3
namespace App\Service\Hyperwallet;
4
5
use Hyperwallet\Hyperwallet;
6
use Hyperwallet\Exception\HyperwalletArgumentException;
7
use Psr\Log\LoggerInterface;
8
9
/**
10
 * Class AbstractHyperwalletService
11
 * @package App\Service\Hyperwallet
12
 */
13
abstract class AbstractHyperwalletService
14
{
15
    /**
16
     * @var LoggerInterface
17
     */
18
    protected $logger;
19
20
    /**
21
     * @var Hyperwallet
22
     */
23
    protected $client;
24
25
    /**
26
     * AbstractHyperwalletService constructor.
27
     * @param string $user
28
     * @param string $password
29
     * @param string $token
30
     * @param string $url
31
     * @param LoggerInterface $logger
32
     *
33
     * @throws HyperwalletArgumentException
34
     */
35
    public function __construct(
36
        string $user,
37
        string $password,
38
        string $token,
39
        string $url,
40
        LoggerInterface $logger
41
    ) {
42
        $this->logger = $logger;
43
        $this->client = new Hyperwallet(
44
            $user,
45
            $password,
46
            $token,
47
            $url
48
        );
49
    }
50
}
51