ResultMap::get()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 3
rs 10
cc 2
eloc 2
nc 2
nop 1
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
}