seatplus/eveapi

View on GitHub

Showing 37 of 138 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    protected $roles_array = [
        'Account_Take_1', 'Account_Take_2', 'Account_Take_3', 'Account_Take_4', 'Account_Take_5', 'Account_Take_6',
        'Account_Take_7', 'Accountant', 'Auditor', 'Communications_Officer', 'Config_Equipment', 'Config_Starbase_Equipment',
        'Container_Take_1', 'Container_Take_2', 'Container_Take_3', 'Container_Take_4', 'Container_Take_5', 'Container_Take_6',
        'Container_Take_7', 'Contract_Manager', 'Diplomat', 'Director', 'Factory_Manager', 'Fitting_Manager', 'Hangar_Query_1',
Severity: Major
Found in src/Models/Character/CharacterRole.php and 1 other location - About 3 hrs to fix
database/factories/CharacterRoleFactory.php on lines 36..45

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 151.

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

Further Reading

The class Asset has 14 public methods. Consider refactoring Asset to keep number of public methods under 10.
Open

class Asset extends Model
{
    use HasFactory;
    use HasWatchlist;

Severity: Minor
Found in src/Models/Assets/Asset.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

The class CharacterInfo has 18 public methods. Consider refactoring CharacterInfo to keep number of public methods under 10.
Open

class CharacterInfo extends Model
{
    use HasFactory;

    /**

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

File CheckJobsCommand.php has 277 lines of code (exceeds 250 allowed). Consider refactoring.
Confirmed

<?php

/*
 * MIT License
 *
Severity: Minor
Found in src/Commands/CheckJobsCommand.php - About 2 hrs to fix

    Avoid excessively long variable names like $find_corporation_refresh_token. Keep variable name length under 20.
    Open

            $find_corporation_refresh_token = new FindCorporationRefreshToken;

    LongVariable

    Since: 0.2

    Detects when a field, formal or local variable is declared with a long name.

    Example

    class Something {
        protected $reallyLongIntName = -3; // VIOLATION - Field
        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
            $otherReallyLongName = -5; // VIOLATION - Local
            for ($interestingIntIndex = 0; // VIOLATION - For
                 $interestingIntIndex < 10;
                 $interestingIntIndex++ ) {
            }
        }
    }

    Source https://phpmd.org/rules/naming.html#longvariable

    Avoid excessively long variable names like $unknown_constellation_ids. Keep variable name length under 20.
    Open

            $unknown_constellation_ids = System::whereDoesntHave('constellation')->pluck('constellation_id')->unique()->values();

    LongVariable

    Since: 0.2

    Detects when a field, formal or local variable is declared with a long name.

    Example

    class Something {
        protected $reallyLongIntName = -3; // VIOLATION - Field
        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
            $otherReallyLongName = -5; // VIOLATION - Local
            for ($interestingIntIndex = 0; // VIOLATION - For
                 $interestingIntIndex < 10;
                 $interestingIntIndex++ ) {
            }
        }
    }

    Source https://phpmd.org/rules/naming.html#longvariable

    Avoid excessively long class names like GetMissingLocationFromCorporationMemberTracking. Keep class name length under 40.
    Open

    class GetMissingLocationFromCorporationMemberTracking extends HydrateMaintenanceBase
    {
        public function handle()
        {
            if ($this->batch()->cancelled()) {

    LongClassName

    Since: 2.9

    Detects when classes or interfaces are declared with excessively long names.

    Example

    class ATooLongClassNameThatHintsAtADesignProblem {
    
    }
    
    interface ATooLongInterfaceNameThatHintsAtADesignProblem {
    
    }

    Source https://phpmd.org/rules/naming.html#longclassname

    Method handle has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function handle()
        {
            if ($this->batch()->cancelled()) {
                // Determine if the batch has been cancelled...
    
    
    Severity: Minor
    Found in src/Jobs/Hydrate/Maintenance/GetMissingLocationFromContracts.php - About 1 hr to fix

      Function handleException has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          private function handleException(RequestFailedException $exception)
          {
              // If error is in 4xx or 5xx range increase esi rate limit
              if (($exception->getOriginalException()->getCode() >= 400) && ($exception->getOriginalException()->getCode() <= 599)) {
                  $this->incrementEsiRateLimit();
      Severity: Minor
      Found in src/Services/Esi/RetrieveEsiData.php - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method persist has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Confirmed

          private function persist(Collection $contracts)
          {
              Contract::upsert(
                  $contracts->toArray(),
                  ['contract_id'],
      Severity: Minor
      Found in src/Jobs/Contracts/CharacterContractsJob.php - About 1 hr to fix

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

        <?php
        
        /*
         * MIT License
         *
        src/Jobs/Hydrate/Maintenance/GetMissingCategorys.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingConstellations.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingGroups.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingRegions.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromCharacterAssets.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkillQueue.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkills.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromWalletTransaction.php on lines 1..50

        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 98.

        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

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

        <?php
        
        /*
         * MIT License
         *
        Severity: Major
        Found in src/Jobs/Hydrate/Maintenance/GetMissingConstellations.php and 8 other locations - About 55 mins to fix
        src/Jobs/Hydrate/Maintenance/GetMissingCategorys.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingGroups.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingRegions.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromCharacterAssets.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromContractItem.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkillQueue.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkills.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromWalletTransaction.php on lines 1..50

        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 98.

        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

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

        <?php
        
        /*
         * MIT License
         *
        Severity: Major
        Found in src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkills.php and 8 other locations - About 55 mins to fix
        src/Jobs/Hydrate/Maintenance/GetMissingCategorys.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingConstellations.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingGroups.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingRegions.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromCharacterAssets.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromContractItem.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkillQueue.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromWalletTransaction.php on lines 1..50

        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 98.

        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

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

        <?php
        
        /*
         * MIT License
         *
        src/Jobs/Hydrate/Maintenance/GetMissingCategorys.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingConstellations.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingGroups.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingRegions.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromCharacterAssets.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromContractItem.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkillQueue.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkills.php on lines 1..51

        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 98.

        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

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

        <?php
        
        /*
         * MIT License
         *
        Severity: Major
        Found in src/Jobs/Hydrate/Maintenance/GetMissingRegions.php and 8 other locations - About 55 mins to fix
        src/Jobs/Hydrate/Maintenance/GetMissingCategorys.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingConstellations.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingGroups.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromCharacterAssets.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromContractItem.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkillQueue.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkills.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromWalletTransaction.php on lines 1..50

        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 98.

        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

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

        <?php
        
        /*
         * MIT License
         *
        Severity: Major
        Found in src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkillQueue.php and 8 other locations - About 55 mins to fix
        src/Jobs/Hydrate/Maintenance/GetMissingCategorys.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingConstellations.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingGroups.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingRegions.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromCharacterAssets.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromContractItem.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkills.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromWalletTransaction.php on lines 1..50

        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 98.

        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

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

        <?php
        
        /*
         * MIT License
         *
        src/Jobs/Hydrate/Maintenance/GetMissingCategorys.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingConstellations.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingGroups.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingRegions.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromContractItem.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkillQueue.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkills.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromWalletTransaction.php on lines 1..50

        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 98.

        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

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

        <?php
        
        /*
         * MIT License
         *
        Severity: Major
        Found in src/Jobs/Hydrate/Maintenance/GetMissingCategorys.php and 8 other locations - About 55 mins to fix
        src/Jobs/Hydrate/Maintenance/GetMissingConstellations.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingGroups.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingRegions.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromCharacterAssets.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromContractItem.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkillQueue.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkills.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromWalletTransaction.php on lines 1..50

        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 98.

        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

        Further Reading

        Similar blocks of code found in 9 locations. Consider refactoring.
        Open

        <?php
        
        /*
         * MIT License
         *
        Severity: Major
        Found in src/Jobs/Hydrate/Maintenance/GetMissingGroups.php and 8 other locations - About 55 mins to fix
        src/Jobs/Hydrate/Maintenance/GetMissingCategorys.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingConstellations.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingRegions.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromCharacterAssets.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromContractItem.php on lines 1..50
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkillQueue.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromSkills.php on lines 1..51
        src/Jobs/Hydrate/Maintenance/GetMissingTypesFromWalletTransaction.php on lines 1..50

        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 98.

        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

        Further Reading

        The class MaintenanceJob has a coupling between objects value of 21. Consider to reduce the number of dependencies under 13.
        Open

        class MaintenanceJob implements ShouldQueue
        {
            use Batchable;
            use Dispatchable;
            use InteractsWithQueue;
        Severity: Minor
        Found in src/Jobs/Seatplus/MaintenanceJob.php by phpmd

        CouplingBetweenObjects

        Since: 1.1.0

        A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

        Example

        class Foo {
            /**
             * @var \foo\bar\X
             */
            private $x = null;
        
            /**
             * @var \foo\bar\Y
             */
            private $y = null;
        
            /**
             * @var \foo\bar\Z
             */
            private $z = null;
        
            public function setFoo(\Foo $foo) {}
            public function setBar(\Bar $bar) {}
            public function setBaz(\Baz $baz) {}
        
            /**
             * @return \SplObjectStorage
             * @throws \OutOfRangeException
             * @throws \InvalidArgumentException
             * @throws \ErrorException
             */
            public function process(\Iterator $it) {}
        
            // ...
        }

        Source https://phpmd.org/rules/design.html#couplingbetweenobjects

        Severity
        Category
        Status
        Source
        Language