open-orchestra/open-orchestra-cms-bundle

View on GitHub

Showing 14,363 of 14,363 total issues

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

<?php

namespace OpenOrchestra\Backoffice\Reference\Strategies;

use OpenOrchestra\ModelInterface\Model\ContentInterface;
Backoffice/Reference/Strategies/KeywordInNodeReferenceStrategy.php on lines 1..56

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

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 testGetSiteContributionLanguage($expectedLocale, $userLocale, $userClass)
    {

        Phake::when($this->session)->get(Phake::anyParameters())->thenReturn(array('siteId' => 'fakeId', 'name' => 'fakeName', 'defaultLanguage' => 'en', 'languages' => array('en')));

Severity: Major
Found in Backoffice/Tests/Context/ContextBackOfficeManagerTest.php and 1 other location - About 4 hrs to fix
Backoffice/Tests/Context/ContextManagerTest.php on lines 339..351

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

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 testGetUserCurrentSiteDefaultLanguage($expectedLocale, $userLocale, $userClass)
    {

        Phake::when($this->session)->get(Phake::anyParameters())->thenReturn(array('siteId' => 'fakeId', 'name' => 'fakeName', 'defaultLanguage' => 'en', 'languages' => array('en')));

Severity: Major
Found in Backoffice/Tests/Context/ContextManagerTest.php and 1 other location - About 4 hrs to fix
Backoffice/Tests/Context/ContextBackOfficeManagerTest.php on lines 332..344

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

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

Method addYoutubeForm has 115 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function addYoutubeForm(FormBuilderInterface $builder)
    {

        $builder
            ->add('youtubeVideoId', 'oo_video', array(
Severity: Major
Found in Backoffice/GenerateForm/Strategies/VideoStrategy.php - About 4 hrs to fix

Method addDailyMotionForm has 112 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function addDailyMotionForm($builder)
    {
        $builder
            ->add('dailymotionVideoId', 'oo_video', array(
                'label' => 'open_orchestra_backoffice.block.video.dailymotion.video_id',
Severity: Major
Found in Backoffice/GenerateForm/Strategies/VideoStrategy.php - About 4 hrs to fix

Function reverseTransform has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
Open

    public function reverseTransform($value)
    {
        $result = new ArrayCollection();
        if (is_array($value)) {
            foreach ($value as $type => $perimeters) {
Severity: Minor
Found in GroupBundle/Form/DataTransformer/GroupPerimeterTransformer.php - About 4 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

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

<?php

namespace OpenOrchestra\LogBundle\EventSubscriber;

use OpenOrchestra\ModelInterface\Event\RedirectionEvent;
Severity: Major
Found in LogBundle/EventSubscriber/LogRedirectionSubscriber.php and 1 other location - About 4 hrs to fix
LogBundle/EventSubscriber/LogSiteSubscriber.php on lines 1..61

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

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

namespace OpenOrchestra\LogBundle\EventSubscriber;

use OpenOrchestra\ModelInterface\Event\SiteEvent;
Severity: Major
Found in LogBundle/EventSubscriber/LogSiteSubscriber.php and 1 other location - About 4 hrs to fix
LogBundle/EventSubscriber/LogRedirectionSubscriber.php on lines 1..61

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

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

Method provideOptions has 105 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function provideOptions()
    {
        return array(
            array(false, array(), array(), array(), array(), array()),
            array(true, array(), array(), array(), array(), array()),
Severity: Major
Found in Backoffice/Tests/Form/Type/Extension/FormTypeGroupExtensionTest.php - About 4 hrs to fix

Method addVimeoForm has 103 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function addVimeoForm($builder)
    {
        $builder
            ->add('vimeoVideoId', 'oo_video', array(
                'label' => 'open_orchestra_backoffice.block.video.vimeo.video_id',
Severity: Major
Found in Backoffice/GenerateForm/Strategies/VideoStrategy.php - About 4 hrs to fix

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

<?php

namespace OpenOrchestra\Backoffice\Tests\Perimeter\Strategy;

use OpenOrchestra\Backoffice\Perimeter\Strategy\ContentTypePerimeterStrategy;
Backoffice/Tests/Perimeter/Strategy/NodePerimeterStrategyTest.php on lines 1..37

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

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

namespace OpenOrchestra\Backoffice\Tests\Perimeter\Strategy;

use OpenOrchestra\ModelInterface\Model\NodeInterface;
Backoffice/Tests/Perimeter/Strategy/ContentTypePerimeterStrategyTest.php on lines 1..37

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

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

namespace OpenOrchestra\LogBundle\EventSubscriber;

use FOS\UserBundle\Model\GroupInterface;
Severity: Major
Found in LogBundle/EventSubscriber/LogGroupSubscriber.php and 1 other location - About 3 hrs to fix
LogBundle/EventSubscriber/LogStatusSubscriber.php on lines 1..58

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

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

namespace OpenOrchestra\LogBundle\EventSubscriber;

use OpenOrchestra\ModelInterface\Event\StatusEvent;
Severity: Major
Found in LogBundle/EventSubscriber/LogStatusSubscriber.php and 1 other location - About 3 hrs to fix
LogBundle/EventSubscriber/LogGroupSubscriber.php on lines 1..58

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

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 testBuilder()
    {
        $builder = Phake::mock('Symfony\Component\Form\FormBuilder');
        Phake::when($builder)->add(Phake::anyParameters())->thenReturn($builder);
        Phake::when($builder)->addEventSubscriber(Phake::anyParameters())->thenReturn($builder);
Severity: Major
Found in Backoffice/Tests/Form/Type/ContentTypeTest.php and 1 other location - About 3 hrs to fix
Backoffice/Tests/Form/Type/ContentTypeTest.php on lines 71..84

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

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 testBuilderNoStatusable()
    {
        $builder = Phake::mock('Symfony\Component\Form\FormBuilder');
        Phake::when($builder)->add(Phake::anyParameters())->thenReturn($builder);
        Phake::when($builder)->addEventSubscriber(Phake::anyParameters())->thenReturn($builder);
Severity: Major
Found in Backoffice/Tests/Form/Type/ContentTypeTest.php and 1 other location - About 3 hrs to fix
Backoffice/Tests/Form/Type/ContentTypeTest.php on lines 53..66

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

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

<?php

namespace OpenOrchestra\ApiBundle\Transformer;

use Doctrine\Common\Collections\Collection;
Severity: Major
Found in ApiBundle/Transformer/NodeCollectionTransformer.php and 7 other locations - About 3 hrs to fix
ApiBundle/Transformer/ContentCollectionTransformer.php on lines 1..58
ApiBundle/Transformer/ContentTypeCollectionTransformer.php on lines 1..60
ApiBundle/Transformer/KeywordCollectionTransformer.php on lines 1..58
ApiBundle/Transformer/RedirectionCollectionTransformer.php on lines 1..59
ApiBundle/Transformer/TrashItemCollectionTransformer.php on lines 1..58
UserAdminBundle/Transformer/UserCollectionTransformer.php on lines 1..59
WorkflowAdminBundle/Transformer/WorkflowProfileCollectionTransformer.php on lines 1..60

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

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

<?php

namespace OpenOrchestra\ApiBundle\Transformer;

use Doctrine\Common\Collections\Collection;
Severity: Major
Found in ApiBundle/Transformer/ContentTypeCollectionTransformer.php and 7 other locations - About 3 hrs to fix
ApiBundle/Transformer/ContentCollectionTransformer.php on lines 1..58
ApiBundle/Transformer/KeywordCollectionTransformer.php on lines 1..58
ApiBundle/Transformer/NodeCollectionTransformer.php on lines 1..62
ApiBundle/Transformer/RedirectionCollectionTransformer.php on lines 1..59
ApiBundle/Transformer/TrashItemCollectionTransformer.php on lines 1..58
UserAdminBundle/Transformer/UserCollectionTransformer.php on lines 1..59
WorkflowAdminBundle/Transformer/WorkflowProfileCollectionTransformer.php on lines 1..60

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

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

<?php

namespace OpenOrchestra\ApiBundle\Transformer;

use Doctrine\Common\Collections\Collection;
Severity: Major
Found in ApiBundle/Transformer/TrashItemCollectionTransformer.php and 7 other locations - About 3 hrs to fix
ApiBundle/Transformer/ContentCollectionTransformer.php on lines 1..58
ApiBundle/Transformer/ContentTypeCollectionTransformer.php on lines 1..60
ApiBundle/Transformer/KeywordCollectionTransformer.php on lines 1..58
ApiBundle/Transformer/NodeCollectionTransformer.php on lines 1..62
ApiBundle/Transformer/RedirectionCollectionTransformer.php on lines 1..59
UserAdminBundle/Transformer/UserCollectionTransformer.php on lines 1..59
WorkflowAdminBundle/Transformer/WorkflowProfileCollectionTransformer.php on lines 1..60

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

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

<?php

namespace OpenOrchestra\ApiBundle\Transformer;

use Doctrine\Common\Collections\Collection;
Severity: Major
Found in ApiBundle/Transformer/RedirectionCollectionTransformer.php and 7 other locations - About 3 hrs to fix
ApiBundle/Transformer/ContentCollectionTransformer.php on lines 1..58
ApiBundle/Transformer/ContentTypeCollectionTransformer.php on lines 1..60
ApiBundle/Transformer/KeywordCollectionTransformer.php on lines 1..58
ApiBundle/Transformer/NodeCollectionTransformer.php on lines 1..62
ApiBundle/Transformer/TrashItemCollectionTransformer.php on lines 1..58
UserAdminBundle/Transformer/UserCollectionTransformer.php on lines 1..59
WorkflowAdminBundle/Transformer/WorkflowProfileCollectionTransformer.php on lines 1..60

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

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