Passed
Push — master ( 47699c...d74cf0 )
by Rougin
01:47
created

ExampleProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 85.71%

Importance

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

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 6
    public function register(WritableInterface $container)
24
    {
25 6
        $config = $container->get(ProviderInterface::CONFIG);
26
27 6
        $templates = __DIR__ . DIRECTORY_SEPARATOR . 'Templates';
28
29 6
        $config['app.views.fixture'] = $templates;
30
31 6
        $container->set(ProviderInterface::CONFIG, $config);
32
33 6
        return Provider::merge($container, new RouteCollection);
34
    }
35
}
36