VSVverkeerskunde/gvq-api

View on GitHub

Showing 428 of 1,426 total issues

Method sendActivation has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function sendActivation(Request $request, string $id): Response
    {
        $user = $this->userRepository->getById(Uuid::fromString($id));

        if (!$user) {
Severity: Major
Found in src/Account/Controllers/AccountViewController.php - About 2 hrs to fix

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

            controller: function (quizId, questionNr) {
              let deferredRender = $.Deferred();
              let counterInterval;
    
              function startCountdown () {
    Severity: Major
    Found in public/js/quiz.js - About 2 hrs to fix

      Function init has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          init = jQuery.fn.init = function( selector, context, root ) {
              var match, elem;
      
              // HANDLE: $(""), $(null), $(undefined), $(false)
              if ( !selector ) {
      Severity: Major
      Found in public/js/jquery.js - About 2 hrs to fix

        Function _fnPageChange has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _fnPageChange ( settings, action, redraw )
            {
                var
                    start     = settings._iDisplayStart,
                    len       = settings._iDisplayLength,
        Severity: Major
        Found in public/js/jquery.dataTables.js - About 2 hrs to fix

          Function iterator has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  iterator: function ( flatten, type, fn, alwaysNew ) {
                      var
                          a = [], ret,
                          i, ien, j, jen,
                          context = this.context,
          Severity: Major
          Found in public/js/jquery.dataTables.js - About 2 hrs to fix

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

                public function buildForm(FormBuilderInterface $builder, array $options)
                {
                    $this->user = $options['user'];
                    $this->translator = $options['translator'];
            
            
            Severity: Major
            Found in src/User/Forms/EditContactFormType.php - About 2 hrs to fix

              Function _showBackdrop has 53 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    _proto._showBackdrop = function _showBackdrop(callback) {
                      var _this8 = this;
              
                      var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
              
              
              Severity: Major
              Found in public/js/bootstrap.js - About 2 hrs to fix

                Function _fnSortListener has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function _fnSortListener ( settings, colIdx, append, callback )
                    {
                        var col = settings.aoColumns[ colIdx ];
                        var sorting = settings.aaSorting;
                        var asSorting = col.asSorting;
                Severity: Major
                Found in public/js/jquery.dataTables.js - About 2 hrs to fix

                  Function __row_selector has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var __row_selector = function ( settings, selector, opts )
                      {
                          var rows;
                          var run = function ( sel ) {
                              var selInt = _intVal( sel );
                  Severity: Major
                  Found in public/js/jquery.dataTables.js - About 2 hrs to fix

                    Method editImage has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function editImage(Request $request, string $id): Response
                        {
                            $question = $this->questionRepository->getById(
                                $this->uuidFactory->fromString($id)
                            );
                    Severity: Major
                    Found in src/Question/Controllers/QuestionViewController.php - About 2 hrs to fix

                      Function generateQuestions has a Cognitive Complexity of 16 (exceeds 5 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 2 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

                      Function remove has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          remove: function( elem, types, handler, selector, mappedTypes ) {
                      
                              var j, origCount, tmp,
                                  events, t, handleObj,
                                  special, handlers, type, namespaces, origType,
                      Severity: Major
                      Found in public/js/jquery.js - About 2 hrs to fix

                        Function buildFragment has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function buildFragment( elems, context, scripts, selection, ignored ) {
                            var elem, tmp, tag, wrap, contains, j,
                                fragment = context.createDocumentFragment(),
                                nodes = [],
                                i = 0,
                        Severity: Major
                        Found in public/js/jquery.js - About 2 hrs to fix

                          Function loaded has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  var loaded = function ( s ) {
                                      if ( ! s || ! s.time ) {
                                          callback();
                                          return;
                                      }
                          Severity: Major
                          Found in public/js/jquery.dataTables.js - About 2 hrs to fix

                            Method execute has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                protected function execute(InputInterface $input, OutputInterface $output): void
                                {
                                    $helper = $this->getHelper('question');
                                    $question = new ConfirmationQuestion('Continue with cleaning the read models? ', false);
                            
                            
                            Severity: Major
                            Found in src/Command/CleanReadModelsCommand.php - About 2 hrs to fix

                              Consider simplifying this complex logical expression.
                              Open

                                              if ( ( mappedTypes || origType === handleObj.origType ) &&
                                                  ( !handler || handler.guid === handleObj.guid ) &&
                                                  ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                                  ( !selector || selector === handleObj.selector ||
                                                      selector === "**" && handleObj.selector ) ) {
                              Severity: Critical
                              Found in public/js/jquery.js - About 2 hrs to fix

                                Function _fnCreateTr has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function _fnCreateTr ( oSettings, iRow, nTrIn, anTds )
                                    {
                                        var
                                            row = oSettings.aoData[iRow],
                                            rowData = row._aData,
                                Severity: Minor
                                Found in public/js/jquery.dataTables.js - About 1 hr to fix

                                  Function _fnApplyColumnDefs has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
                                      {
                                          var i, iLen, j, jLen, k, kLen, def;
                                          var columns = oSettings.aoColumns;
                                      
                                  Severity: Minor
                                  Found in public/js/jquery.dataTables.js - About 1 hr to fix

                                    Function _fnSortFlatten has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function _fnSortFlatten ( settings )
                                        {
                                            var
                                                i, iLen, k, kLen,
                                                aSort = [],
                                    Severity: Minor
                                    Found in public/js/jquery.dataTables.js - About 1 hr to fix

                                      Function run has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              var run = function ( sel ) {
                                                  var selInt = _intVal( sel );
                                                  var i, ien;
                                          
                                                  // Short cut - selector is a number and no options provided (default is
                                      Severity: Minor
                                      Found in public/js/jquery.dataTables.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language