Passed
Push — main ( 9c59f2...5fac80 )
by Peter
02:52
created

UrlFixerBootstrapper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A registerBindings() 0 5 1
A getBindings() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Framework\Bootstrappers\Vendor;
6
7
use AbterPhp\Framework\Assets\UrlFixer;
8
use AbterPhp\Framework\Config\Routes;
9
use Opulence\Ioc\Bootstrappers\Bootstrapper;
10
use Opulence\Ioc\Bootstrappers\ILazyBootstrapper;
11
use Opulence\Ioc\IContainer;
12
13
class UrlFixerBootstrapper extends Bootstrapper implements ILazyBootstrapper
14
{
15
    /**
16
     * @return array
17
     */
18
    public function getBindings(): array
19
    {
20
        return [
21
            UrlFixer::class,
22
        ];
23
    }
24
25
    /**
26
     * @param IContainer $container
27
     */
28
    public function registerBindings(IContainer $container)
29
    {
30
        $urlFixer = new UrlFixer(Routes::getCacheUrl());
31
32
        $container->bindInstance(UrlFixer::class, $urlFixer);
33
    }
34
}
35