Keys   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 14
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getApiKey() 0 3 1
A __construct() 0 5 1
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