EscolaLMS/Webinar

View on GitHub
database/factories/WebinarFactory.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\EscolaLms\Webinar\Enum\WebinarStatusEnum' in method 'definition'.
Open

            'status' => $this->faker->randomElement(WebinarStatusEnum::getValues()),
Severity: Minor
Found in database/factories/WebinarFactory.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

Class extends undeclared class \Illuminate\Database\Eloquent\Factories\Factory
Open

class WebinarFactory extends Factory
Severity: Critical
Found in database/factories/WebinarFactory.php by phan

Call to undeclared function \now()
Open

        $now = now();
Severity: Critical
Found in database/factories/WebinarFactory.php by phan

Possibly zero references to use statement for classlike/namespace UserRole (\EscolaLms\Core\Enums\UserRole)
Open

use EscolaLms\Core\Enums\UserRole;
Severity: Minor
Found in database/factories/WebinarFactory.php by phan

Reference to undeclared property \EscolaLms\Webinar\Database\Factories\WebinarFactory->faker
Open

            'description' => $this->faker->sentence,
Severity: Minor
Found in database/factories/WebinarFactory.php by phan

Reference to undeclared property \EscolaLms\Webinar\Database\Factories\WebinarFactory->faker
Open

            'yt_id' => $this->faker->word,
Severity: Minor
Found in database/factories/WebinarFactory.php by phan

Possibly zero references to use statement for classlike/namespace User (\EscolaLms\Auth\Models\User)
Open

use EscolaLms\Auth\Models\User;
Severity: Minor
Found in database/factories/WebinarFactory.php by phan

Reference to undeclared property \EscolaLms\Webinar\Database\Factories\WebinarFactory->faker
Open

            'status' => $this->faker->randomElement(WebinarStatusEnum::getValues()),
Severity: Minor
Found in database/factories/WebinarFactory.php by phan

Static call to undeclared method \EscolaLms\Webinar\Enum\WebinarStatusEnum::getValues
Open

            'status' => $this->faker->randomElement(WebinarStatusEnum::getValues()),
Severity: Critical
Found in database/factories/WebinarFactory.php by phan

Reference to undeclared property \EscolaLms\Webinar\Database\Factories\WebinarFactory->faker
Open

            'yt_url' => $this->faker->url,
Severity: Minor
Found in database/factories/WebinarFactory.php by phan

Reference to undeclared property \EscolaLms\Webinar\Database\Factories\WebinarFactory->faker
Open

            'name' => $this->faker->sentence(10),
Severity: Minor
Found in database/factories/WebinarFactory.php by phan

Reference to undeclared property \EscolaLms\Webinar\Database\Factories\WebinarFactory->faker
Open

            'yt_stream_url' => $this->faker->url,
Severity: Minor
Found in database/factories/WebinarFactory.php by phan

There are no issues that match your filters.

Category
Status