Completed
Push — master ( 39c1d7...699dc6 )
by Changwan
06:44
created

PhpViewServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A boot() 0 3 1
1
<?php
2
namespace Wandu\View;
3
4
use Wandu\DI\ContainerInterface;
5
use Wandu\DI\ServiceProviderInterface;
6
use Wandu\View\Contracts\RenderInterface;
7
use function Wandu\Foundation\config;
8
9
/**
10
 * @deprecated use PhiewServiceProvider
11
 */
12
class PhpViewServiceProvider implements ServiceProviderInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function register(ContainerInterface $app)
18
    {
19 2
        $app->closure(RenderInterface::class, function () {
20 1
            return new PhpView(config('view.path'));
21 2
        });
22 2
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27 2
    public function boot(ContainerInterface $app)
28
    {
29 2
    }
30
}
31