Keys::getApiKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Anax\Keys;
3
4
use Anax\Commons\ContainerInjectableInterface;
5
6
use Anax\Commons\ContainerInjectableTrait;
7
8
/**
9
 *
10
 */
11
class Keys implements ContainerInjectableInterface
12
{
13
    use ContainerInjectableTrait;
14
    private $ipstack;
15
    private $darksky;
16 2
    public function __construct()
17
    {
18 2
        $keyConfig = include(__DIR__ . "/../../config/apikeys.php");
19 2
        $this->ipstack = $keyConfig["ipstack"];
20 2
        $this->darksky = $keyConfig["darksky"];
21 2
    }
22 1
    public function getApiKey($keyname)
23
    {
24 1
        return $this->$keyname;
25
    }
26
}
27