getConfigSettings   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCurlDebugIsEnable() 0 4 1
A getConfigSettings() 0 7 2
1
<?php
2
3
namespace Stadem\VivaPayments\Traits;
4
use Stadem\VivaPayments\Config\Config;
5
6
trait getConfigSettings
7
{
8
       public function getConfigSettings() {
9
        if (!property_exists($this, 'accessToken')) {
10
                throw new \Exception('Property $accessToken does not exist');
11
            }
12
        $environment = $this->accessToken->getEnvironment();
13
        $config = new Config($environment);
14
        return $config;
15
        }
16
17
        public function getCurlDebugIsEnable() {
18
19
        $config = new Config();     
20
        return $config->get('curlDebug');
21
22
        } 
23
    
24
}