VSVverkeerskunde/gvq-api

View on GitHub

Showing 1,426 of 1,426 total issues

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

    public function registerIframe(Request $request): Response
    {
        if (!$this->canRegister()) {
            return new Response('', Response::HTTP_FORBIDDEN);
        }
Severity: Major
Found in src/Account/Controllers/AccountViewController.php and 1 other location - About 1 day to fix
src/Account/Controllers/AccountViewController.php on lines 229..278

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

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

    public function register(Request $request): Response
    {
        if (!$this->canRegister()) {
            return new Response('', Response::HTTP_FORBIDDEN);
        }
Severity: Major
Found in src/Account/Controllers/AccountViewController.php and 1 other location - About 1 day to fix
src/Account/Controllers/AccountViewController.php on lines 173..222

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

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

  var ScrollSpy = function ($$$1) {
    /**
     * ------------------------------------------------------------------------
     * Constants
     * ------------------------------------------------------------------------
Severity: Major
Found in public/js/bootstrap.js - About 1 day to fix

    Function initPagination has 201 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        BootstrapTable.prototype.initPagination = function () {
            if (!this.options.pagination) {
                this.$pagination.hide();
                return;
            } else {
    Severity: Major
    Found in public/js/bootstrap-table.js - About 1 day to fix

      Function Collapse has 196 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function () {
            function Collapse(element, config) {
              this._isTransitioning = false;
              this._element = element;
              this._config = this._getConfig(config);
      Severity: Major
      Found in public/js/bootstrap.js - About 7 hrs to fix

        File AccountViewController.php has 485 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php declare(strict_types=1);
        
        namespace VSV\GVQ_API\Account\Controllers;
        
        use Ramsey\Uuid\Uuid;
        Severity: Minor
        Found in src/Account/Controllers/AccountViewController.php - About 7 hrs to fix

          Function Deferred has 178 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Deferred: function( func ) {
                  var tuples = [
          
                          // action, add listener, callbacks,
                          // ... .then handlers, argument index, [final state]
          Severity: Major
          Found in public/js/jquery.js - About 7 hrs to fix

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

            (function(w,d,s,l,i) {
                w[l]=w[l]||[];
                w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
                var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
                j.async=true;
            Severity: Major
            Found in public/js/gtm.quiz.js and 1 other location - About 6 hrs to fix
            public/js/gtm.league.js on lines 1..8

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

            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

            (function(w,d,s,l,i) {
                w[l]=w[l]||[];
                w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
                var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
                j.async=true;
            Severity: Major
            Found in public/js/gtm.league.js and 1 other location - About 6 hrs to fix
            public/js/gtm.quiz.js on lines 1..8

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

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

              var Tab = function ($$$1) {
                /**
                 * ------------------------------------------------------------------------
                 * Constants
                 * ------------------------------------------------------------------------
            Severity: Major
            Found in public/js/bootstrap.js - About 6 hrs to fix

              Function _fnScrollDraw has 165 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function _fnScrollDraw ( settings )
                  {
                      // Given that this is such a monster function, a lot of variables are use
                      // to try and keep the minimised size as small as possible
                      var
              Severity: Major
              Found in public/js/jquery.dataTables.js - About 6 hrs to fix

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

                    BootstrapTable.prototype.initRow = function(item, i, data, parentDom) {
                        var that=this,
                            key,
                            html = [],
                            style = {},
                Severity: Major
                Found in public/js/bootstrap-table.js - About 6 hrs to fix

                  Function ScrollSpy has 159 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function () {
                        function ScrollSpy(element, config) {
                          var _this = this;
                  
                          this._element = element;
                  Severity: Major
                  Found in public/js/bootstrap.js - About 6 hrs to fix

                    File quiz.js has 430 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    (function (window, document, $) {
                      var logoOffsetCounter = 0;
                    
                      let defaultQuizConfig = {
                        'channel': 'individual',
                    Severity: Minor
                    Found in public/js/quiz.js - About 6 hrs to fix

                      Function initToolbar has 152 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          BootstrapTable.prototype.initToolbar = function () {
                              var that = this,
                                  html = [],
                                  timeoutId = 0,
                                  $keepOpen,
                      Severity: Major
                      Found in public/js/bootstrap-table.js - About 6 hrs to fix

                        Function initHeader has 141 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            BootstrapTable.prototype.initHeader = function () {
                                var that = this,
                                    visibleColumns = {},
                                    html = [];
                        
                        
                        Severity: Major
                        Found in public/js/bootstrap-table.js - About 5 hrs to fix

                          Method buildForm has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function buildForm(FormBuilderInterface $builder, array $options)
                              {
                                  /** @var TranslatorInterface $translator */
                                  $translator = $options['translator'];
                          
                          
                          Severity: Major
                          Found in src/Account/Forms/RegistrationFormType.php - About 5 hrs to fix

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

                            <?php declare(strict_types=1);
                            
                            namespace VSV\GVQ_API\Account\Constraints;
                            
                            use Symfony\Component\Validator\Constraint;
                            Severity: Major
                            Found in src/Account/Constraints/CompanyIsUniqueValidator.php and 2 other locations - About 5 hrs to fix
                            src/Account/Constraints/AliasIsUniqueValidator.php on lines 1..53
                            src/Account/Constraints/UserIsUniqueValidator.php on lines 1..52

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

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

                            <?php declare(strict_types=1);
                            
                            namespace VSV\GVQ_API\Account\Constraints;
                            
                            use Symfony\Component\Validator\Constraint;
                            Severity: Major
                            Found in src/Account/Constraints/AliasIsUniqueValidator.php and 2 other locations - About 5 hrs to fix
                            src/Account/Constraints/CompanyIsUniqueValidator.php on lines 1..53
                            src/Account/Constraints/UserIsUniqueValidator.php on lines 1..52

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

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

                            <?php declare(strict_types=1);
                            
                            namespace VSV\GVQ_API\Account\Constraints;
                            
                            use Symfony\Component\Validator\Constraint;
                            Severity: Major
                            Found in src/Account/Constraints/UserIsUniqueValidator.php and 2 other locations - About 5 hrs to fix
                            src/Account/Constraints/AliasIsUniqueValidator.php on lines 1..53
                            src/Account/Constraints/CompanyIsUniqueValidator.php on lines 1..53

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

                            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