VSVverkeerskunde/gvq-api

View on GitHub

Showing 428 of 1,426 total issues

Method getEventBus has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function getEventBus(InputInterface $input): SimpleEventBus
    {
        $name = $input->getOption('projector');

        $eventBus = null;
Severity: Minor
Found in src/Command/ReplayCommand.php - About 1 hr to fix

    Method generateQuestions has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function generateQuestions(Language $language, Year $year, ?string $firstQuestionId): Questions
        {
            $pickedQuestions = [];
            $firstQuestion = null;
    
    
    Severity: Minor
    Found in src/Quiz/Service/QuizService.php - About 1 hr to fix

      Function requestPassword has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          public function requestPassword(Request $request): Response
          {
              $form = $this->createRequestPasswordForm();
              $form->handleRequest($request);
      
      
      Severity: Minor
      Found in src/Account/Controllers/AccountViewController.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 _fnColumnTypes has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function _fnColumnTypes ( settings )
          {
              var columns = settings.aoColumns;
              var data = settings.aoData;
              var types = DataTable.ext.type.detect;
      Severity: Minor
      Found in public/js/jquery.dataTables.js - About 1 hr to fix

        Function hide has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              _proto.hide = function hide(callback) {
                var _this2 = this;
        
                var tip = this.getTipElement();
                var hideEvent = $$$1.Event(this.constructor.Event.HIDE);
        Severity: Minor
        Found in public/js/bootstrap.js - About 1 hr to fix

          Function resetView has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              BootstrapTable.prototype.resetView = function (params) {
                  var padding = 0;
          
                  if (params && params.height) {
                      this.options.height = params.height;
          Severity: Minor
          Found in public/js/bootstrap-table.js - About 1 hr to fix

            Function data has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        this.data = s ? $.grep(this.data, function (item, i) {
                            for (var j = 0; j < that.header.fields.length; j++) {
            
                                if (!that.header.searchables[j]) {
                                    continue;
            Severity: Minor
            Found in public/js/bootstrap-table.js - About 1 hr to fix

              Function objectKeys has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var objectKeys = function () {
                      // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
                      if (!Object.keys) {
                          Object.keys = (function() {
                              var hasOwnProperty = Object.prototype.hasOwnProperty,
              Severity: Minor
              Found in public/js/bootstrap-table.js - About 1 hr to fix

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

                    public function buildForm(FormBuilderInterface $builder, array $options)
                    {
                        $this->translator = $options['translator'];
                
                        $builder
                Severity: Minor
                Found in src/Account/Forms/PasswordFormType.php - About 1 hr to fix

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

                          string $id,
                          int $year,
                          string $language,
                          string $channel,
                          ContestParticipantEmbeddable $contestParticipant,
                  Severity: Major
                  Found in src/Contest/Repositories/Entities/ContestParticipationEntity.php - About 1 hr to fix

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

                            UuidInterface $id,
                            Year $year,
                            Language $language,
                            QuizChannel $channel,
                            ContestParticipant $contestParticipant,
                    Severity: Major
                    Found in src/Contest/Models/ContestParticipation.php - About 1 hr to fix

                      Function handlers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          handlers: function( event, handlers ) {
                              var i, handleObj, sel, matchedHandlers, matchedSelectors,
                                  handlerQueue = [],
                                  delegateCount = handlers.delegateCount,
                                  cur = event.target;
                      Severity: Minor
                      Found in public/js/jquery.js - About 1 hr to fix

                        Function setOffset has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            setOffset: function( elem, options, i ) {
                                var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                                    position = jQuery.css( elem, "position" ),
                                    curElem = jQuery( elem ),
                                    props = {};
                        Severity: Minor
                        Found in public/js/jquery.js - About 1 hr to fix

                          Function jqueryui has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      jqueryui: function ( settings, cell, column, classes ) {
                                          $('<div/>')
                                              .addClass( classes.sSortJUIWrapper )
                                              .append( cell.contents() )
                                              .append( $('<span/>')
                          Severity: Minor
                          Found in public/js/jquery.dataTables.js - About 1 hr to fix

                            Function show has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  _proto.show = function show(relatedTarget) {
                                    var _this = this;
                            
                                    if (this._isTransitioning || this._isShown) {
                                      return;
                            Severity: Minor
                            Found in public/js/bootstrap.js - About 1 hr to fix

                              Method denormalize has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function denormalize($data, $class, $format = null, array $context = array()): Company
                                  {
                                      $translatedAliases = array_map(
                                          function (array $translatedAlias) use ($format) {
                                              return $this->translatedAliasDenormalizer->denormalize(
                              Severity: Minor
                              Found in src/Company/Serializers/CompanyDenormalizer.php - About 1 hr to fix

                                Method report has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function report(): Response
                                    {
                                        if ($this->canViewReport()) {
                                            $correctNlQuestions = $this->reportService->getCorrectQuestions(
                                                new Language(Language::NL)
                                Severity: Minor
                                Found in src/Report/Controllers/ReportViewController.php - About 1 hr to fix

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

                                          controller: function (quizId, score, totalQuestions) {
                                            setViewValue('score', score);
                                            setViewValue('totalQuestions', totalQuestions);
                                  
                                            function checkEmail () {
                                  Severity: Minor
                                  Found in public/js/quiz.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if ( ie67 || ! userInputs && ! scrollX && ! scrollY &&
                                                 columnCount == _fnVisbleColumns( oSettings ) &&
                                                 columnCount == headerCells.length
                                            ) {
                                                for ( i=0 ; i<columnCount ; i++ ) {
                                    Severity: Critical
                                    Found in public/js/jquery.dataTables.js - About 1 hr to fix

                                      Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function showHide( elements, show ) {
                                          var display, elem,
                                              values = [],
                                              index = 0,
                                              length = elements.length;
                                      Severity: Minor
                                      Found in public/js/jquery.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language