MonologConfiguration::apply()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 9
cts 9
cp 1
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Equip\Configuration;
4
5
use Auryn\Injector;
6
use Monolog\Logger;
7
use Psr\Log\LoggerInterface;
8
9
class MonologConfiguration implements ConfigurationInterface
10
{
11
    use EnvTrait;
12
13
    /**
14
     * @inheritDoc
15
     */
16 1
    public function apply(Injector $injector)
17
    {
18 1
        $injector->alias(
19 1
            LoggerInterface::class,
20
            Logger::class
21 1
        );
22
23 1
        $injector->share(Logger::class);
24
25 1
        $injector->define(Logger::class, [
26 1
            ':name' => $this->env->getValue('LOGGER_NAME', 'equip')
27 1
        ]);
28 1
    }
29
}
30