Stamplay/stamplay-js-sdk

View on GitHub

Showing 11 of 53 total issues

Function Query has 161 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function Query(model, instance) {
        return {
            
            model : model,
            instance : instance,
Severity: Major
Found in src/query.js - About 6 hrs to fix

    File stamplay.tests.ts has 386 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // This file tests the contract defined by the interfaces in stamplay.d.ts against the examples provided by the Stamplay docs
    // Necessary condition (but not sufficient..) for the definition file to be correct is that these examples can be transpiled to javascript without errors by the TypeScript compiler.
    
    // To run the test, use command "tsc stamplay.tests.ts"
    
    
    Severity: Minor
    Found in types/stamplay.tests.ts - About 5 hrs to fix

      Function Object has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function Object(resourceId) {
              if (resourceId) {
                  return root.Stamplay.extend({
                      brickId: 'cobject',
                      resourceId: resourceId,
      Severity: Major
      Found in src/cobject.js - About 2 hrs to fix

        Function BaseComponent has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function BaseComponent(brickId, resourceId) {
                
                var removeAttributes = function (brick, instance) {
                    switch (brick) {
                    case 'cobject':
        Severity: Major
        Found in src/baseComponent.js - About 2 hrs to fix

          Function socialLogin has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  socialLogin: function(provider){
                      if(provider){
                          var url = '/auth/' + root.Stamplay.VERSION + '/' + provider + '/connect';
                          if(root.Stamplay.OPTIONS.isMobile){
                                  //need an external plugin to work - https://github.com/apache/cordova-plugin-inappbrowser
          Severity: Minor
          Found in src/user.js - About 1 hr to fix

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

                            findByCurrentUser: function (attr, data, callbackObject) {
                                var attribute = 'owner';
                                var params = {};
                                var callback;
                                if (arguments.length === 3) {
            Severity: Minor
            Found in src/cobject.js - About 1 hr to fix

              Function makeAPromise has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  root.Stamplay.makeAPromise = function (options, callback) {
                      if (options.thisParams) {
                          parseQueryParams(options);
                      }        
                      var headerStamplay = root.Stamplay.APPID;
              Severity: Minor
              Found in src/promise.js - About 1 hr to fix

                Function buildEndpoint has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        var buildEndpoint = function(brickId, resourceId, method, id, data, callbackObject){
                Severity: Minor
                Found in src/baseComponent.js - About 45 mins to fix

                  Function _createGeoQuery has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      function _createGeoQuery(queryOperator, shapeOperator, type, coordinates, maxDistance, minDistance) {
                  Severity: Minor
                  Found in src/query.js - About 45 mins to fix

                    Function charge has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            charge : function (userId, token, amount, currency, callbackObject) {
                    Severity: Minor
                    Found in src/stripe.js - About 35 mins to fix

                      Function _buildMethod has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          function _buildMethod(method, url, data, queryParams, callbackObject) {
                      Severity: Minor
                      Found in src/codeblock.js - About 35 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language