Passed
Push — master ( 620416...a29fb4 )
by Rougin
02:02
created

ExampleProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 11 1
1
<?php
2
3
namespace App\Example;
4
5
use App\Zapheus\ZapheusProvider as Provider;
6
use Zapheus\Container\WritableInterface;
7
use Zapheus\Provider\ProviderInterface;
8
9
/**
10
 * Example Provider
11
 *
12
 * @package App
13
 * @author  Rougin Royce Gutib <[email protected]>
14
 */
15
class ExampleProvider implements ProviderInterface
16
{
17
    /**
18
     * Registers the bindings in the container.
19
     *
20
     * @param  \Zapheus\Container\WritableInterface $container
21
     * @return \Zapheus\Container\ContainerInterface
22
     */
23 9
    public function register(WritableInterface $container)
24
    {
25 9
        $config = $container->get(ProviderInterface::CONFIG);
26
27 9
        $templates = __DIR__ . DIRECTORY_SEPARATOR . 'Templates';
28
29 9
        $config->set('app.views.fixture', (string) $templates);
30
31 9
        $container->set(ProviderInterface::CONFIG, $config);
32
33 9
        return Provider::merge($container, new RouteCollection);
34
    }
35
}
36