PaymentConfig::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 0
c 0
b 0
f 0
nc 1
nop 5
dl 0
loc 7
ccs 1
cts 1
cp 1
crap 1
rs 10
1
<?php
2
3
/**
4
 * This file is part of the Pixidos package.
5
 *
6
 *  (c) Ondra Votava <[email protected]>
7
 *
8
 *  For the full copyright and license information, please view the LICENSE
9
 *  file that was distributed with this source code.
10
 *
11
 */
12
13
declare(strict_types=1);
14
15
namespace Pixidos\GPWebPay\Config;
16
17
use Pixidos\GPWebPay\Param\DepositFlag;
18
use Pixidos\GPWebPay\Param\MerchantNumber;
19
use Pixidos\GPWebPay\Param\ResponseUrl;
20
21
class PaymentConfig
22
{
23 11
    public function __construct(
24
        private readonly string $url,
25
        private readonly MerchantNumber $merchantNumber,
26
        private readonly DepositFlag $depositFlag,
27
        private readonly string $gateway,
28
        private readonly ResponseUrl|null $responseUrl = null
29
    ) {
30 11
    }
31
32 11
    public function getUrl(): string
33
    {
34 11
        return $this->url;
35
    }
36
37 17
    public function getMerchantNumber(): MerchantNumber
38
    {
39 17
        return $this->merchantNumber;
40
    }
41
42 11
    public function getDepositFlag(): DepositFlag
43
    {
44 11
        return $this->depositFlag;
45
    }
46
47 7
    public function getResponseUrl(): ?ResponseUrl
48
    {
49 7
        return $this->responseUrl;
50
    }
51
52 11
    public function getGateway(): string
53
    {
54 11
        return $this->gateway;
55
    }
56
}
57