EscolaLMS/Webinar

View on GitHub
src/Http/Requests/BaseWebinarRequest.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\EscolaLms\Webinar\Models\Webinar' in method 'getWebinar'.
Open

        return Webinar::findOrFail($this->route('webinar'));

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

Class extends undeclared class \Illuminate\Foundation\Http\FormRequest
Open

class BaseWebinarRequest extends FormRequest
Severity: Critical
Found in src/Http/Requests/BaseWebinarRequest.php by phan

Static call to undeclared method \EscolaLms\Webinar\Models\Webinar::findOrFail
Open

        return Webinar::findOrFail($this->route('webinar'));
Severity: Critical
Found in src/Http/Requests/BaseWebinarRequest.php by phan

Call to undeclared method \EscolaLms\Webinar\Http\Requests\BaseWebinarRequest::route
Open

        return Webinar::findOrFail($this->route('webinar'));
Severity: Critical
Found in src/Http/Requests/BaseWebinarRequest.php by phan

There are no issues that match your filters.

Category
Status