VSVverkeerskunde/gvq-api

View on GitHub

Showing 1,426 of 1,426 total issues

Method getParticipantsInTeam has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getParticipantsInTeam(UuidInterface $teamId): \Traversable
    {
        $batchSize = 10;
        $firstResult = 0;

Severity: Minor
Found in src/Contest/Repositories/ContestParticipationDoctrineRepository.php - About 1 hr to fix

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

        public function normalize($company, $format = null, array $context = array()): array
        {
            $aliases = array_map(
                function (TranslatedAlias $translatedAlias) use ($format) {
                    return $this->translatedAliasNormalizer->normalize(
    Severity: Minor
    Found in src/Company/Serializers/CompanyNormalizer.php - About 1 hr to fix

      Method getValues has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function getValues(Company $company)
          {
              $data = $this->normalizer->normalize($company);
      
              $values = [];
      Severity: Minor
      Found in src/Company/CompaniesCsvData.php - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

            if ( support.matchesSelector && documentIsHTML &&
                !compilerCache[ expr + " " ] &&
                ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
                ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
        
        
        Severity: Major
        Found in public/js/jquery.js - About 1 hr to fix

          Identical blocks of code found in 6 locations. Consider refactoring.
          Open

                    if (typeof config === 'string') {
                      if (typeof data[config] === 'undefined') {
                        throw new TypeError("No method named \"" + config + "\"");
                      }
          
          
          Severity: Major
          Found in public/js/bootstrap.js and 5 other locations - About 1 hr to fix
          public/js/bootstrap.js on lines 1338..1344
          public/js/bootstrap.js on lines 1705..1711
          public/js/bootstrap.js on lines 3062..3068
          public/js/bootstrap.js on lines 3258..3264
          public/js/bootstrap.js on lines 3838..3844

          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 55.

          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

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

                  QuizService $quizService,
                  CompanyRepository $companyRepository,
                  PartnerRepository $partnerRepository,
                  TeamRepository $teamRepository,
                  AnswerRepository $answerRepository,
          Severity: Major
          Found in src/Quiz/Controllers/QuizController.php - About 1 hr to fix

            Identical blocks of code found in 6 locations. Consider refactoring.
            Open

                      if (typeof config === 'string') {
                        if (typeof data[config] === 'undefined') {
                          throw new TypeError("No method named \"" + config + "\"");
                        }
            
            
            Severity: Major
            Found in public/js/bootstrap.js and 5 other locations - About 1 hr to fix
            public/js/bootstrap.js on lines 1338..1344
            public/js/bootstrap.js on lines 1705..1711
            public/js/bootstrap.js on lines 3062..3068
            public/js/bootstrap.js on lines 3581..3587
            public/js/bootstrap.js on lines 3838..3844

            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 55.

            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

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

                    string $id,
                    string $email,
                    string $lastName,
                    string $firstName,
                    string $role,
            Severity: Major
            Found in src/User/Repositories/Entities/UserEntity.php - About 1 hr to fix

              Identical blocks of code found in 6 locations. Consider refactoring.
              Open

                        if (typeof config === 'string') {
                          if (typeof data[config] === 'undefined') {
                            throw new TypeError("No method named \"" + config + "\"");
                          }
              
              
              Severity: Major
              Found in public/js/bootstrap.js and 5 other locations - About 1 hr to fix
              public/js/bootstrap.js on lines 1705..1711
              public/js/bootstrap.js on lines 3062..3068
              public/js/bootstrap.js on lines 3258..3264
              public/js/bootstrap.js on lines 3581..3587
              public/js/bootstrap.js on lines 3838..3844

              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 55.

              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

              Identical blocks of code found in 6 locations. Consider refactoring.
              Open

                        if (typeof config === 'string') {
                          if (typeof data[config] === 'undefined') {
                            throw new TypeError("No method named \"" + config + "\"");
                          }
              
              
              Severity: Major
              Found in public/js/bootstrap.js and 5 other locations - About 1 hr to fix
              public/js/bootstrap.js on lines 1338..1344
              public/js/bootstrap.js on lines 3062..3068
              public/js/bootstrap.js on lines 3258..3264
              public/js/bootstrap.js on lines 3581..3587
              public/js/bootstrap.js on lines 3838..3844

              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 55.

              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

              Identical blocks of code found in 6 locations. Consider refactoring.
              Open

                        if (typeof config === 'string') {
                          if (typeof data[config] === 'undefined') {
                            throw new TypeError("No method named \"" + config + "\"");
                          }
              
              
              Severity: Major
              Found in public/js/bootstrap.js and 5 other locations - About 1 hr to fix
              public/js/bootstrap.js on lines 1338..1344
              public/js/bootstrap.js on lines 1705..1711
              public/js/bootstrap.js on lines 3062..3068
              public/js/bootstrap.js on lines 3258..3264
              public/js/bootstrap.js on lines 3581..3587

              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 55.

              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

              Identical blocks of code found in 6 locations. Consider refactoring.
              Open

                        if (typeof config === 'string') {
                          if (typeof data[config] === 'undefined') {
                            throw new TypeError("No method named \"" + config + "\"");
                          }
              
              
              Severity: Major
              Found in public/js/bootstrap.js and 5 other locations - About 1 hr to fix
              public/js/bootstrap.js on lines 1338..1344
              public/js/bootstrap.js on lines 1705..1711
              public/js/bootstrap.js on lines 3258..3264
              public/js/bootstrap.js on lines 3581..3587
              public/js/bootstrap.js on lines 3838..3844

              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 55.

              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

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

                          if (style && style.css) {
                              for (key in style.css) {
                                  csses.push(key + ': ' + style.css[key]);
                              }
                          }
              Severity: Major
              Found in public/js/bootstrap-table.js and 1 other location - About 1 hr to fix
              public/js/bootstrap-table.js on lines 1711..1715

              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 55.

              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

                          _fnApplyToChildren( function(nSizer) {
                              footerContent.push( nSizer.innerHTML );
                              footerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
                          }, footerSrcEls );
              Severity: Major
              Found in public/js/jquery.dataTables.js and 1 other location - About 1 hr to fix
              public/js/jquery.dataTables.js on lines 5320..5323

              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 55.

              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

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

                      if (style && style.css) {
                          for (key in style.css) {
                              csses.push(key + ': ' + style.css[key]);
                          }
                      }
              Severity: Major
              Found in public/js/bootstrap-table.js and 1 other location - About 1 hr to fix
              public/js/bootstrap-table.js on lines 2349..2353

              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 55.

              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

                      _fnApplyToChildren( function(nSizer) {
                          headerContent.push( nSizer.innerHTML );
                          headerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
                      }, headerSrcEls );
              Severity: Major
              Found in public/js/jquery.dataTables.js and 1 other location - About 1 hr to fix
              public/js/jquery.dataTables.js on lines 5341..5344

              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 55.

              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 3 locations. Consider refactoring.
              Open

              <?php declare(strict_types=1);
              
              namespace VSV\GVQ_API\Team\Serializers;
              
              use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
              Severity: Major
              Found in src/Team/Serializers/TeamNormalizer.php and 2 other locations - About 1 hr to fix
              src/Question/Serializers/CategoryNormalizer.php on lines 1..29
              src/Quiz/Serializers/EmailRegisteredNormalizer.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 100.

              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 3 locations. Consider refactoring.
              Open

              <?php declare(strict_types=1);
              
              namespace VSV\GVQ_API\Question\Serializers;
              
              use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
              Severity: Major
              Found in src/Question/Serializers/CategoryNormalizer.php and 2 other locations - About 1 hr to fix
              src/Quiz/Serializers/EmailRegisteredNormalizer.php on lines 1..30
              src/Team/Serializers/TeamNormalizer.php on lines 1..29

              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 100.

              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 3 locations. Consider refactoring.
              Open

              <?php declare(strict_types=1);
              
              namespace VSV\GVQ_API\Quiz\Serializers;
              
              use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
              Severity: Major
              Found in src/Quiz/Serializers/EmailRegisteredNormalizer.php and 2 other locations - About 1 hr to fix
              src/Question/Serializers/CategoryNormalizer.php on lines 1..29
              src/Team/Serializers/TeamNormalizer.php on lines 1..29

              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 100.

              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 4 locations. Consider refactoring.
              Open

                    _createClass(Collapse, null, [{
                      key: "VERSION",
                      get: function get() {
                        return VERSION;
                      }
              Severity: Major
              Found in public/js/bootstrap.js and 3 other locations - About 55 mins to fix
              public/js/bootstrap.js on lines 996..1006
              public/js/bootstrap.js on lines 2393..2403
              public/js/bootstrap.js on lines 3591..3601

              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 54.

              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

              Severity
              Category
              Status
              Source
              Language