AppServiceProvider::boot()   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 5
nc 2
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use Illuminate\Pagination\Paginator;
7
8
class AppServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap any application services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        Paginator::useBootstrap();
18
        if (config('app.multidomain') && !app()->runningInConsole()) {
0 ignored issues
show
introduced by
The method runningInConsole() does not exist on Illuminate\Container\Container. Are you sure you never get this type here, but always one of the subclasses? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        if (config('app.multidomain') && !app()->/** @scrutinizer ignore-call */ runningInConsole()) {
Loading history...
19
            config(['app.url' => request()->root()]);
20
            config(['filesystems.disks.public.url' => request()->root().'/storage']);
21
            config(['filesystems.disks.NOJPublic.url' => request()->root()]);
22
        }
23
    }
24
25
    /**
26
     * Register any application services.
27
     *
28
     * @return void
29
     */
30
    public function register()
31
    {
32
        //
33
    }
34
}
35