ExampleProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 21
ccs 7
cts 7
cp 1
rs 10

1 Method

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