Showing 440 of 440 total issues
Method handle
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
parent::handle();
$structure_batch = new StructureBatch();
Method handle
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$this->existing_entity_ids = UniverseName::select('entity_id')
->distinct()
Method addAuthenticatedJobs
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addAuthenticatedJobs()
{
$this->addAuthenticatedJob(new Roles($this->token));
$this->addAuthenticatedJob(new Titles($this->token));
$this->addAuthenticatedJob(new Clones($this->token));
Method customValidationMessages
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function customValidationMessages()
{
return [
'0.integer' => self::INTEGER_VALIDATION_MESSAGE,
'0.between' => self::BETWEEN_VALIDATION_MESSAGE,
Method handle
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
parent::handle();
while (true) {
Method addAuthenticatedJobs
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addAuthenticatedJobs()
{
$this->addAuthenticatedJob(new Divisions($this->corporation_id, $this->token));
$this->addAuthenticatedJob(new Roles($this->corporation_id, $this->token));
Method handle
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
parent::handle();
$response = $this->retrieve([
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function getActivationFuelConsumptionAttribute()
{
$use = $this->items->sum(function ($item) {
return $item->type->dogma_attributes->where('attributeID', self::DGM_SERVICE_MODULE_ACTIVATION_FUEL_NEED)
->sum('valueFloat');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 107.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function getFuelConsumptionAttribute()
{
$use = $this->items->sum(function ($item) {
return $item->type->dogma_attributes->where('attributeID', self::DGM_SERVICE_MODULE_CYCLE_FUEL_NEED)
->sum('valueFloat');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 107.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
parent::handle();
CorporationWalletBalance::where('corporation_id', $this->getCorporationId())->get()
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
parent::handle();
$response = $this->retrieve([
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
parent::handle();
$start = now();
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$structure_batch = new StructureBatch();
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$structure_batch = new StructureBatch();
while (true) {
Method toEve
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function toEve()
{
return sprintf('[%s, %s]', $this->ship->typeName, $this->name) . PHP_EOL .
$this->low_slots->map(function ($slot) {
Method handle
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
parent::handle();
while (true) {
Method handle
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$threshold = $this->getBucketThreshold();
$bucket = Bucket::with('refresh_tokens', 'refresh_tokens.character')
->withCount('refresh_tokens')
Method handle
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
parent::handle();
// retrieve latest known journal entry for the active character.
Method handle
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
parent::handle();
$event_ids = CharacterCalendarEvent::where('character_id', $this->getCharacterId())
Method find_nearest_celestial
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function find_nearest_celestial(int $solar_system_id, float $x, float $y, float $z, ?int $group = null): array
{
// Querying mapDenormalized with [1] we can see
// the available different group types in the