VSVverkeerskunde/gvq-api

View on GitHub

Showing 428 of 1,426 total issues

Avoid deeply nested control flow statements.
Open

                            for ( var j=0, jLen=val.length ; j<jLen ; j++ )
                            {
                                o = {};
                                setData( o, val[j], innerSrc );
                                data[ a[i] ].push( o );
Severity: Major
Found in public/js/jquery.dataTables.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if ( fomatters[ column.sType ] ) {
                                cellData = fomatters[ column.sType ]( cellData );
                            }
    Severity: Major
    Found in public/js/jquery.dataTables.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if ( cellData === null ) {
                                  cellData = '';
                              }
      Severity: Major
      Found in public/js/jquery.dataTables.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                for ( k=0 ; k<iRowspan ; k++ )
                                {
                                    aLayout[i+k][iColShifted+l] = {
                                        "cell": nCell,
                                        "unique": bUnique
        Severity: Major
        Found in public/js/jquery.dataTables.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      if (value[props[prop_index]] != null) {
                                          value = value[props[prop_index]];
                                      }
          Severity: Major
          Found in public/js/bootstrap-table.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if ( arrayNotation )
                                    {
                                        // Array notation
                                        a[i] = a[i].replace(__reArray, '');
                
            Severity: Major
            Found in public/js/jquery.dataTables.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ((tmp === -1 && search == 'removed') ||
                                      (tmp >= 0   && search == 'applied') )
                                  {
                                      a.push( i );
                                  }
              Severity: Major
              Found in public/js/jquery.dataTables.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if ((value + '').toLowerCase() === s) {
                                                return true;
                                            }
                Severity: Major
                Found in public/js/bootstrap-table.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )
                                      {
                                          /* Negative integer, right to left column counting */
                                          fn( columns.length+aTargets[j], def );
                                      }
                  Severity: Major
                  Found in public/js/jquery.dataTables.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if ( typeof cellData !== 'string' && cellData.toString ) {
                                                cellData = cellData.toString();
                                            }
                    Severity: Major
                    Found in public/js/jquery.dataTables.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                  if ((value + '').toLowerCase().indexOf(s) !== -1) {
                                                      return true;
                                                  }
                      Severity: Major
                      Found in public/js/bootstrap-table.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                for ( k=0 ; k<iRowspan ; k++ )
                                                {
                                                    aApplied[i+k][j+iColspan] = 1;
                                                }
                        Severity: Major
                        Found in public/js/jquery.dataTables.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if ( type === 'column-rows' ) {
                                                  rows = _selector_row_indexes( context[i], selector.opts );
                                              }
                          Severity: Major
                          Found in public/js/jquery.dataTables.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ( cache[k] === undefined ) {
                                                        cache[k] = _fnGetCellData( settings, k, i, 'type' );
                                                    }
                            Severity: Major
                            Found in public/js/jquery.dataTables.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      while( columns.length <= aTargets[j] )
                                                      {
                                                          _fnAddColumn( oSettings );
                                                      }
                              Severity: Major
                              Found in public/js/jquery.dataTables.js - About 45 mins to fix

                                Method generateQuiz has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        QuizChannel $channel,
                                        ?Company $company,
                                        ?Partner $partner,
                                        ?Team $team,
                                        Language $language,
                                Severity: Minor
                                Found in src/Quiz/Service/QuizService.php - About 45 mins to fix

                                  Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          QuizChannel $quizChannel,
                                          ?Alias $companyAlias,
                                          ?Alias $partnerAlias,
                                          ?UuidInterface $teamId,
                                          Language $language,
                                  Severity: Minor
                                  Found in src/Quiz/Commands/StartQuiz.php - About 45 mins to fix

                                    Function answerQuestion has a Cognitive Complexity of 8 (exceeds 5 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 45 mins 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 getTieBreakerByLocaleAndChannel has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        private function getTieBreakerByLocaleAndChannel(string $locale, QuizChannel $channel): array
                                        {
                                            if (!$channel->equals(new QuizChannel(QuizChannel::LEAGUE))) {
                                                $channel = new QuizChannel(QuizChannel::INDIVIDUAL);
                                            }
                                    Severity: Minor
                                    Found in src/Contest/Controllers/ContestViewController.php - About 45 mins 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

                                    Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            string $id,
                                            string $name,
                                            int $numberOfEmployees,
                                            Collection $translatedAliasEntities,
                                            UserEntity $user,
                                    Severity: Minor
                                    Found in src/Company/Repositories/Entities/CompanyEntity.php - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language