ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
ccs 2
cts 2
cp 1
cc 1
eloc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace OpenTribes\Core\Silex\Provider;
4
5
6
use OpenTribes\Core\Silex\Service;
7
use Silex\Application;
8
use Silex\ServiceProviderInterface;
9
10
class ServiceProvider implements ServiceProviderInterface{
11
    /**
12
     * Registers services on the given app.
13
     *
14
     * This method should only be used to configure services and parameters.
15
     * It should not get services.
16
     */
17
    public function register(Application $app)
18
    {
19 35
        $app[Service::PASSWORD_HASH] = $app->share(function () use ($app) {
20 25
            return new Service\DefaultPasswordHashService();
21 35
        });
22 35
    }
23
24
    /**
25
     * Bootstraps the application.
26
     *
27
     * This method is called after all services are registered
28
     * and should be used for "dynamic" configuration (whenever
29
     * a service must be requested).
30
     */
31 35
    public function boot(Application $app)
32
    {
33
34 35
    }
35
36
}