BoltContainerConfiguration::default()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lit\Bolt;
6
7
use Lit\Air\Injection\SetterInjector;
8
use Lit\Air\Psr\Container;
9
10
/**
11
 * Configuration class for Bolt
12
 */
13
class BoltContainerConfiguration
14
{
15
    /**
16
     * Configuration for Bolt.
17
     *
18
     * @return array
19
     */
20 5
    public static function default()
21
    {
22 5
        return SetterInjector::configuration();
23
    }
24
25
    /**
26
     * Create a container instance.
27
     *
28
     * @param array $config The configuration array.
29
     * @return Container
30
     */
31 5
    public static function createContainer(array $config = []): Container
32
    {
33 5
        return new Container($config + static::default());
34
    }
35
}
36