Method submitJobs
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function submitJobs(?RefreshToken $token = null)
{
// sort by whether it is a citadel or station
[$stations, $citadels] = collect($this->structures)
->keys()
Avoid using static access to class '\Seat\Eveapi\Models\Universe\UniverseStation' in method 'submitJobs'. Open
return UniverseStation::find($station_id) === null && ! $this->isCurrentlyProcessing($station_id); // stations don't need a character
- 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
Avoid using static access to class '\Seat\Eveapi\Models\Universe\UniverseStructure' in method 'submitJobs'. Open
UniverseStructure::find($citadel_id) === null // we don't already know it
- 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
Avoid using static access to class 'Seat\Eveapi\Jobs\Universe\Structures\CacheCitadelAccessCache' in method 'submitJobs'. Open
&& CacheCitadelAccessCache::canAccess($token->character_id, $citadel_id) // the character isn't banned
- 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();
}
}