Method enqueueDetailedCorporationContractsJobs
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function enqueueDetailedCorporationContractsJobs(array $contract_ids)
{
CorporationContract::whereIn('contract_id', $contract_ids)
->whereHas('detail', function ($query) {
$query->where('status', '<>', 'deleted');
Avoid using static access to class '\Seat\Eveapi\Jobs\Contracts\Character\Contracts' in method 'enqueueContractsListJobs'. Open
CharacterContracts::dispatch($token);
- 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\Contracts\Character\Bids' in method 'enqueueDetailedCharacterContractsJobs'. Open
CharacterBids::dispatch($token, $contract->contract_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\Jobs\Contracts\Character\Items' in method 'enqueueDetailedCharacterContractsJobs'. Open
CharacterItems::dispatch($token, $contract->contract_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 'enqueueContractsListJobs'. Open
RefreshToken::chunk(100, function ($tokens) {
foreach ($tokens as $token) {
CharacterContracts::dispatch($token);
}
});
- 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 'enqueueDetailedCharacterContractsJobs'. Open
$token = RefreshToken::find($contract->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\Jobs\Contracts\Corporation\Bids' in method 'enqueueDetailedCorporationContractsJobs'. Open
CorporationBids::dispatch($contract->corporation_id, $token, $contract->contract_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\Jobs\Contracts\Corporation\Contracts' in method 'enqueueContractsListJobs'. Open
CorporationContracts::dispatch($token->character->affiliation->corporation_id, $token);
- 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\Contracts\Corporation\Items' in method 'enqueueDetailedCorporationContractsJobs'. Open
CorporationItems::dispatch($contract->corporation_id, $token, $contract->contract_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();
}
}