sahat/satellizer

View on GitHub
examples/ionic/www/lib/satellizer/satellizer.js

Summary

Maintainability
F
1 wk
Test Coverage

File satellizer.js has 802 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Satellizer 0.14.1
 * (c) 2016 Sahat Yalkabov
 * License: MIT
 */
Severity: Major
Found in examples/ionic/www/lib/satellizer/satellizer.js - About 1 day to fix

    Function $get has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function($q, shared, local, oauth) {
              var $auth = {};
    
              $auth.login = function(user, opts) {
                return local.login(user, opts);
    Severity: Minor
    Found in examples/ionic/www/lib/satellizer/satellizer.js - About 1 hr to fix

      Function pollPopup has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              Popup.pollPopup = function(redirectUri) {
                var deferred = $q.defer();
      
                var redirectUriParser = document.createElement('a');
                redirectUriParser.href = redirectUri;
      Severity: Minor
      Found in examples/ionic/www/lib/satellizer/satellizer.js - About 1 hr to fix

        Function open has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                  Oauth2.open = function(options, userData) {
                    defaults = utils.merge(options, defaults);
                    var defer = $q.defer();
        
                    $timeout(function () {
        Severity: Minor
        Found in examples/ionic/www/lib/satellizer/satellizer.js - About 1 hr to fix

          Function polling has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                    var polling = $interval(function() {
                      if (!Popup.popupWindow || Popup.popupWindow.closed || Popup.popupWindow.closed === undefined) {
                        deferred.reject('The popup window was closed.');
                        $interval.cancel(polling);
                      }
          Severity: Minor
          Found in examples/ionic/www/lib/satellizer/satellizer.js - About 1 hr to fix

            Avoid too many return statements within this function.
            Open

                      return false;
            Severity: Major
            Found in examples/ionic/www/lib/satellizer/satellizer.js - About 30 mins to fix

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

                      angular.forEach((keyValue || '').split('&'), function(keyValue) {
                        if (keyValue) {
                          value = keyValue.split('=');
                          key = decodeURIComponent(value[0]);
                          obj[key] = angular.isDefined(value[1]) ? decodeURIComponent(value[1]) : true;
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 3 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 339..345

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

              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

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

                    this.joinUrl = function(baseUrl, url) {
                      if (/^(?:[a-z]+:)?\/\//i.test(url)) {
                        return url;
                      }
              
              
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 3 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 315..328

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

              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

                    this.getFullUrlPath = function(location) {
                      var isHttps = location.protocol === 'https:';
                      return location.protocol + '//' + location.hostname +
                        ':' + (location.port || (isHttps ? '443' : '80')) +
                        (/^\//.test(location.pathname) ? location.pathname : '/' + location.pathname);
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 329..334

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

              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

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

                      facebook: {
                        name: 'facebook',
                        url: '/auth/facebook',
                        authorizationEndpoint: 'https://www.facebook.com/v2.5/dialog/oauth',
                        redirectUri: window.location.origin + '/',
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 27..38

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

              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

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

                      live: {
                        name: 'live',
                        url: '/auth/live',
                        authorizationEndpoint: 'https://login.live.com/oauth20_authorize.srf',
                        redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 107..118

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

              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

                      twitch: {
                        name: 'twitch',
                        url: '/auth/twitch',
                        authorizationEndpoint: 'https://api.twitch.tv/kraken/oauth2/authorize',
                        redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 3 other locations - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 75..86
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 95..106
              examples/ionic/www/lib/satellizer/satellizer.js on lines 85..96

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

              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

                      linkedin: {
                        name: 'linkedin',
                        url: '/auth/linkedin',
                        authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization',
                        redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 3 other locations - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 75..86
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 95..106
              examples/ionic/www/lib/satellizer/satellizer.js on lines 105..116

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

              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

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

                      bitbucket: {
                        name: 'bitbucket',
                        url: '/auth/bitbucket',
                        authorizationEndpoint: 'https://bitbucket.org/site/oauth2/authorize',
                        redirectUri: window.location.origin + '/',
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 129..139

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

              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

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

                      github: {
                        name: 'github',
                        url: '/auth/github',
                        authorizationEndpoint: 'https://github.com/login/oauth/authorize',
                        redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 1 hr to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 54..64

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

              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

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

                        Oauth1.buildQueryString = function(obj) {
                          var str = [];
              
                          angular.forEach(obj, function(value, key) {
                            str.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 1 hr to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 680..686

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

              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

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

                        if (accessToken) {
                          if (angular.isObject(accessToken) && angular.isObject(accessToken.data)) {
                            response = accessToken;
                          } else if (angular.isString(accessToken)) {
                            token = accessToken;
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 1 hr to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 427..434

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

              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

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

                      yahoo: {
                        name: 'yahoo',
                        url: '/auth/yahoo',
                        authorizationEndpoint: 'https://api.login.yahoo.com/oauth2/request_auth',
                        redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 1 hr to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 119..128

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

              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

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

                      Popup.stringifyOptions = function(options) {
                        var parts = [];
                        angular.forEach(options, function(value, key) {
                          parts.push(key + '=' + value);
                        });
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 1 hr to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 517..523

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

              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

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

                      instagram: {
                        name: 'instagram',
                        url: '/auth/instagram',
                        authorizationEndpoint: 'https://api.instagram.com/oauth/authorize',
                        redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 1 hr to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 65..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 58.

              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

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

                      twitter: {
                        name: 'twitter',
                        url: '/auth/twitter',
                        authorizationEndpoint: 'https://api.twitter.com/oauth/authenticate',
                        redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 1 hr to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 87..94

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

              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

                    this.oauth1 = function(params) {
                      oauth(params);
                      config.providers[params.name].oauthType = '1.0';
                    };
              Severity: Minor
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 35 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 228..231

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

                    this.oauth2 = function(params) {
                      oauth(params);
                      config.providers[params.name].oauthType = '2.0';
                    };
              Severity: Minor
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 35 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 223..226

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

                      baseUrl: {
                        get: function() { return config.baseUrl; },
                        set: function(value) { config.baseUrl = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

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

                      authToken: {
                        get: function() { return config.authToken; },
                        set: function(value) { config.authToken = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

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

                      tokenRoot: {
                        get: function() { return config.tokenRoot; },
                        set: function(value) { config.tokenRoot = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

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

                      authHeader: {
                        get: function() { return config.authHeader; },
                        set: function(value) { config.authHeader = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

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

                      withCredentials: {
                        get: function() { return config.withCredentials; },
                        set: function(value) { config.withCredentials = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

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

                      loginUrl: {
                        get: function() { return config.loginUrl; },
                        set: function(value) { config.loginUrl = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

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

                      tokenName: {
                        get: function() { return config.tokenName; },
                        set: function(value) { config.tokenName = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

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

                      signupUrl: {
                        get: function() { return config.signupUrl; },
                        set: function(value) { config.signupUrl = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

              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

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

                    this.camelCase = function(name) {
                      return name.replace(/([\:\-\_]+(.))/g, function(_, separator, letter, offset) {
                        return offset ? letter.toUpperCase() : letter;
                      });
                    };
              Severity: Minor
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 30 mins to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 722..726

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

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

                      unlinkUrl: {
                        get: function() { return config.unlinkUrl; },
                        set: function(value) { config.unlinkUrl = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

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

                      tokenPrefix: {
                        get: function() { return config.tokenPrefix; },
                        set: function(value) { config.tokenPrefix = value; }
                      },
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205
              examples/ionic/www/lib/satellizer/satellizer.js on lines 206..209

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

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

                      storageType: {
                        get: function() { return config.storageType; },
                        set: function(value) { config.storageType = value; }
                      }
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 10 other locations - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 166..169
              examples/ionic/www/lib/satellizer/satellizer.js on lines 170..173
              examples/ionic/www/lib/satellizer/satellizer.js on lines 174..177
              examples/ionic/www/lib/satellizer/satellizer.js on lines 178..181
              examples/ionic/www/lib/satellizer/satellizer.js on lines 182..185
              examples/ionic/www/lib/satellizer/satellizer.js on lines 186..189
              examples/ionic/www/lib/satellizer/satellizer.js on lines 190..193
              examples/ionic/www/lib/satellizer/satellizer.js on lines 194..197
              examples/ionic/www/lib/satellizer/satellizer.js on lines 198..201
              examples/ionic/www/lib/satellizer/satellizer.js on lines 202..205

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

              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

                            if (window.cordova) {
                              openPopup = popup.open(url, defaults.name, defaults.popupOptions, defaults.redirectUri).eventListener(defaults.redirectUri);
                            } else {
              Severity: Minor
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 521..523

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

              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

                            } else {
                              openPopup = popup.open(url, defaults.name, defaults.popupOptions, defaults.redirectUri).pollPopup(defaults.redirectUri);
                            }
              Severity: Minor
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 30 mins to fix
              examples/ionic/www/lib/satellizer/satellizer.js on lines 519..521

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

              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