EscolaLMS/Courses-Import-Export

View on GitHub
src/Jobs/CloneCourse.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid using static access to class '\EscolaLms\CoursesImportExport\Events\CloneCourseStartedEvent' in method 'handle'.
Open

        CloneCourseStartedEvent::dispatch($this->user, $this->course);
Severity: Minor
Found in src/Jobs/CloneCourse.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 'handle'.
Open

        Log::info('Course cloning started');
Severity: Minor
Found in src/Jobs/CloneCourse.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 'handle'.
Open

            Log::info('Course cloning finished');
Severity: Minor
Found in src/Jobs/CloneCourse.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 '\EscolaLms\CoursesImportExport\Events\CloneCourseFailedEvent' in method 'handle'.
Open

            CloneCourseFailedEvent::dispatch($this->user, $this->course);
Severity: Minor
Found in src/Jobs/CloneCourse.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 'handle'.
Open

            Log::error('[' . self::class . '] ' . $exception->getMessage());
Severity: Minor
Found in src/Jobs/CloneCourse.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 '\EscolaLms\CoursesImportExport\Events\CloneCourseFinishedEvent' in method 'handle'.
Open

            CloneCourseFinishedEvent::dispatch($this->user, $course);
Severity: Minor
Found in src/Jobs/CloneCourse.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

Blank line found at end of control structure
Open


Severity: Minor
Found in src/Jobs/CloneCourse.php by phpcodesniffer

There are no issues that match your filters.

Category
Status