Application   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 19
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getConfig() 0 4 2
1
<?php
2
3
namespace Flatdown;
4
5
class Application extends \Philae\Application
6
{
7 15
    public function __construct(array $config = [])
8
    {
9 15
        parent::__construct();
10 15
        $this->share('config', new Config($config));
11 15
    }
12
13
    /**
14
     * @param string|null $key
15
     * @param mixed|null $default
16
     *
17
     * @return Config|mixed
18
     */
19 15
    public function getConfig($key = null, $default = null)
20
    {
21 15
        return (func_num_args() == 0) ? $this->get('config') : $this->get('config')->get($key, $default);
22
    }
23
}
24