Passed
Push — main ( f82312...487838 )
by Miaad
10:48 queued 13s
created

easyZarinpal   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setSandbox() 0 3 1
A setZarinGate() 0 3 1
A setMerchantId() 0 3 1
A getSettings() 0 2 1
1
<?php
2
3
namespace BPT\settings;
4
class easyZarinpal {
5
    private array $settings = [];
6
7
    public function setSandbox (string $sandbox): self {
8
        $this->settings['sandbox'] = $sandbox;
9
        return $this;
10
    }
11
12
    public function setZarinGate (string $zarin_gate): self {
13
        $this->settings['zarin_gate'] = $zarin_gate;
14
        return $this;
15
    }
16
17
    public function setMerchantId (int $merchant_id): self {
18
        $this->settings['merchant_id'] = $merchant_id;
19
        return $this;
20
    }
21
22
    public function getSettings (): array {
23
        return $this->settings;
24
    }
25
}