VSVverkeerskunde/gvq-api

View on GitHub

Showing 428 of 1,426 total issues

Function handle has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function handle(DomainMessage $domainMessage)
    {
        $payload = $domainMessage->getPayload();

        if ($payload instanceof EmailRegistered) {
Severity: Minor
Found in src/Statistics/Projectors/UniqueParticipantProjector.php - About 1 hr 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

Function resetFooter has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    BootstrapTable.prototype.resetFooter = function () {
        var that = this,
            data = that.getData(),
            html = [];

Severity: Minor
Found in public/js/bootstrap-table.js - About 1 hr to fix

    Function _fnFilterData has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _fnFilterData ( settings )
        {
            var columns = settings.aoColumns;
            var column;
            var i, j, ien, jen, filterData, cellData, row;
    Severity: Minor
    Found in public/js/jquery.dataTables.js - About 1 hr to fix

      Function _selector_row_indexes has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var _selector_row_indexes = function ( settings, opts )
          {
              var
                  i, ien, tmp, a=[],
                  displayFiltered = settings.aiDisplay,
      Severity: Minor
      Found in public/js/jquery.dataTables.js - About 1 hr to fix

        Function _fnInitialise has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _fnInitialise ( settings )
            {
                var i, iLen, iAjaxStart=settings.iInitDisplayStart;
                var columns = settings.aoColumns, column;
                var features = settings.oFeatures;
        Severity: Minor
        Found in public/js/jquery.dataTables.js - About 1 hr to fix

          Function controller has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                    controller: function () {
                      var sequences = [
                        {pct: 20, label: '4'},
                        {pct: 40, label: '3'},
                        {pct: 60, label: '2'},
          Severity: Minor
          Found in public/js/quiz.js - About 1 hr to fix

            Method answerQuestion has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function answerQuestion(
                    \DateTimeImmutable $answeredOn,
                    ?Answer $answer
                ): void {
                    if ($this->askingQuestion) {
            Severity: Minor
            Found in src/Quiz/Aggregate/QuizAggregate.php - About 1 hr to fix

              Method start has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function start(Request $request): Response
                  {
                      try {
                          /** @var StartQuiz $startQuiz */
                          $startQuiz = $this->serializer->deserialize(
              Severity: Minor
              Found in src/Quiz/Controllers/QuizController.php - About 1 hr to fix

                Function toggle has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      _proto.toggle = function toggle() {
                        if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) {
                          return;
                        }
                
                
                Severity: Minor
                Found in public/js/bootstrap.js - About 1 hr to fix

                  Function __details_events has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var __details_events = function ( settings )
                      {
                          var api = new _Api( settings );
                          var namespace = '.dt.DT_details';
                          var drawEvent = 'draw'+namespace;
                  Severity: Minor
                  Found in public/js/jquery.dataTables.js - About 1 hr to fix

                    Function renderAnsweredQuestion has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                              function renderAnsweredQuestion (data) {
                                let answerResult = 'wrong';
                    
                                for (var i = 1; i <= 3; i++) {
                                  view.find('[data-value="answer' + i + '"]').hide();
                    Severity: Minor
                    Found in public/js/quiz.js - About 1 hr to fix

                      Function access has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                          var i = 0,
                              len = elems.length,
                              bulk = key == null;
                      
                      
                      Severity: Minor
                      Found in public/js/jquery.js - About 1 hr to fix

                        Function extend has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        jQuery.extend = jQuery.fn.extend = function() {
                            var options, name, src, copy, copyIsArray, clone,
                                target = arguments[ 0 ] || {},
                                i = 1,
                                length = arguments.length,
                        Severity: Minor
                        Found in public/js/jquery.js - About 1 hr to fix

                          Function stop has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              stop: function( type, clearQueue, gotoEnd ) {
                                  var stopQueue = function( hooks ) {
                                      var stop = hooks.stop;
                                      delete hooks.stop;
                                      stop( gotoEnd );
                          Severity: Minor
                          Found in public/js/jquery.js - About 1 hr to fix

                            Function style has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                style: function( elem, name, value, extra ) {
                            
                                    // Don't set styles on text and comment nodes
                                    if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                                        return;
                            Severity: Minor
                            Found in public/js/jquery.js - About 1 hr to fix

                              Function initContainer has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  BootstrapTable.prototype.initContainer = function () {
                                      this.$container = $([
                                          '<div class="bootstrap-table">',
                                          '<div class="fixed-table-toolbar"></div>',
                                          this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
                              Severity: Minor
                              Found in public/js/bootstrap-table.js - About 1 hr to fix

                                Function _fnFeatureHtmlPaginate has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function _fnFeatureHtmlPaginate ( settings )
                                    {
                                        var
                                            type   = settings.sPaginationType,
                                            plugin = DataTable.ext.pager[ type ],
                                Severity: Minor
                                Found in public/js/jquery.dataTables.js - About 1 hr to fix

                                  Method getTopCompanies has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function getTopCompanies(NaturalNumber $nrOfPassedEmployees): iterable
                                      {
                                          $batchSize = 10;
                                          $firstResult = 0;
                                  
                                  
                                  Severity: Minor
                                  Found in src/Statistics/Repositories/TopScoreDoctrineRepository.php - About 1 hr to fix

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

                                        public function buildForm(FormBuilderInterface $builder, array $options)
                                        {
                                            parent::buildForm($builder, $options);
                                    
                                            $languages = $options['languages']->toArray();
                                    Severity: Minor
                                    Found in src/User/Forms/UserFormType.php - About 1 hr to fix

                                      Method edit has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function edit(Request $request, string $id): Response
                                          {
                                              $question = $this->questionRepository->getById(
                                                  $this->uuidFactory->fromString($id)
                                              );
                                      Severity: Minor
                                      Found in src/Question/Controllers/QuestionViewController.php - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language