VSVverkeerskunde/gvq-api

View on GitHub

Showing 428 of 1,426 total issues

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

            Method buildForm has 99 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/Contest/Forms/ContestFormType.php - About 3 hrs to fix

              Function Animation has 96 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Animation( elem, properties, options ) {
                  var result,
                      stopped,
                      index = 0,
                      length = Animation.prefilters.length,
              Severity: Major
              Found in public/js/jquery.js - About 3 hrs to fix

                Function trigger has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    trigger: function( event, data, elem, onlyHandlers ) {
                
                        var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
                            eventPath = [ elem || document ],
                            type = hasOwn.call( event, "type" ) ? event.type : event,
                Severity: Major
                Found in public/js/jquery.js - About 3 hrs to fix

                  Function Util has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    var Util = function ($$$1) {
                      /**
                       * ------------------------------------------------------------------------
                       * Private TransitionEnd Helpers
                       * ------------------------------------------------------------------------
                  Severity: Major
                  Found in public/js/bootstrap.js - About 3 hrs to fix

                    Function _fnBuildAjax has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function _fnBuildAjax( oSettings, data, fn )
                        {
                            // Compatibility with 1.9-, allow fnServerData and event to manipulate
                            _fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
                        
                    Severity: Major
                    Found in public/js/jquery.dataTables.js - About 3 hrs to fix

                      Function Popover has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function (_Tooltip) {
                            _inheritsLoose(Popover, _Tooltip);
                      
                            function Popover() {
                              return _Tooltip.apply(this, arguments) || this;
                      Severity: Major
                      Found in public/js/bootstrap.js - About 3 hrs to fix

                        Function bootstrap has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
                            var api     = new DataTable.Api( settings );
                            var classes = settings.oClasses;
                            var lang    = settings.oLanguage.oPaginate;
                            var aria = settings.oLanguage.oAria.paginate || {};
                        Severity: Major
                        Found in public/js/dataTables.bootstrap4.js - About 3 hrs to fix

                          Function _fnColumnOptions has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function _fnColumnOptions( oSettings, iCol, oOptions )
                              {
                                  var oCol = oSettings.aoColumns[ iCol ];
                                  var oClasses = oSettings.oClasses;
                                  var th = $(oCol.nTh);
                          Severity: Major
                          Found in public/js/jquery.dataTables.js - About 3 hrs to fix

                            Function _fnGetObjectDataFn has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function _fnGetObjectDataFn( mSource )
                                {
                                    if ( $.isPlainObject( mSource ) )
                                    {
                                        /* Build an object of get functions, and wrap them in a single call */
                            Severity: Major
                            Found in public/js/jquery.dataTables.js - About 3 hrs to fix

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

                                  public function handle(DomainMessage $domainMessage)
                                  {
                                      $payload = $domainMessage->getPayload();
                              
                                      if ($payload instanceof EmailRegistered) {
                              Severity: Major
                              Found in src/Statistics/Projectors/UniqueParticipantProjector.php - About 3 hrs to fix

                                Function initServer has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    BootstrapTable.prototype.initServer = function (silent, query, url) {
                                        var that = this,
                                            data = {},
                                            index = $.inArray(this.options.sortName, this.header.fields),
                                            params = {
                                Severity: Major
                                Found in public/js/bootstrap-table.js - About 3 hrs to fix

                                  Function Sizzle has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function Sizzle( selector, context, results, seed ) {
                                      var m, i, elem, nid, match, groups, newSelector,
                                          newContext = context && context.ownerDocument,
                                  
                                          // nodeType defaults to 9, since context defaults to document
                                  Severity: Major
                                  Found in public/js/jquery.js - About 3 hrs to fix

                                    Function CHILD has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            "CHILD": function( type, what, argument, first, last ) {
                                                var simple = type.slice( 0, 3 ) !== "nth",
                                                    forward = type.slice( -4 ) !== "last",
                                                    ofType = what === "of-type";
                                    
                                    
                                    Severity: Major
                                    Found in public/js/jquery.js - About 3 hrs to fix

                                      Function _ has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                  _: function ( settings, host, idx, buttons, page, pages ) {
                                                      var classes = settings.oClasses;
                                                      var lang = settings.oLanguage.oPaginate;
                                                      var aria = settings.oLanguage.oAria.paginate || {};
                                                      var btnDisplay, btnClass, counter=0;
                                      Severity: Major
                                      Found in public/js/jquery.dataTables.js - About 3 hrs to fix

                                        Function execute has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            protected function execute(InputInterface $input, OutputInterface $output): void
                                            {
                                                $firstId = $input->getOption('first-id');
                                                if (null !== $firstId) {
                                                    $firstId = (int) $firstId;
                                        Severity: Minor
                                        Found in src/Command/ReplayCommand.php - About 3 hrs to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language