getConfigSettings::getConfigSettings()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 7
rs 10
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
}