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

    _api_register( 'columns()', function ( selector, opts ) {
        // argument shifting
        if ( selector === undefined ) {
            selector = '';
        }
Severity: Major
Found in public/js/jquery.dataTables.js and 1 other location - About 5 hrs to fix
public/js/jquery.dataTables.js on lines 7936..7957

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

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

    _api_register( 'rows()', function ( selector, opts ) {
        // argument shifting
        if ( selector === undefined ) {
            selector = '';
        }
Severity: Major
Found in public/js/jquery.dataTables.js and 1 other location - About 5 hrs to fix
public/js/jquery.dataTables.js on lines 8544..8565

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

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

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

    Function _fnCalculateColumnWidths has 136 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _fnCalculateColumnWidths ( oSettings )
        {
            var
                table = oSettings.nTable,
                columns = oSettings.aoColumns,
    Severity: Major
    Found in public/js/jquery.dataTables.js - About 5 hrs to fix

      Function initBody has 133 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

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

            public function buildForm(FormBuilderInterface $builder, array $options)
            {
                /** @var Category[] $categories */
                $categories = $options['categories']->toArray();
                /** @var Language[] $languages */
        Severity: Major
        Found in src/Question/Forms/QuestionFormType.php - About 5 hrs to fix

          Function Tab has 126 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function () {
                function Tab(element) {
                  this._element = element;
                } // Getters
          
          
          Severity: Major
          Found in public/js/bootstrap.js - About 5 hrs to fix

            Function defaultPrefilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function defaultPrefilter( elem, props, opts ) {
                var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
                    isBox = "width" in props || "height" in props,
                    anim = this,
                    orig = {},
            Severity: Major
            Found in public/js/jquery.js - About 4 hrs to fix

              Function Callbacks has 121 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jQuery.Callbacks = function( options ) {
              
                  // Convert options from String-formatted to Object-formatted if needed
                  // (we check in cache first)
                  options = typeof options === "string" ?
              Severity: Major
              Found in public/js/jquery.js - About 4 hrs to fix

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

                <?php declare(strict_types=1);
                
                namespace VSV\GVQ_API\Quiz\Serializers;
                
                use Ramsey\Uuid\Uuid;
                Severity: Major
                Found in src/Quiz/Serializers/AnsweredCorrectDenormalizer.php and 1 other location - About 4 hrs to fix
                src/Quiz/Serializers/AnsweredIncorrectDenormalizer.php on lines 1..42

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

                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

                <?php declare(strict_types=1);
                
                namespace VSV\GVQ_API\Quiz\Serializers;
                
                use Ramsey\Uuid\Uuid;
                Severity: Major
                Found in src/Quiz/Serializers/AnsweredIncorrectDenormalizer.php and 1 other location - About 4 hrs to fix
                src/Quiz/Serializers/AnsweredCorrectDenormalizer.php on lines 1..42

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

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

                    function _fnAddOptionsHtml ( oSettings )
                    {
                        var classes = oSettings.oClasses;
                        var table = $(oSettings.nTable);
                        var holding = $('<div/>').insertBefore( table ); // Holding element for speed
                Severity: Major
                Found in public/js/jquery.dataTables.js - About 4 hrs to fix

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

                      nl: {
                        STARTING: 'De quiz start over',
                        START_QUIZ: 'Start!',
                        CONTINUE: 'Verdergaan',
                        QUESTION: 'Vraag',
                  Severity: Major
                  Found in public/js/quiz.js and 1 other location - About 4 hrs to fix
                  public/js/quiz.js on lines 50..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 121.

                  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

                      fr: {
                        STARTING: 'Vous êtes prêt ?',
                        START_QUIZ: 'Commencer',
                        CONTINUE: 'Continuez',
                        QUESTION: 'Question',
                  Severity: Major
                  Found in public/js/quiz.js and 1 other location - About 4 hrs to fix
                  public/js/quiz.js on lines 25..49

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

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

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

                    Function Button has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      File QuestionViewController.php has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

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

                        Function _fnFeatureHtmlTable has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function _fnFeatureHtmlTable ( settings )
                            {
                                var table = $(settings.nTable);
                            
                                // Add the ARIA grid role to the table
                        Severity: Major
                        Found in public/js/jquery.dataTables.js - About 4 hrs to fix

                          Function then has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                          then: function( onFulfilled, onRejected, onProgress ) {
                                              var maxDepth = 0;
                                              function resolve( depth, deferred, handler, special ) {
                                                  return function() {
                                                      var that = this,
                          Severity: Major
                          Found in public/js/jquery.js - About 4 hrs to fix

                            Function _fnDraw has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function _fnDraw( oSettings )
                                {
                                    /* Provide a pre-callback function which can be used to cancel the draw is false is returned */
                                    var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
                                    if ( $.inArray( false, aPreDraw ) !== -1 )
                            Severity: Major
                            Found in public/js/jquery.dataTables.js - About 3 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language