APIService   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 24
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setKeyChain() 0 3 1
A getKeyToService() 0 6 1
A setServiceToLoad() 0 3 1
1
<?php
2
3
namespace Anax\Service;
4
5
use Anax\Commons\ContainerInjectableInterface;
6
use Anax\Commons\ContainerInjectableTrait;
7
8
/**
9
 * API Service class
10
 *
11
 * @SuppressWarnings(PHPMD)
12
 */
13
class APIService
14
{
15
    use ContainerInjectableTrait;
16
17
    private $keyChain = null;
18
    private $service = null;
19
    private $services = null;
0 ignored issues
show
introduced by
The private property $services is not used, and could be removed.
Loading history...
20
21
    public function setKeyChain(array $key) : void
22
    {
23
        $this->keyChain = $key;
24
    }
25
26
    public function setServiceToLoad(string $service) : void
27
    {
28
        $this->service = $service;
29
    }
30
31
    public function getKeyToService()
32
    {
33
        $service = $this->service;
34
        $keyChain = $this->keyChain;
35
        // if (array_key_exists($service, $keyChain)) {
36
        return $keyChain[$service];
37
        // }
38
    }
39
}
40