Passed
Branch main (b90ec4)
by Thierry
20:23 queued 14:04
created

AppServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 3
1
<?php
2
3
namespace App\Providers;
4
5
use Illuminate\Support\Facades\Schema;
6
use Illuminate\Support\ServiceProvider;
7
8
class AppServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Register any application services.
12
     */
13
    public function register(): void
14
    {
15
        //
16
    }
17
18
    /**
19
     * Bootstrap any application services.
20
     */
21
    public function boot(): void
22
    {
23
        // app()->usePublicPath(__DIR__.'/public');
24
25
        Schema::defaultStringLength(190);
26
27
        // Force redirect to HTTPS.
28
        $url = $this->app['url'];
29
        if($this->app->environment('production'))
30
        {
31
            $url->forceScheme('https');
32
        }
33
    }
34
}
35