ResultMap   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A get() 0 3 2
1
<?php
2
3
/*
4
 * (c) Jean-François Lépine <https://twitter.com/Halleck45>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Hal\Metrics\Complexity\Structural\HenryAndKafura;
11
12
13
/**
14
 * coupling map
15
 *
16
 * @author Jean-François Lépine <https://twitter.com/Halleck45>
17
 */
18
class ResultMap {
19
20
    /**
21
     * @var array
22
     */
23
    private $map = array();
24
25
    /**
26
     * @param array $map
27
     */
28
    public function __construct(array $map)
29
    {
30
        $this->map = $map;
31
    }
32
33
    /**
34
     * @param $class
35
     * @return Result
36
     */
37
    public function get($class) {
38
        return isset($this->map[$class]) ? $this->map[$class] : null;
39
    }
40
}