GrafiteInc/Builder

View on GitHub

Showing 80 of 80 total issues

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

        for (i = 0, len = element.length; i < len; i++) {
          el = element[i];
          QJ.on(el, eventName, callback);
        }
Severity: Major
Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 1 hr to fix
src/Packages/Billing/resources/assets/js/card.js on lines 879..882

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

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

    public function handle()
    {
        if ($this->starterIsInstalled()) {
            $fileSystem = new Filesystem();

Severity: Minor
Found in src/Console/Queue.php - About 1 hr to fix

    Method handle has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function handle()
        {
            if ($this->starterIsInstalled()) {
                $fileSystem = new Filesystem();
    
    
    Severity: Minor
    Found in src/Console/Logs.php - About 1 hr to fix

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

                if (year.length === 2) {
                  prefix = (new Date).getFullYear();
                  prefix = prefix.toString().slice(0, 2);
                  year = prefix + year;
                }
      Severity: Major
      Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 1 hr to fix
      src/Packages/Billing/resources/assets/js/card.js on lines 1462..1466

      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

                if ((year != null ? year.length : void 0) === 2 && /^\d+$/.test(year)) {
                  prefix = (new Date).getFullYear();
                  prefix = prefix.toString().slice(0, 2);
                  year = prefix + year;
                }
      Severity: Major
      Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 1 hr to fix
      src/Packages/Billing/resources/assets/js/card.js on lines 1508..1512

      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

          Route::group(['middleware' => 'admin', 'prefix' => 'admin'], function () {
              Route::get('forge/settings', 'Admin\ForgeController@index');
              Route::get('forge/scheduler', 'Admin\ForgeController@scheduler');
              Route::get('forge/workers', 'Admin\ForgeController@workers');
      
      
      Severity: Minor
      Found in src/Packages/Forge/routes/forge.php and 1 other location - About 55 mins to fix
      src/Packages/Billing/routes/billing.php on lines 15..23

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

      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

                  Route::group(['gateway' => 'access-billing'], function () {
                      Route::get('change-card', 'BillingController@getChangeCard');
                      Route::post('change-card', 'BillingController@postChangeCard');
                      Route::get('cancellation', 'BillingController@cancelSubscription');
                      Route::get('invoices', 'BillingController@getInvoices');
      Severity: Minor
      Found in src/Packages/Billing/routes/billing.php and 1 other location - About 55 mins to fix
      src/Packages/Forge/routes/forge.php on lines 17..27

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

      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

      Avoid deeply nested control flow statements.
      Open

                } else if (typeof copy !== 'undefined') {
                  target[name] = copy;
                }
      Severity: Major
      Found in src/Packages/Billing/resources/assets/js/card.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                    if (copyIsArray) {
                      copyIsArray = false;
                      clone = src && is.array(src) ? src : [];
                    } else {
                      clone = src && is.hash(src) ? src : {};
        Severity: Major
        Found in src/Packages/Billing/resources/assets/js/card.js - About 45 mins to fix

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

            is.hex = function (value) {
              return is.string(value) && (!value.length || hexRegex.test(value));
            };
          Severity: Minor
          Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 40 mins to fix
          src/Packages/Billing/resources/assets/js/card.js on lines 2504..2506

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

          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

            is.base64 = function (value) {
              return is.string(value) && (!value.length || base64Regex.test(value));
            };
          Severity: Minor
          Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 40 mins to fix
          src/Packages/Billing/resources/assets/js/card.js on lines 2521..2523

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

          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

          Consider simplifying this complex logical expression.
          Open

              } else if(obj.sourceMap &&
                typeof URL === "function" &&
                typeof URL.createObjectURL === "function" &&
                typeof URL.revokeObjectURL === "function" &&
                typeof Blob === "function" &&
          Severity: Major
          Found in src/Packages/Billing/resources/assets/js/card.js - About 40 mins to fix

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

                  for (key in other) {
                    if (!is.equal(value[key], other[key]) || !(key in value)) {
                      return false;
                    }
                  }
            Severity: Minor
            Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 40 mins to fix
            src/Packages/Billing/resources/assets/js/card.js on lines 1863..1867

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

            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

              is.args.empty = function (value) {
                return is.args(value) && value.length === 0;
              };
            Severity: Minor
            Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 40 mins to fix
            src/Packages/Billing/resources/assets/js/card.js on lines 2010..2012

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

            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

              is.array.empty = function (value) {
                return is.array(value) && value.length === 0;
              };
            Severity: Minor
            Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 40 mins to fix
            src/Packages/Billing/resources/assets/js/card.js on lines 1998..2000

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

            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 (key in value) {
                    if (!is.equal(value[key], other[key]) || !(key in other)) {
                      return false;
                    }
                  }
            Severity: Minor
            Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 40 mins to fix
            src/Packages/Billing/resources/assets/js/card.js on lines 1868..1872

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

            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 createStyleElement(options) {
                var styleElement = document.createElement("style");
                styleElement.type = "text/css";
                insertStyleElement(options, styleElement);
                return styleElement;
            Severity: Minor
            Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 35 mins to fix
            src/Packages/Billing/resources/assets/js/card.js on lines 679..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 46.

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

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

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

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

            Refactorings

            Further Reading

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

              function createLinkElement(options) {
                var linkElement = document.createElement("link");
                linkElement.rel = "stylesheet";
                insertStyleElement(options, linkElement);
                return linkElement;
            Severity: Minor
            Found in src/Packages/Billing/resources/assets/js/card.js and 1 other location - About 35 mins to fix
            src/Packages/Billing/resources/assets/js/card.js on lines 672..677

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 46.

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

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

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

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

            Refactorings

            Further Reading

            Avoid too many return statements within this function.
            Open

                  return true;
            Severity: Major
            Found in src/Packages/Billing/resources/assets/js/card.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return true;
              Severity: Major
              Found in src/Packages/Billing/resources/assets/js/card.js - About 30 mins to fix
                Severity
                Category
                Status
                Source
                Language