InstallServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 39
rs 10
c 0
b 0
f 0
ccs 11
cts 11
cp 1
wmc 2
lcom 0
cbo 6

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 17 1
A boot() 0 3 1
1
<?php
2
/*
3
 * This file is part of EC-CUBE
4
 *
5
 * Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.
6
 *
7
 * http://www.lockon.co.jp/
8
 *
9
 * This program is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation; either version 2
12
 * of the License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program; if not, write to the Free Software
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
 */
23
24
25
namespace Eccube\ServiceProvider;
26
27
use Eccube\Application;
28
use Silex\Application as BaseApplication;
29
use Silex\ServiceProviderInterface;
30
31
class InstallServiceProvider implements ServiceProviderInterface
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
32
{
33
    /**
34
     * Registers services on the given app.
35
     *
36
     * This method should only be used to configure services and parameters.
37
     * It should not get services.
38
     *
39
     * @param BaseApplication $app An Application instance
40
     */
41 42
    public function register(BaseApplication $app)
42
    {
43
        $app['form.type.extensions'] = $app->share($app->extend('form.type.extensions', function ($extensions) use ($app) {
44 36
            $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension();
45
46 36
            return $extensions;
47 42
        }));
48
49 42
        $app['form.types'] = $app->share($app->extend('form.types', function ($types) use ($app) {
50 36
            $types[] = new \Eccube\Form\Type\Install\Step1Type($app);
51 36
            $types[] = new \Eccube\Form\Type\Install\Step3Type($app);
52 36
            $types[] = new \Eccube\Form\Type\Install\Step4Type($app);
53 36
            $types[] = new \Eccube\Form\Type\Install\Step5Type($app);
54
55 36
            return $types;
56 42
        }));
57
    }
58
59
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$app" missing
Loading history...
60
     * Bootstraps the application.
61
     *
62
     * This method is called after all services are registered
63
     * and should be used for "dynamic" configuration (whenever
64
     * a service must be requested).
65
     */
66
    public function boot(BaseApplication $app)
67
    {
68
    }
69
}
70