Passed
Branch monitor-2.5.x (8b654c)
by Tim
01:31
created

DependencyInjection::get()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SimpleSAML\Modules\Monitor;
4
5
final class DependencyInjection
6
{
7
    /**
8
     * @var array
9
     */
10
    private $vars;
11
12
    /**
13
     * @param array $vars
14
     */
15
    public function __construct($vars)
16
    {
17
        $this->vars = $vars;
18
    }
19
20
    /**
21
     * @param string $key
22
     *
23
     * @return mixed
24
     */
25
    public function get($key)
26
    {
27
        return array_key_exists($key, $this->vars) ? $this->vars[$key] : null;
28
    }
29
}
30