StorageServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 16
ccs 10
cts 10
cp 1
rs 10
c 2
b 1
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 13 1
1
<?php
2
3
namespace Flaviozantut\Storage;
4
5
use Config;
6
use Flaviozantut\Storage\Posts\FilePostRepository;
7
use Illuminate\Support\ServiceProvider;
8
9
class StorageServiceProvider extends ServiceProvider
10
{
11 16
    public function register()
12
    {
13 16
        $this->app->bind(
14 16
        'Flaviozantut\Storage\Posts\PostRepositoryInterface',
15 16
        function () {
16 1
            switch (Config::get('skorry.storage')) {
17 1
                default:
18 1
                    return new FilePostRepository(Config::get('skorry.path'));
19
                    break;
20 1
            }
21
        }
22 16
    );
0 ignored issues
show
Coding Style introduced by
It seems like the identation of this line is off (expected at least 8 spaces, but found 4).
Loading history...
23 16
    }
24
}
25