aristath/kirki

View on GitHub

Showing 195 of 644 total issues

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

        case 'HexColorPicker':
            convertedValue = 'string' === typeof value && value.includes('#') ? value : colord(value).toHex();
            break;
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 23..28

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

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

    indexOf: function indexOf(searchElement /* , fromIndex */) {
      return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
    },
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2538..2540
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2548..2550
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2551..2553
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2560..2562
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2569..2571
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2590..2592

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

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

    every: function every(callbackfn /* , thisArg */) {
      return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
    },
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2548..2550
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2551..2553
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2557..2559
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2560..2562
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2569..2571
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2590..2592

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

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

    includes: function includes(searchElement /* , fromIndex */) {
      return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
    },
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2538..2540
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2548..2550
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2551..2553
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2557..2559
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2569..2571
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2590..2592

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

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

    findIndex: function findIndex(predicate /* , thisArg */) {
      return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
    },
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2538..2540
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2548..2550
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2557..2559
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2560..2562
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2569..2571
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2590..2592

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

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

    find: function find(predicate /* , thisArg */) {
      return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
    },
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2538..2540
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2551..2553
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2557..2559
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2560..2562
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2569..2571
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2590..2592

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

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

    map: function map(mapfn /* , thisArg */) {
      return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
    },
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2538..2540
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2548..2550
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2551..2553
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2557..2559
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2560..2562
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2590..2592

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

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

    some: function some(callbackfn /* , thisArg */) {
      return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
    },
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2538..2540
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2548..2550
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2551..2553
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2557..2559
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2560..2562
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 2569..2571

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

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

webfont.modules.Typekit = function(domHelper, configuration) {
  this.domHelper_ = domHelper;
  this.configuration_ = configuration;
};
packages/kirki-framework/module-webfonts/src/assets/scripts/vendor-typekit/src/modules/custom.js on lines 17..20

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

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

webfont.modules.Custom = function(domHelper, configuration) {
  this.domHelper_ = domHelper;
  this.configuration_ = configuration;
};
packages/kirki-framework/module-webfonts/src/assets/scripts/vendor-typekit/src/modules/typekit.js on lines 9..12

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

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

    case "RgbStringColorPicker":
      convertedValue =
        "string" === typeof value && value.includes("rgba")
          ? value
          : colord(value).toRgbString();
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 32..37
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 82..87
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 30..35
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 96..101
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 103..108

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

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

    case "HslStringColorPicker":
      convertedValue =
        "string" === typeof value && value.includes("hsl(")
          ? value
          : colord(value).toHslString();
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 32..37
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 82..87
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 30..35
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 37..42
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 96..101

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

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

        case 'HslStringColorPicker':
            convertedValue =
        "string" === typeof value && value.includes("hsl(")
          ? value
          : colord(value).toHslString();
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 32..37
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 30..35
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 37..42
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 96..101
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 103..108

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

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

},{"100":100,"128":128,"40":40,"48":48,"60":60,"64":64,"65":65,"81":81,"94":94}],62:[function(_dereq_,module,exports){
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 718..718
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 3344..3344
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 6005..6005

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

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

        case 'RgbStringColorPicker':
            convertedValue =
        "string" === typeof value && value.includes("rgb(")
          ? value
          : colord(value).toRgbString();
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 82..87
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 30..35
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 37..42
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 96..101
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 103..108

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

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

    case "HslColorPicker":
      convertedValue =
        "string" === typeof value && value.includes("hsl(")
          ? value
          : colord(value).toHslString();
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 32..37
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 82..87
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 30..35
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 37..42
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 103..108

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

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

    case "RgbColorPicker":
      convertedValue =
        "string" === typeof value && value.includes("rgb(")
          ? value
          : colord(value).toRgbString();
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 32..37
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForCustomizer.js on lines 82..87
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 37..42
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 96..101
packages/kirki-framework/control-react-colorful/src/js/utils/convertColorForInput.js on lines 103..108

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

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

},{"125":125,"15":15,"16":16,"20":20,"45":45,"47":47,"57":57,"70":70,"93":93}],29:[function(_dereq_,module,exports){
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 1343..1343
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 3344..3344
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 6005..6005

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

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

},{"117":117,"118":118,"129":129,"31":31,"32":32,"40":40,"54":54,"59":59,"62":62}],138:[function(_dereq_,module,exports){
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 718..718
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 1343..1343
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 6005..6005

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

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

},{"125":125,"20":20,"28":28,"29":29,"42":42,"57":57,"70":70,"73":73,"94":94}],267:[function(_dereq_,module,exports){
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 718..718
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 1343..1343
packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js on lines 3344..3344

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

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