Application   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 23
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEnvironment() 0 4 1
A getConfig() 0 6 3
1
<?php
2
3
namespace App;
4
5
class Application extends \Philae\Application
6
{
7
    const SERVICE_CONFIG      = 'config';
8
    const SERVICE_ENVIRONMENT = 'environment';
9
10
    public function getEnvironment()
11
    {
12
        return $this->get(self::SERVICE_ENVIRONMENT);
13
    }
14
15
    /**
16
     * @param string|null $key
17
     * @param mixed|null $default
18
     *
19
     * @return mixed
20
     */
21
    public function getConfig($key = null, $default = null)
22
    {
23
        $config = $this->get(self::SERVICE_CONFIG);
24
25
        return (func_num_args() == 0) ? $config : (isset($config[$key]) ? $config[$key] : $default);
26
    }
27
}
28