exiguus/js.device.detector

View on GitHub
src/js/jquery.device.detector.js

Summary

Maintainability
A
0 mins
Test Coverage

File jquery.device.detector.js has 833 lines of code (exceeds 250 allowed). Consider refactoring.
Invalid

/**
 * @fileOverview device detector
  jQuery Plugin to get Device and Browser informations
 * @author Simon Gattner <npm@0x38.de>
 * @license MIT
Severity: Major
Found in src/js/jquery.device.detector.js - About 2 days to fix

    Function getInfo has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Invalid

      $.fn.deviceDetector.getInfo = function() {
        return {
          'browserVersion': this.getBrowserVersion(),
          'browserName': this.getBrowserName(),
          'browserId': this.getBrowserId(),
    Severity: Minor
    Found in src/js/jquery.device.detector.js - About 1 hr to fix

      Function getOsVersion has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Invalid

        function getOsVersion() {
          var version = { // eslint-disable-line no-var
            'string': '0.0.0',
            'categories': {
              'major': 0,
      Severity: Minor
      Found in src/js/jquery.device.detector.js - About 1 hr to fix

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

          function getOsName(returnId) {
            var name = 'unknown'; // eslint-disable-line no-var
            $.each(config.oss.names, function(key, value) {
              var isOs = isDeviceType( // eslint-disable-line no-var
                value.pattern.include,
        Severity: Major
        Found in src/js/jquery.device.detector.js and 1 other location - About 4 hrs to fix
        src/js/jquery.device.detector.js on lines 593..606

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

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

          function getBrowserName(returnId) {
            var name = 'unknown'; // eslint-disable-line no-var
            $.each(config.browsers.names, function(key, value) {
              var isBrowser = isDeviceType( // eslint-disable-line no-var
                value.pattern.include,
        Severity: Major
        Found in src/js/jquery.device.detector.js and 1 other location - About 4 hrs to fix
        src/js/jquery.device.detector.js on lines 665..678

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

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

            return isDeviceType(
              config.vendors.apple.ios.pattern.include,
              config.vendors.apple.ios.pattern.exclude
            ) ||
            isDeviceType(
        Severity: Major
        Found in src/js/jquery.device.detector.js and 1 other location - About 3 hrs to fix
        src/js/jquery.device.detector.js on lines 63..74

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

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

            return isDeviceType(
              config.vendors.apple.macos.pattern.include,
              config.vendors.apple.macos.pattern.exclude
            ) ||
            isDeviceType(
        Severity: Major
        Found in src/js/jquery.device.detector.js and 1 other location - About 3 hrs to fix
        src/js/jquery.device.detector.js on lines 34..45

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 96.

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

          $.fn.deviceDetector.isIos = function() {
            return isDeviceType(
              config.vendors.apple.ios.pattern.include,
              config.vendors.apple.ios.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isFirefox = function() {
            return isDeviceType(
              config.vendors.mozilla.firefox.pattern.include,
              config.vendors.mozilla.firefox.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isChrome = function() {
            return isDeviceType(
              config.vendors.google.chrome.pattern.include,
              config.vendors.google.chrome.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isMsie = function() {
            return isDeviceType(
              config.vendors.microsoft.msie.pattern.include,
              config.vendors.microsoft.msie.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isAndroid = function() {
            return isDeviceType(
              config.vendors.google.android.pattern.include,
              config.vendors.google.android.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isIe = function() {
            return isDeviceType(
              config.vendors.microsoft.ie.pattern.include,
              config.vendors.microsoft.ie.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isWindows = function() {
            return isDeviceType(
              config.vendors.microsoft.windows.pattern.include,
              config.vendors.microsoft.windows.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isWindowsPhone = function() {
            return isDeviceType(
              config.vendors.microsoft.windowsPhone.pattern.include,
              config.vendors.microsoft.windowsPhone.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isIphone = function() {
            return isDeviceType(
              config.vendors.apple.iphone.pattern.include,
              config.vendors.apple.iphone.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isEdge = function() {
            return isDeviceType(
              config.vendors.microsoft.edge.pattern.include,
              config.vendors.microsoft.edge.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isOperaMini = function() {
            return isDeviceType(
              config.vendors.opera.operaMini.pattern.include,
              config.vendors.opera.operaMini.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isBlackberry = function() {
            return isDeviceType(
              config.vendors.blackberry.blackberry.pattern.include,
              config.vendors.blackberry.blackberry.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isLinux = function() {
            return isDeviceType(
              config.vendors.lbu.linux.pattern.include,
              config.vendors.lbu.linux.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isBsd = function() {
            return isDeviceType(
              config.vendors.lbu.bsd.pattern.include,
              config.vendors.lbu.bsd.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309

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

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

          $.fn.deviceDetector.isIpad = function() {
            return isDeviceType(
              config.vendors.apple.ipad.pattern.include,
              config.vendors.apple.ipad.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isIeMobile = function() {
            return isDeviceType(
              config.vendors.microsoft.ieMobile.pattern.include,
              config.vendors.microsoft.ieMobile.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isSafari = function() {
            return isDeviceType(
              config.vendors.apple.safari.pattern.include,
              config.vendors.apple.safari.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isOpera = function() {
            return isDeviceType(
              config.vendors.opera.opera.pattern.include,
              config.vendors.opera.opera.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 135..140
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

          $.fn.deviceDetector.isMacos = function() {
            return isDeviceType(
              config.vendors.apple.macos.pattern.include,
              config.vendors.apple.macos.pattern.exclude
            );
        Severity: Major
        Found in src/js/jquery.device.detector.js and 18 other locations - About 2 hrs to fix
        src/js/jquery.device.detector.js on lines 83..88
        src/js/jquery.device.detector.js on lines 96..101
        src/js/jquery.device.detector.js on lines 109..114
        src/js/jquery.device.detector.js on lines 122..127
        src/js/jquery.device.detector.js on lines 148..153
        src/js/jquery.device.detector.js on lines 161..166
        src/js/jquery.device.detector.js on lines 174..179
        src/js/jquery.device.detector.js on lines 187..192
        src/js/jquery.device.detector.js on lines 200..205
        src/js/jquery.device.detector.js on lines 213..218
        src/js/jquery.device.detector.js on lines 226..231
        src/js/jquery.device.detector.js on lines 239..244
        src/js/jquery.device.detector.js on lines 252..257
        src/js/jquery.device.detector.js on lines 265..270
        src/js/jquery.device.detector.js on lines 278..283
        src/js/jquery.device.detector.js on lines 291..296
        src/js/jquery.device.detector.js on lines 304..309
        src/js/jquery.device.detector.js on lines 317..322

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

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

                  'windowsVista': {
                    'index': config.vendors.microsoft.windowsVista.pattern.include,
                    'map': 11,
                    'cut': /;|\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1167..1172
        src/js/jquery.device.detector.js on lines 1173..1178

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

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

                  'windows81': {
                    'index': config.vendors.microsoft.windows81.pattern.include,
                    'map': 11,
                    'cut': /;|\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1167..1172
        src/js/jquery.device.detector.js on lines 1173..1178

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

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

                  'blackberry': {
                    'index': config.vendors.blackberry.blackberry.pattern.include,
                    'map': 10,
                    'cut': /;|\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1167..1172

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

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

                  'windows10': {
                    'index': config.vendors.microsoft.windows10.pattern.include,
                    'map': 11,
                    'cut': /;|\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1167..1172
        src/js/jquery.device.detector.js on lines 1173..1178

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

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

                  'android': {
                    'index': config.vendors.google.android.pattern.include,
                    'map': 8,
                    'cut': /;|\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1167..1172
        src/js/jquery.device.detector.js on lines 1173..1178

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

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

                  'windows7': {
                    'index': config.vendors.microsoft.windows7.pattern.include,
                    'map': 11,
                    'cut': /;|\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1167..1172
        src/js/jquery.device.detector.js on lines 1173..1178

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

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

                  'windows8': {
                    'index': config.vendors.microsoft.windows8.pattern.include,
                    'map': 11,
                    'cut': /;|\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1167..1172
        src/js/jquery.device.detector.js on lines 1173..1178

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

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

                  'windowsPhone': {
                    'index': config.vendors.microsoft.windowsPhone.pattern.include,
                    'map': 14,
                    'cut': /;|\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1167..1172
        src/js/jquery.device.detector.js on lines 1173..1178

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

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

                  'bsd': {
                    'index': config.vendors.lbu.bsd.pattern.include,
                    'map': 5,
                    'cut': / |\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1167..1172
        src/js/jquery.device.detector.js on lines 1173..1178

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

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

                  'linux': {
                    'index': config.vendors.lbu.linux.pattern.include,
                    'map': 5,
                    'cut': /;| |\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1095..1100
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1173..1178

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

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

                  'windowsXp': {
                    'index': config.vendors.microsoft.windowsXp.pattern.include,
                    'map': 11,
                    'cut': /;|\)/,
                    'chop': '.',
        Severity: Major
        Found in src/js/jquery.device.detector.js and 10 other locations - About 35 mins to fix
        src/js/jquery.device.detector.js on lines 1089..1094
        src/js/jquery.device.detector.js on lines 1101..1106
        src/js/jquery.device.detector.js on lines 1107..1112
        src/js/jquery.device.detector.js on lines 1113..1118
        src/js/jquery.device.detector.js on lines 1119..1124
        src/js/jquery.device.detector.js on lines 1125..1130
        src/js/jquery.device.detector.js on lines 1131..1136
        src/js/jquery.device.detector.js on lines 1161..1166
        src/js/jquery.device.detector.js on lines 1167..1172
        src/js/jquery.device.detector.js on lines 1173..1178

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

        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

        There are no issues that match your filters.

        Category
        Status