wikimedia/mediawiki-extensions-Wikibase

View on GitHub

Showing 2,096 of 2,096 total issues

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

$specialPageAliases['nb'] = [
    'AvailableBadges' => [ 'Tilgjengelige_merker' ],
    'EntityData' => [ 'Entitetsdata' ],
    'EntityPage' => [ 'Entitetsside' ],
    'GoToLinkedPage' => [ 'Gå_til_lenket_side', 'Gå_til_lenka_side' ],
Severity: Major
Found in repo/Wikibase.i18n.alias.php and 1 other location - About 5 hrs to fix
repo/Wikibase.i18n.alias.php on lines 401..421

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

ResultBuilder has 42 functions (exceeds 20 allowed). Consider refactoring.
Open

class ResultBuilder {

    /**
     * @var ApiResult
     */
Severity: Minor
Found in repo/includes/Api/ResultBuilder.php - About 5 hrs to fix

    File jquery.wikibase.entitytermsforlanguagelistview.js has 401 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * @license GPL-2.0-or-later
     * @author H. Snater < mediawiki@snater.com >
     * @author Bene* < benestar.wikimedia@gmail.com >
     */

      File WikibaseClient.php has 400 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      namespace Wikibase\Client;
      
      use DataValues\Deserializers\DataValueDeserializer;
      Severity: Minor
      Found in client/includes/WikibaseClient.php - About 5 hrs to fix

        Function exports has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
        Open

        module.exports = ( function ( wb ) {
            'use strict';
        
            var ViewController = require( './ViewController.js' ),
                ENTITY_CHANGERS = wb.entityChangers;
        Severity: Minor
        Found in view/resources/wikibase/view/ToolbarViewController.js - About 5 hrs 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

        File PatchedItemValidator.php has 399 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php declare( strict_types=1 );
        
        namespace Wikibase\Repo\RestApi\Application\UseCases\PatchItem;
        
        use LogicException;

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\PatchItemLabels;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\PatchPropertyDescriptions;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\RemoveItemDescription;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\DescriptionLanguageCodeRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\PatchPropertyAliases;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\AddPropertyStatement;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\RemoveItemLabel;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types = 1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\PatchSitelinks;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\ReplaceStatement;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\PatchItem;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\RemovePropertyLabel;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\PatchItemDescriptions;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\PatchPropertyLabels;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\RemovePropertyDescription;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\DescriptionLanguageCodeRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchStatement/PatchStatementRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

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

          <?php declare( strict_types=1 );
          
          namespace Wikibase\Repo\RestApi\Application\UseCases\PatchStatement;
          
          use Wikibase\Repo\RestApi\Application\UseCaseRequestValidation\EditMetadataRequest;
          repo/rest-api/src/Application/UseCases/AddItemStatement/AddItemStatementRequest.php on lines 1..54
          repo/rest-api/src/Application/UseCases/AddPropertyStatement/AddPropertyStatementRequest.php on lines 1..55
          repo/rest-api/src/Application/UseCases/PatchItem/PatchItemRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemAliases/PatchItemAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemDescriptions/PatchItemDescriptionsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchItemLabels/PatchItemLabelsRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchProperty/PatchPropertyRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyAliases/PatchPropertyAliasesRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/PatchPropertyDescriptions/PatchPropertyDescriptionsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchPropertyLabels/PatchPropertyLabelsRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/PatchSitelinks/PatchSitelinksRequest.php on lines 1..61
          repo/rest-api/src/Application/UseCases/RemoveItemDescription/RemoveItemDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveItemLabel/RemoveItemLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyDescription/RemovePropertyDescriptionRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemovePropertyLabel/RemovePropertyLabelRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/RemoveSitelink/RemoveSitelinkRequest.php on lines 1..62
          repo/rest-api/src/Application/UseCases/ReplaceStatement/ReplaceStatementRequest.php on lines 1..62

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

          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