Settings   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace Geekish\Slimbox;
4
5
use Slim\Collection;
6
7
final class Settings extends Collection
8
{
9
    /**
10
     * Default settings
11
     *
12
     * @var array
13
     */
14
    private $defaultSettings = [
15
        'httpVersion' => '1.1',
16
        'responseChunkSize' => 4096,
17
        'outputBuffering' => 'append',
18
        'determineRouteBeforeAppMiddleware' => false,
19
        'displayErrorDetails' => false,
20
        'addContentLengthHeader' => true,
21
        'routerCacheFile' => false,
22
    ];
23
24
    /**
25
     * @param array $userSettings Slim-specific settings
26
     */
27
    public function __construct(array $userSettings = [])
28
    {
29
        parent::__construct(array_merge($this->defaultSettings, $userSettings));
30
    }
31
}
32