Covivo/mobicoop

View on GitHub

Showing 1,612 of 1,620 total issues

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

    public function jsonSerialize()
    {
        return
        [
            'id' => $this->getId(),
Severity: Major
Found in client/src/MobicoopBundle/Journey/Entity/Journey.php and 1 other location - About 6 hrs to fix
client/src/MobicoopBundle/Geography/Entity/Address.php on lines 530..561

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

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 2 locations. Consider refactoring.
Open

                switch ($kycDocument['RefusedReasonType']) {
                    case PaymentProfile::OUT_OF_DATE:
                        $paymentProfile->setRefusalReason(PaymentProfile::OUT_OF_DATE);

                        break;
Severity: Major
Found in api/src/Payment/Service/PaymentManager.php and 1 other location - About 6 hrs to fix
api/src/DataProvider/Entity/MangoPayProvider.php on lines 903..953

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

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 2 locations. Consider refactoring.
Open

            switch ($data['RefusedReasonType']) {
                case self::OUT_OF_DATE:
                    $validationDocument->setStatus(ValidationDocument::OUT_OF_DATE);

                    break;
Severity: Major
Found in api/src/DataProvider/Entity/MangoPayProvider.php and 1 other location - About 6 hrs to fix
api/src/Payment/Service/PaymentManager.php on lines 1220..1270

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

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

EecInstance has 45 functions (exceeds 20 allowed). Consider refactoring.
Open

class EecInstance
{
    public const DEFAULT_ID = '999999999999';

    /**
Severity: Minor
Found in api/src/Incentive/Resource/EecInstance.php - About 6 hrs to fix

    Message has 45 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Message
    {
        public const TYPE_DIRECT = 'Direct';
        public const TYPE_CARPOOL = 'Carpool';
        public const TYPE_SOLIDARY = 'Solidary';
    Severity: Minor
    Found in api/src/Communication/Entity/Message.php - About 6 hrs to fix

      Journey has 45 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Journey
      {
          const DEFAULT_ID = "999999999999";
      
          const TYPE_PLANNED = "planned";
      Severity: Minor
      Found in api/src/RdexPlus/Resource/Journey.php - About 6 hrs to fix

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

        <?php
        
        /**
         * Copyright (c) 2020, MOBICOOP. All rights reserved.
         * This project is dual licensed under AGPL and proprietary licence.
        Severity: Major
        Found in api/src/Communication/Security/ContactVoter.php and 4 other locations - About 6 hrs to fix
        api/src/Gamification/Security/TestActionVoter.php on lines 1..76
        api/src/Solidary/Security/SolidaryTransportersScheduleVoter.php on lines 1..80
        api/src/User/Security/DriverLicenceNumberValidationVoter.php on lines 1..79
        api/src/User/Security/PhoneValidationVoter.php on lines 1..75

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

        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 5 locations. Consider refactoring.
        Open

        <?php
        
        /**
         * Copyright (c) 2021, MOBICOOP. All rights reserved.
         * This project is dual licensed under AGPL and proprietary licence.
        Severity: Major
        Found in api/src/Gamification/Security/TestActionVoter.php and 4 other locations - About 6 hrs to fix
        api/src/Communication/Security/ContactVoter.php on lines 1..78
        api/src/Solidary/Security/SolidaryTransportersScheduleVoter.php on lines 1..80
        api/src/User/Security/DriverLicenceNumberValidationVoter.php on lines 1..79
        api/src/User/Security/PhoneValidationVoter.php on lines 1..75

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

        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 5 locations. Consider refactoring.
        Open

        <?php
        
        /**
         * Copyright (c) 2023, MOBICOOP. All rights reserved.
         * This project is dual licensed under AGPL and proprietary licence.
        api/src/Communication/Security/ContactVoter.php on lines 1..78
        api/src/Gamification/Security/TestActionVoter.php on lines 1..76
        api/src/Solidary/Security/SolidaryTransportersScheduleVoter.php on lines 1..80
        api/src/User/Security/PhoneValidationVoter.php on lines 1..75

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

        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 5 locations. Consider refactoring.
        Open

        <?php
        
        /**
         * Copyright (c) 2020, MOBICOOP. All rights reserved.
         * This project is dual licensed under AGPL and proprietary licence.
        api/src/Communication/Security/ContactVoter.php on lines 1..78
        api/src/Gamification/Security/TestActionVoter.php on lines 1..76
        api/src/User/Security/DriverLicenceNumberValidationVoter.php on lines 1..79
        api/src/User/Security/PhoneValidationVoter.php on lines 1..75

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

        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 5 locations. Consider refactoring.
        Open

        <?php
        
        /**
         * Copyright (c) 2021, MOBICOOP. All rights reserved.
         * This project is dual licensed under AGPL and proprietary licence.
        Severity: Major
        Found in api/src/User/Security/PhoneValidationVoter.php and 4 other locations - About 6 hrs to fix
        api/src/Communication/Security/ContactVoter.php on lines 1..78
        api/src/Gamification/Security/TestActionVoter.php on lines 1..76
        api/src/Solidary/Security/SolidaryTransportersScheduleVoter.php on lines 1..80
        api/src/User/Security/DriverLicenceNumberValidationVoter.php on lines 1..79

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

        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 2 locations. Consider refactoring.
        Open

                            $asks[] = [
                                'id' => $ask->getId(),
                                'status' => $status,
                                'user' => [
                                    'id' => $ask->getUser()->getId(),
        Severity: Major
        Found in api/src/Carpool/Service/DynamicManager.php and 1 other location - About 6 hrs to fix
        api/src/Carpool/Service/DynamicManager.php on lines 602..623

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

        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 2 locations. Consider refactoring.
        Open

        <?php
        
        /**
         * Copyright (c) 2018, MOBICOOP. All rights reserved.
         * This project is dual licensed under AGPL and proprietary licence.
        api/src/PublicTransport/Entity/PTAccessibilityStatus.php on lines 1..157

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

        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 2 locations. Consider refactoring.
        Open

        <?php
        
        /**
         * Copyright (c) 2018, MOBICOOP. All rights reserved.
         * This project is dual licensed under AGPL and proprietary licence.
        Severity: Major
        Found in api/src/PublicTransport/Entity/PTAccessibilityStatus.php and 1 other location - About 6 hrs to fix
        client/src/MobicoopBundle/PublicTransport/Entity/PTAccessibilityStatus.php on lines 1..126

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

        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 2 locations. Consider refactoring.
        Open

                            $asks[] = [
                                'id' => $ask->getId(),
                                'status' => $status,
                                'user' => [
                                    'id' => $ask->getUserRelated()->getId(),
        Severity: Major
        Found in api/src/Carpool/Service/DynamicManager.php and 1 other location - About 6 hrs to fix
        api/src/Carpool/Service/DynamicManager.php on lines 531..552

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

        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 2 locations. Consider refactoring.
        Open

        <?php declare(strict_types=1);
        
        namespace DoctrineMigrations;
        
        use Doctrine\DBAL\Schema\Schema;
        Severity: Major
        Found in api/src/Migrations/Version20190514151932.php and 1 other location - About 6 hrs to fix
        api/src/Migrations/Version20190702123833.php on lines 1..39

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

        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 2 locations. Consider refactoring.
        Open

        <?php declare(strict_types=1);
        
        namespace DoctrineMigrations;
        
        use Doctrine\DBAL\Schema\Schema;
        Severity: Major
        Found in api/src/Migrations/Version20190702123833.php and 1 other location - About 6 hrs to fix
        api/src/Migrations/Version20190514151932.php on lines 1..39

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

        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 2 locations. Consider refactoring.
        Open

            public function changeSectionPosition(Section $section, string $direction): Section
            {
                switch ($direction) {
                    case self::DIRECTION_UP:
                        if ($previousSection = $this->sectionRepository->findPrevious($section)) {
        Severity: Major
        Found in api/src/Article/Service/ArticleManager.php and 1 other location - About 5 hrs to fix
        api/src/Article/Service/ArticleManager.php on lines 151..179

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

        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 2 locations. Consider refactoring.
        Open

            public function changeParagraphPosition(Paragraph $paragraph, string $direction): Paragraph
            {
                switch ($direction) {
                    case self::DIRECTION_UP:
                        if ($previousParagraph = $this->paragraphRepository->findPrevious($paragraph)) {
        Severity: Major
        Found in api/src/Article/Service/ArticleManager.php and 1 other location - About 5 hrs to fix
        api/src/Article/Service/ArticleManager.php on lines 113..141

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

        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 2 locations. Consider refactoring.
        Open

            public function checkIsBeneficiary(SolidaryUserStructure $solidaryUserStructure)
            {
                $isBeneficiary = false;
        
                foreach ($solidaryUserStructure->getSolidaryUser()->getSolidaryUserStructures() as $curSolidaryUserStructure) {
        api/src/Solidary/Admin/Service/SolidaryVolunteerManager.php on lines 155..178

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

        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

        Severity
        Category
        Status
        Source
        Language