PoweredLocal/vrata

View on GitHub
app/Providers/AppServiceProvider.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\Laravel\Passport\Passport' in method 'boot'.
Open

        Passport::tokensExpireIn(Carbon::now()->addDays(15));
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Dusterio\LumenPassport\LumenPassport' in method 'boot'.
Open

        LumenPassport::tokensExpireIn(Carbon::now()->addYears(50), 2);
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Dusterio\LumenPassport\LumenPassport' in method 'boot'.
Open

        LumenPassport::allowMultipleTokens();
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Illuminate\Support\Facades\Log' in method 'registerRoutes'.
Open

            Log::info('Not adding any service routes - route file is missing');
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\App\Routing\RouteRegistry' in method 'boot'.
Open

            return RouteRegistry::initFromFile('routes.json');
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\App\Http\Request' in method 'boot'.
Open

            return $this->prepareRequest(Request::capture());
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Illuminate\Support\Facades\Config' in method 'boot'.
Open

                'connect_timeout' => Config::get('gateway.global.connect_timeout', Config::get('gateway.global.timeout'))
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Illuminate\Support\Facades\Config' in method 'boot'.
Open

                'timeout' => Config::get('gateway.global.timeout'),
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Laravel\Passport\Passport' in method 'boot'.
Open

        Passport::refreshTokensExpireIn(Carbon::now()->addDays(30));
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Illuminate\Support\Facades\Config' in method 'boot'.
Open

                'connect_timeout' => Config::get('gateway.global.connect_timeout', Config::get('gateway.global.timeout'))
Severity: Minor
Found in app/Providers/AppServiceProvider.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Expected 1 space after FUNCTION keyword; 0 found
Open

        $this->app->singleton(RouteRegistry::class, function() {

Expected 1 space after FUNCTION keyword; 0 found
Open

        $this->app->singleton(Client::class, function() {

Line exceeds 120 characters; contains 121 characters
Open

                'connect_timeout' => Config::get('gateway.global.connect_timeout', Config::get('gateway.global.timeout'))

There are no issues that match your filters.

Category
Status