UrlGenerator::getFacadeAccessor()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 7
rs 9.4285
c 1
b 0
f 0
cc 2
eloc 3
nc 2
nop 0
1
<?php
2
3
namespace Trucker\Facades;
4
5
use Illuminate\Support\Facades\Facade;
6
use Trucker\TruckerServiceProvider;
7
8
/**
9
 * Facade class for interacting with the Trucker UrlGenerator class.
10
 *
11
 * @author Alessandro Manno <[email protected]>
12
 */
13
class UrlGenerator extends Facade
14
{
15
    /**
16
     * Get the registered name of the component.
17
     *
18
     * @return string
19
     */
20
    protected static function getFacadeAccessor()
21
    {
22
        if (!static::$app) {
23
            static::$app = TruckerServiceProvider::make();
0 ignored issues
show
Documentation Bug introduced by
It seems like Trucker\TruckerServiceProvider::make() of type Illuminate\Container\Container is incompatible with the declared type Illuminate\Foundation\Application of property $app.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
24
        }
25
26
        return 'trucker.urls';
27
    }
28
}
29