SecurityProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace App\Security;
4
5
use App\Facades\Log;
6
use App\Security\Manager;
7
use Ronanchilvers\Container\Container;
8
use Ronanchilvers\Container\ServiceProviderInterface;
9
10
/**
11
 * Provider for security services
12
 *
13
 * @author Ronan Chilvers <[email protected]>
14
 */
15
class SecurityProvider implements ServiceProviderInterface
16
{
17
    /**
18
     * {@inheritdoc}
19
     *
20
     * @author Ronan Chilvers <[email protected]>
21
     */
22
    public function register(Container $container)
23
    {
24
        $container->share(Manager::class, function($c) {
25
            return new Manager($c->get('session'));
26
        });
27
    }
28
}
29