registerNativeFilesystem()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Magister\Services\Filesystem;
4
5
use Magister\Services\Support\ServiceProvider;
6
7
/**
8
 * Class FilesystemServiceProvider.
9
 */
10
class FilesystemServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Register the service provider.
14
     *
15
     * @return void
16
     */
17
    public function register()
18
    {
19
        $this->registerNativeFilesystem();
20
    }
21
22
    /**
23
     * Register the native filesystem implementation.
24
     *
25
     * @return void
26
     */
27
    protected function registerNativeFilesystem()
28
    {
29
        $this->app->singleton('files', function () {
30
            return new Filesystem();
31
        });
32
    }
33
}
34