| Total Complexity | 10 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 4 | class easyPay { |
||
| 5 | private array $settings = []; |
||
| 6 | |||
| 7 | public function setCrypto (array|easyCrypto $crypto): self { |
||
| 8 | if (!is_array($crypto) && !empty($crypto)) { |
||
|
|
|||
| 9 | $crypto = $crypto->getSettings(); |
||
| 10 | } |
||
| 11 | $this->settings['crypto'] = $crypto; |
||
| 12 | return $this; |
||
| 13 | } |
||
| 14 | |||
| 15 | public function setIdpay (array|easyIdpay $idpay): self { |
||
| 16 | if (!is_array($idpay) && !empty($idpay)) { |
||
| 17 | $idpay = $idpay->getSettings(); |
||
| 18 | } |
||
| 19 | $this->settings['idpay'] = $idpay; |
||
| 20 | return $this; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function setZarinpal (array|easyZarinpal $zarinpal): self { |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getSettings (): array { |
||
| 33 | } |
||
| 34 | } |