condorrocks/condor

View on GitHub
app/Listeners/SendSnapshotChangeAlert.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\Illuminate\Support\Facades\App' in method 'handle'.
Open

        App::setLocale($locale);

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

Line exceeds 120 characters; contains 181 characters
Open

        logger()->debug("Snapshot Status Changed from:{$event->snapshot->last_status} to:{$event->snapshot->status} hash:{$event->snapshot->hash} issues:{$event->issues->count()}");

Expected 1 space after IF keyword; 0 found
Open

        if($event->snapshot->board->alert_to !== null)

Expected 1 space after closing parenthesis; found 9
Open

        if($event->snapshot->board->alert_to !== null)

There are no issues that match your filters.

Category
Status