app/Listeners/SendSnapshotChangeAlert.php
Avoid using static access to class '\Illuminate\Support\Facades\App' in method 'handle'. Open
Open
App::setLocale($locale);
- Read upRead up
- Exclude checks
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
Open
logger()->debug("Snapshot Status Changed from:{$event->snapshot->last_status} to:{$event->snapshot->status} hash:{$event->snapshot->hash} issues:{$event->issues->count()}");
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
Open
if($event->snapshot->board->alert_to !== null)
- Exclude checks
Expected 1 space after closing parenthesis; found 9 Open
Open
if($event->snapshot->board->alert_to !== null)
- Exclude checks