Passed
Push — master ( 9792fc...04e5e0 )
by Tim
06:59
created

DependencyInjection::get()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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