sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

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

angular.module('MyApp')
  .controller('LoginCtrl', function($scope, $location, $auth, toastr) {
    $scope.login = function() {
      $auth.login($scope.user)
        .then(function() {
Severity: Major
Found in examples/client/controllers/login.js and 1 other location - About 1 day to fix
examples/server/php/public/controllers/login.js on lines 1..31

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

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')
  .controller('LoginCtrl', function($scope, $location, $auth, toastr) {
    $scope.login = function() {
      $auth.login($scope.user)
        .then(function() {
Severity: Major
Found in examples/server/php/public/controllers/login.js and 1 other location - About 1 day to fix
examples/client/controllers/login.js on lines 1..31

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

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 ($request->header('Authorization'))
        {
            $user = User::where('github', '=', $profile['id']);

            if ($user->first())
Severity: Major
Found in examples/server/php/app/Http/Controllers/AuthController.php and 1 other location - About 1 day to fix
examples/server/php/app/Http/Controllers/AuthController.php on lines 385..419

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

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 ($request->header('Authorization'))
            {
                $user = User::where('twitter', '=', $profile['id']);
                if ($user->first())
                {
Severity: Major
Found in examples/server/php/app/Http/Controllers/AuthController.php and 1 other location - About 1 day to fix
examples/server/php/app/Http/Controllers/AuthController.php on lines 581..616

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

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 $UrlMatcherFactory has 249 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function $UrlMatcherFactory() {
  $$UMFP = this;

  var isCaseInsensitive = false, isStrictMode = true, defaultSquashPolicy = false;

Severity: Major
Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 day to fix

    Function CollectionRepeatDirective has 230 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$rAF, $rootScope, $timeout) {
      return {
        restrict: 'A',
        priority: 1000,
        transclude: 'element',
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 day to fix

      Function postLink has 220 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function postLink(scope, element, attr, scrollCtrl, transclude) {
          var scrollView = scrollCtrl.scrollView;
          var node = element[0];
          var containerNode = angular.element('<div class="collection-repeat-container">')[0];
          node.parentNode.replaceChild(containerNode, node);
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 day to fix

        Function create has 213 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            create: function(navViewCtrl, viewLocals, enteringView, leavingView, renderStart, renderEnd) {
              // get a reference to an entering/leaving element if they exist
              // loop through to see if the view is already in the navViewElement
              var enteringEle, leavingEle;
              var transitionId = ++transitionCounter;
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 day to fix

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

            function $get(   $rootScope,   $q,   $view,   $injector,   $resolve,   $stateParams,   $urlRouter,   $location,   $urlMatcherFactory) {
          
              var TransitionSuperseded = $q.reject(new Error('transition superseded'));
              var TransitionPrevented = $q.reject(new Error('transition prevented'));
              var TransitionAborted = $q.reject(new Error('transition aborted'));
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 day to fix

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

                this.$get = ['$http', '$q', function($http, $q) {
            
                  var noop = angular.noop,
                    forEach = angular.forEach,
                    extend = angular.extend,
            Severity: Major
            Found in examples/ionic/www/lib/ionic/js/angular/angular-resource.js - About 1 day to fix

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

                  function VerticalViewType() {
                    this.getItemPrimarySize = heightGetter;
                    this.getItemSecondarySize = widthGetter;
              
                    this.getScrollValue = function() {
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 7 hrs to fix
              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 9104..9123

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

              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

                  function HorizontalViewType() {
                    this.getItemPrimarySize = widthGetter;
                    this.getItemSecondarySize = heightGetter;
              
                    this.getScrollValue = function() {
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 7 hrs to fix
              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 9084..9103

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

              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 __initEventHandlers has 190 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                __initEventHandlers: function() {
                  var self = this;
              
                  // Event Handler
                  var container = self.__container;
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 7 hrs to fix

                Function register has 187 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    register: function(parentScope, viewLocals) {
                
                      var currentStateId = getCurrentStateId(),
                          hist = getHistory(parentScope),
                          currentView = viewHistory.currentView,
                Severity: Major
                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 7 hrs to fix

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

                        if (req.header('Authorization')) {
                          User.findOne({ github: profile.id }, function(err, existingUser) {
                            if (existingUser) {
                              return res.status(409).send({ message: 'There is already a GitHub account that belongs to you' });
                            }
                  Severity: Major
                  Found in examples/server/node/server.js and 1 other location - About 7 hrs to fix
                  examples/server/node/server.js on lines 863..901

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

                  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 (req.header('Authorization')) {
                          User.findOne({ twitch: profile._id }, function(err, existingUser) {
                            if (existingUser) {
                              return res.status(409).send({ message: 'There is already a Twitch account that belongs to you' });
                            }
                  Severity: Major
                  Found in examples/server/node/server.js and 1 other location - About 7 hrs to fix
                  examples/server/node/server.js on lines 291..329

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

                  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 performAnimation has 171 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
                          var noopCancel = noop;
                          var runner = animationRunner(element, animationEvent, className, options);
                          if (!runner) {
                            fireDOMOperation();
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 6 hrs to fix

                    File AuthController.php has 445 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php namespace App\Http\Controllers;
                    
                    use Hash;
                    use Config;
                    use Validator;
                    Severity: Minor
                    Found in examples/server/php/app/Http/Controllers/AuthController.php - About 6 hrs to fix

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

                          $stateProvider
                            .state('home', {
                              url: '/',
                              controller: 'HomeCtrl',
                              templateUrl: 'partials/home.html'
                      Severity: Major
                      Found in examples/server/php/public/app.js and 1 other location - About 6 hrs to fix
                      examples/client/app.js on lines 30..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 163.

                      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

                          $stateProvider
                            .state('home', {
                              url: '/',
                              controller: 'HomeCtrl',
                              templateUrl: 'partials/home.html'
                      Severity: Major
                      Found in examples/client/app.js and 1 other location - About 6 hrs to fix
                      examples/server/php/public/app.js on lines 30..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 163.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language