VSVverkeerskunde/gvq-api

View on GitHub

Showing 1,426 of 1,426 total issues

Function _fnInvalidate has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function _fnInvalidate( settings, rowIdx, src, colIdx )
    {
        var row = settings.aoData[ rowIdx ];
        var i, ien;
        var cellWrite = function ( cell, col ) {
Severity: Minor
Found in public/js/jquery.dataTables.js - About 1 hr to fix

    Function _fnFeatureHtmlLength has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _fnFeatureHtmlLength ( settings )
        {
            var
                classes  = settings.oClasses,
                tableId  = settings.sTableId,
    Severity: Minor
    Found in public/js/jquery.dataTables.js - About 1 hr to fix

      Function dispatch has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          dispatch: function( nativeEvent ) {
      
              // Make a writable jQuery.Event from the native event object
              var event = jQuery.event.fix( nativeEvent );
      
      
      Severity: Minor
      Found in public/js/jquery.js - About 1 hr to fix

        Method updateQuestionFromData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function updateQuestionFromData(
                UuidFactoryInterface $uuidFactory,
                Question $question,
                array $data
            ): Question {
        Severity: Minor
        Found in src/Question/Forms/QuestionFormType.php - About 1 hr to fix

          Method add has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function add(Request $request): Response
              {
                  $form = $this->createQuestionForm(null);
                  $form->handleRequest($request);
          
          
          Severity: Minor
          Found in src/Question/Controllers/QuestionViewController.php - About 1 hr to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            <?php declare(strict_types=1);
            
            namespace VSV\GVQ_API\Partner\Serializers;
            
            use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
            Severity: Major
            Found in src/Partner/Serializers/PartnerNormalizer.php and 1 other location - About 1 hr to fix
            src/Company/Serializers/TranslatedAliasNormalizer.php on lines 1..30

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 111.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            <?php declare(strict_types=1);
            
            namespace VSV\GVQ_API\Company\Serializers;
            
            use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
            Severity: Major
            Found in src/Company/Serializers/TranslatedAliasNormalizer.php and 1 other location - About 1 hr to fix
            src/Partner/Serializers/PartnerNormalizer.php on lines 1..30

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 111.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    $$$1(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) {
                      var margin = $$$1(element).data('margin-right');
            
                      if (typeof margin !== 'undefined') {
                        $$$1(element).css('margin-right', margin).removeData('margin-right');
            Severity: Major
            Found in public/js/bootstrap.js and 1 other location - About 1 hr to fix
            public/js/bootstrap.js on lines 2336..2342

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 65.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    $$$1(Selector.FIXED_CONTENT).each(function (index, element) {
                      var padding = $$$1(element).data('padding-right');
            
                      if (typeof padding !== 'undefined') {
                        $$$1(element).css('padding-right', padding).removeData('padding-right');
            Severity: Major
            Found in public/js/bootstrap.js and 1 other location - About 1 hr to fix
            public/js/bootstrap.js on lines 2344..2350

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 65.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Function ajaxHandleResponses has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function ajaxHandleResponses( s, jqXHR, responses ) {
            
                var ct, type, finalDataType, firstDataType,
                    contents = s.contents,
                    dataTypes = s.dataTypes;
            Severity: Minor
            Found in public/js/jquery.js - About 1 hr to fix

              Function slugify has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function slugify(text) {
                  text = text.toString().toLowerCase().trim();
              
                  const sets = [
                      {to: 'a', from: '[ÀÁÂÃÄÅÆĀĂĄẠẢẤẦẨẪẬẮẰẲẴẶ]'},
              Severity: Minor
              Found in public/js/slugify.js - About 1 hr to fix

                Method getDetailedTopScoreAverages has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getDetailedTopScoreAverages(): array
                    {
                        $averages = [];
                
                        foreach ($this->statisticsKeys as $statisticsKey) {
                Severity: Minor
                Found in src/Statistics/Service/StatisticsService.php - About 1 hr to fix

                  Method registerIframe has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function registerIframe(Request $request): Response
                      {
                          if (!$this->canRegister()) {
                              return new Response('', Response::HTTP_FORBIDDEN);
                          }
                  Severity: Minor
                  Found in src/Account/Controllers/AccountViewController.php - About 1 hr to fix

                    Method register has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function register(Request $request): Response
                        {
                            if (!$this->canRegister()) {
                                return new Response('', Response::HTTP_FORBIDDEN);
                            }
                    Severity: Minor
                    Found in src/Account/Controllers/AccountViewController.php - About 1 hr to fix

                      Method normalize has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function normalize($quiz, $format = null, array $context = []): array
                          {
                              $questions = array_map(
                                  function (Question $question) use ($format) {
                                      return $this->questionNormalizer->normalize(
                      Severity: Minor
                      Found in src/Quiz/Serializers/QuizNormalizer.php - About 1 hr to fix

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                            public function __construct(
                                UuidFactoryInterface $uuidFactory,
                                UserRepository $userRepository,
                                SerializerInterface $serializer,
                                TranslatorInterface $translator,
                        Severity: Major
                        Found in src/User/Controllers/UserViewController.php and 1 other location - About 1 hr to fix
                        src/Question/Controllers/QuestionViewController.php on lines 67..82

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 110.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                            public function __construct(
                                UuidFactoryInterface $uuidFactory,
                                QuestionRepository $questionRepository,
                                CategoryRepository $categoryRepository,
                                ImageController $imageController,
                        Severity: Major
                        Found in src/Question/Controllers/QuestionViewController.php and 1 other location - About 1 hr to fix
                        src/User/Controllers/UserViewController.php on lines 69..84

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 110.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Function boxModelAdjustment has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
                            var i = dimension === "width" ? 1 : 0,
                                extra = 0,
                                delta = 0;
                        
                        
                        Severity: Minor
                        Found in public/js/jquery.js - About 1 hr to fix

                          Function mightThrow has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                                          mightThrow = function() {
                                                              var returned, then;
                          
                                                              // Support: Promises/A+ section 2.3.3.3.3
                                                              // https://promisesaplus.com/#point-59
                          Severity: Minor
                          Found in public/js/jquery.js - About 1 hr to fix

                            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
                              Severity
                              Category
                              Status
                              Source
                              Language