FileSystemProvider::setConsts()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
c 0
b 0
f 0
nc 2
nop 0
dl 0
loc 4
rs 10
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
}