Completed
Push — master ( 0c42c8...5a72fc )
by Mehmet
04:23
created

EnvironmentAbstract   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getUrl() 0 4 1
A getMerchantData() 0 8 1
1
<?php
2
declare(strict_types=1);
3
4
namespace MerchantSafeUnipay\SDK\Environment;
5
6
class EnvironmentAbstract
7
{
8
    protected $merchant;
9
    protected $merchantUser;
10
    protected $merchantPassword;
11
12
    public function __construct(string $merchant, string $merchantUser, string $merchantPassword)
13
    {
14
        $this->merchant = $merchant;
15
        $this->merchantUser = $merchantUser;
16
        $this->merchantPassword = $merchantPassword;
17
    }
18
19
    public function getUrl()
20
    {
21
        return static::$apiUrl;
22
    }
23
24
    public function getMerchantData()
25
    {
26
        return [
27
            'MERCHANT' => $this->merchant,
28
            'MERCHANTUSER' => $this->merchantUser,
29
            'MERCHANTPASSWORD' => $this->merchantPassword
30
        ];
31
    }
32
}
33