src/database/seeders/ScheduleSeeder.php
Method getSchedules
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSchedules(): array
{
$schedules = [
[ // ESI Status | Every Minute
'command' => 'esi:update:status',
The method getSchedules() has 120 lines of code. Current threshold is set to 100. Avoid really long methods. Open
Open
public function getSchedules(): array
{
$schedules = [
[ // ESI Status | Every Minute
'command' => 'esi:update:status',
- Exclude checks
Avoid using static access to class '\Illuminate\Support\Arr' in method 'seedRandomize'. Open
Open
$schedules[$key]['expression'] = sprintf('%d %d * * *', rand(0, 59), Arr::random($hours));
- 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();
}
}