GdaemonFilesServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.125

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 1
cts 2
cp 0.5
crap 1.125
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Gameap\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use Knik\Flysystem\Gameap\GameapAdapter;
7
use League\Flysystem\Filesystem;
8
use Storage;
9
10
class GdaemonFilesServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Perform post-registration booting of services.
14
     *
15
     * @return void
16
     */
17 108
    public function boot(): void
18
    {
19
        Storage::extend('gameap', function ($app, $config) {
20
            return new Filesystem(new GameapAdapter($config));
21 108
        });
22 108
    }
23
24
    /**
25
     * Register bindings in the container.
26
     *
27
     * @return void
28
     */
29 108
    public function register(): void
30
    {
31
        //
32 108
    }
33
}
34