FileSystemProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A registerFacade() 0 4 1
A boot() 0 4 1
A setConsts() 0 4 2
1
<?php
2
3
namespace Maestriam\FileSystem\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use Maestriam\FileSystem\Foundation\FileSystem;
7
8
class FileSystemProvider extends ServiceProvider
9
{
10
    public function boot()
11
    {
12
        $this->setConsts();
13
        $this->registerFacade();
14
    }
15
16
    private function setConsts()
17
    {
18
        if (! defined('DS')) {
19
            define('DS', DIRECTORY_SEPARATOR);
20
        }
21
    }
22
23
    private function registerFacade()
24
    {
25
        $this->app->bind('filesystem',function() {
26
            return new FileSystem();
27
        });
28
    }
29
}