Passed
Push — master ( 0e5a66...620416 )
by Rougin
12:10
created

ExampleProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

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