sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

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

        Object.defineProperty(AuthProvider.prototype, "storageType", {
            get: function () { return this.SatellizerConfig.storageType; },
            set: function (value) { this.SatellizerConfig.storageType = value; },
            enumerable: true,
            configurable: true
Severity: Major
Found in examples/ionic/www/lib/satellizer/dist/satellizer.js and 10 other locations - About 2 hrs to fix
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 172..177
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 178..183
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 184..189
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 190..195
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 196..201
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 202..207
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 208..213
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 214..219
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 220..225
examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 226..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 75.

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

  __getDistance: function getDistance(touch1, touch2) {
    var x = touch2.pageX - touch1.pageX,
    y = touch2.pageY - touch1.pageY;
    return Math.sqrt((x * x) + (y * y));
  },
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 2 hrs to fix
examples/ionic/www/lib/ionic/js/ionic.js on lines 1252..1256

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

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

Function show has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    show: function(target) {
      var self = this;

      if (self.scope.$$destroyed) {
        $log.error('Cannot call ' + self.viewType + '.show() after remove(). Please create a new ' + self.viewType + ' instance.');
Severity: Minor
Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

    Method facebook has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function facebook(Request $request)
        {
            $client = new GuzzleHttp\Client();
    
            $params = [
    Severity: Minor
    Found in examples/server/php/app/Http/Controllers/AuthController.php - About 1 hr to fix

      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

      angular.module('MyApp')
        .factory('Account', function($http) {
          return {
            getProfile: function() {
              return $http.get('/api/me');
      Severity: Major
      Found in examples/server/php/public/services/account.js and 1 other location - About 1 hr to fix
      examples/client/services/account.js on lines 1..11

      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

                      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/dist/satellizer.js and 1 other location - About 1 hr to fix
      examples/ionic/www/lib/satellizer/satellizer.js on lines 64..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 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

      angular.module('MyApp')
        .factory('Account', function($http) {
          return {
            getProfile: function() {
              return $http.get('/api/me');
      Severity: Major
      Found in examples/client/services/account.js and 1 other location - About 1 hr to fix
      examples/server/php/public/services/account.js on lines 1..11

      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

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

          for (i = 0; i < keys.length; i++) {
            if (document.documentElement.style[keys[i]] !== undefined) {
              ionic.CSS.TRANSFORM = keys[i];
              break;
            }
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
      examples/ionic/www/lib/ionic/js/ionic.js on lines 2471..2476

      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

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

          for (i = 0; i < keys.length; i++) {
            if (document.documentElement.style[keys[i]] !== undefined) {
              ionic.CSS.TRANSITION = keys[i];
              break;
            }
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
      examples/ionic/www/lib/ionic/js/ionic.js on lines 2462..2467

      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

      Function headerFooterBarDirective has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function headerFooterBarDirective(isHeader) {
        return ['$document', '$timeout', function($document, $timeout) {
          return {
            restrict: 'E',
            controller: '$ionicHeaderBar',
      Severity: Minor
      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

        Function start has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            start: function(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root) {
        
              var start = time();
              var lastFrame = start;
              var percent = 0;
        Severity: Minor
        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

          Function link has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              link: function(scope, element, attrs, uiSrefActive) {
                var ref = parseStateRef(attrs.uiSref, $state.current.name);
                var params = null, url = null, base = stateContext(element) || $state.$current;
                var newHref = null, isAnchor = element.prop("tagName") === "A";
                var isForm = element[0].nodeName === "FORM";
          Severity: Minor
          Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 hr to fix

            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

                $authProvider.oauth2({
                  name: 'foursquare',
                  url: '/auth/foursquare',
                  clientId: 'MTCEJ3NGW2PNNB31WOSBFDSAD4MTHYVAZ1UKIULXZ2CVFC2K',
                  redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
            Severity: Major
            Found in examples/server/php/public/app.js and 1 other location - About 1 hr to fix
            examples/client/app.js on lines 114..120

            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

                $authProvider.oauth2({
                  name: 'foursquare',
                  url: '/auth/foursquare',
                  clientId: 'MTCEJ3NGW2PNNB31WOSBFDSAD4MTHYVAZ1UKIULXZ2CVFC2K',
                  redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
            Severity: Major
            Found in examples/client/app.js and 1 other location - About 1 hr to fix
            examples/server/php/public/app.js on lines 114..120

            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

                    OAuth1.prototype.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/dist/satellizer.js and 1 other location - About 1 hr to fix
            examples/ionic/www/lib/satellizer/satellizer.js on lines 676..684

            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

            Method foursquare has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function foursquare(Request $request)
                {
                    $client = new GuzzleHttp\Client();
            
                    $params = [
            Severity: Minor
            Found in examples/server/php/app/Http/Controllers/AuthController.php - About 1 hr to fix

              Function decodeBase64 has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function decodeBase64(str) {
                      var buffer;
                      if (typeof module !== 'undefined' && module.exports) {
                          try {
                              buffer = require('buffer').Buffer;
              Severity: Minor
              Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 1 hr to fix

                Method linkedin has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function linkedin(Request $request)
                    {
                        $client = new GuzzleHttp\Client();
                
                        $params = [
                Severity: Minor
                Found in examples/server/php/app/Http/Controllers/AuthController.php - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language