Test Failed
Push — master ( 9f82b3...3c8bc2 )
by Alexey
07:31
created

FilesystemServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 15
c 0
b 0
f 0
ccs 0
cts 8
cp 0
rs 10
wmc 1
lcom 0
cbo 5

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 1
1
<?php declare(strict_types = 1);
2
3
namespace Venta\Framework\ServiceProvider;
4
5
use League\Flysystem\Adapter\Local;
6
use League\Flysystem\Filesystem;
7
use League\Flysystem\FilesystemInterface;
8
use Venta\Contracts\Filesystem\Filesystem as VentaFilesystemContract;
9
use Venta\Filesystem\Filesystem as VentaFilesystem;
10
use Venta\ServiceProvider\AbstractServiceProvider;
11
12
/**
13
 * Class FilesystemServiceProvider
14
 *
15
 * @package Venta\Framework\ServiceProvider
16
 */
17
class FilesystemServiceProvider extends AbstractServiceProvider
18
{
19
    /**
20
     * @inheritDoc
21
     */
22
    public function boot()
23
    {
24
        $this->container()->bindFactory(Filesystem::class, function () {
25
            return new Filesystem(new Local($this->kernel()->rootPath()));
26
        });
27
        $this->container()->bindClass(FilesystemInterface::class, Filesystem::class);
28
        $this->container()->bindClass(VentaFilesystemContract::class, VentaFilesystem::class);
29
    }
30
31
}