EscolaLMS/Consultations

View on GitHub
src/Models/ConsultationProposedTerm.php

Summary

Maintainability
A
0 mins
Test Coverage
F
50%

Avoid using static access to class '\EscolaLms\Consultations\Database\Factories\ConsultationProposedTermFactory' in method 'newFactory'.
Open

        return ConsultationProposedTermFactory::new();

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

Call to undeclared method \EscolaLms\Consultations\Models\ConsultationProposedTerm::belongsTo
Open

        return $this->belongsTo(Consultation::class, 'consultation_id');
Severity: Critical
Found in src/Models/ConsultationProposedTerm.php by phan

Class uses undeclared trait \Illuminate\Database\Eloquent\Factories\HasFactory
Open

class ConsultationProposedTerm extends Model
Severity: Critical
Found in src/Models/ConsultationProposedTerm.php by phan

Class extends undeclared class \Illuminate\Database\Eloquent\Model
Open

class ConsultationProposedTerm extends Model
Severity: Critical
Found in src/Models/ConsultationProposedTerm.php by phan

Static call to undeclared method \EscolaLms\Consultations\Database\Factories\ConsultationProposedTermFactory::new
Open

        return ConsultationProposedTermFactory::new();
Severity: Critical
Found in src/Models/ConsultationProposedTerm.php by phan

Return type of consultation() is undeclared type \Illuminate\Database\Eloquent\Relations\BelongsTo
Open

    public function consultation(): BelongsTo

There are no issues that match your filters.

Category
Status