Method handle
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
// collect optional kills ID from arguments
$killmail_ids = $this->argument('killmail_ids') ?: [];
Avoid using static access to class '\Seat\Eveapi\Models\Character\CharacterInfo' in method 'handle'. Open
$character = CharacterInfo::firstOrNew(
['character_id' => $token->character_id],
['name' => "Unknown Character : {$token->character_id}"]
);
- 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\Killmails\Killmail' in method 'handle'. Open
$killmails = Killmail::whereDoesntHave('detail');
- 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\Corporation\CorporationInfo' in method 'handle'. Open
$corporation = CorporationInfo::firstOrNew(
['corporation_id' => $token->character->affiliation->corporation_id],
['name' => "Unknown Corporation : {$token->character->affiliation->corporation_id}"]
);
- 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\RefreshToken' in method 'handle'. Open
RefreshToken::chunk(100, function ($tokens) {
$tokens->each(function ($token) {
$character = CharacterInfo::firstOrNew(
['character_id' => $token->character_id],
['name' => "Unknown Character : {$token->character_id}"]
- 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();
}
}