VSVverkeerskunde/gvq-api

View on GitHub

Showing 1,426 of 1,426 total issues

Function initSort has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    BootstrapTable.prototype.initSort = function () {
        var that = this,
            name = this.options.sortName,
            order = this.options.sortOrder === 'desc' ? -1 : 1,
            index = $.inArray(this.options.sortName, this.header.fields),
Severity: Major
Found in public/js/bootstrap-table.js - About 2 hrs 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 Ramsey\Uuid\Uuid;
    Severity: Major
    Found in src/Partner/Serializers/PartnerDenormalizer.php and 1 other location - About 2 hrs to fix
    src/Company/Serializers/TranslatedAliasDenormalizer.php on lines 1..32

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

    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 Ramsey\Uuid\Uuid;
    Severity: Major
    Found in src/Company/Serializers/TranslatedAliasDenormalizer.php and 1 other location - About 2 hrs to fix
    src/Partner/Serializers/PartnerDenormalizer.php on lines 1..32

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

    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 done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function done( status, nativeStatusText, responses, headers ) {
                var isSuccess, success, error, response, modified,
                    statusText = nativeStatusText;
    
                // Ignore repeat invocations
    Severity: Major
    Found in public/js/jquery.js - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                              if ( forward && useCache ) {
      
                                  // Seek `elem` from a previously-cached index
      
                                  // ...in a gzip-friendly way
      Severity: Critical
      Found in public/js/jquery.js - About 2 hrs to fix

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

                  if ($$$1(this.tip).hasClass(ClassName.FADE)) {
                    var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
                    $$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
                  } else {
                    complete();
        Severity: Major
        Found in public/js/bootstrap.js and 1 other location - About 2 hrs to fix
        public/js/bootstrap.js on lines 2264..2270

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

        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

                  if ($$$1(this._element).hasClass(ClassName.FADE)) {
                    var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
        
                    $$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
                  } else {
        Severity: Major
        Found in public/js/bootstrap.js and 1 other location - About 2 hrs to fix
        public/js/bootstrap.js on lines 2742..2747

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

        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 setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
            if ( postFilter && !postFilter[ expando ] ) {
                postFilter = setMatcher( postFilter );
            }
            if ( postFinder && !postFinder[ expando ] ) {
        Severity: Major
        Found in public/js/jquery.js - About 2 hrs to fix

          Function __column_selector has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var __column_selector = function ( settings, selector, opts )
              {
                  var
                      columns = settings.aoColumns,
                      names = _pluck( columns, 'sName' ),
          Severity: Major
          Found in public/js/jquery.dataTables.js - About 2 hrs to fix

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

                            foreach ($domainMessages as $domainMessage) {
                                $output->writeln(
                                    $index++.' - ' .$domainMessage->getId()
                                    .' - '.$domainMessage->getRecordedOn()->toString()
                                    .' - '.$domainMessage->getType()
            Severity: Major
            Found in src/Command/ReplayCommand.php and 1 other location - About 2 hrs to fix
            src/Command/ReplayCommand.php on lines 147..161

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

            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

                        foreach ($domainMessages as $domainMessage) {
                            $output->writeln(
                                $index++.' - ' .$domainMessage->getId()
                                .' - '.$domainMessage->getRecordedOn()->toString()
                                .' - '.$domainMessage->getType()
            Severity: Major
            Found in src/Command/ReplayCommand.php and 1 other location - About 2 hrs to fix
            src/Command/ReplayCommand.php on lines 121..135

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

            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 superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    superMatcher = function( seed, context, xml, results, outermost ) {
                        var elem, j, matcher,
                            matchedCount = 0,
                            i = "0",
                            unmatched = seed && [],
            Severity: Major
            Found in public/js/jquery.js - About 2 hrs to fix

              Function _fnDrawHead has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function _fnDrawHead( oSettings, aoSource, bIncludeHidden )
                  {
                      var i, iLen, j, jLen, k, kLen, n, nLocalTr;
                      var aoLocal = [];
                      var aApplied = [];
              Severity: Major
              Found in public/js/jquery.dataTables.js - About 2 hrs to fix

                Function fitHeader has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    BootstrapTable.prototype.fitHeader = function () {
                        var that = this,
                            fixedBody,
                            scrollWidth,
                            focused,
                Severity: Major
                Found in public/js/bootstrap-table.js - About 2 hrs to fix

                  Function execute has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function execute(
                          InputInterface $input,
                          OutputInterface $output
                      ): void {
                          $output->writeln('Start searching the event store...');
                  Severity: Minor
                  Found in src/Command/ListCommand.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 attach has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  var attach = function( container, buttons ) {
                                      var i, ien, node, button;
                                      var clickHandler = function ( e ) {
                                          _fnPageChange( settings, e.data.action, true );
                                      };
                  Severity: Major
                  Found in public/js/jquery.dataTables.js - About 2 hrs to fix

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

                        public function buildForm(FormBuilderInterface $builder, array $options)
                        {
                            /** @var Company $company */
                            $company = $options['company'];
                            /** @var TranslatorInterface $translator */
                    Severity: Major
                    Found in src/Company/Forms/CompanyFormType.php - About 2 hrs to fix

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

                          public function countPassedByCompanyAndLanguage(
                              UuidInterface $companyId,
                              Language $language
                          ): int {
                              $qb = $this->entityManager->createQueryBuilder();
                      src/Statistics/Repositories/EmployeeParticipationDoctrineRepository.php on lines 68..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 132.

                      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 countByCompanyAndLanguage(
                              UuidInterface $companyId,
                              Language $language
                          ): int {
                              $qb = $this->entityManager->createQueryBuilder();
                      src/Statistics/Repositories/EmployeeParticipationDoctrineRepository.php on lines 101..116

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

                      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 _fnLoadState has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function _fnLoadState ( settings, oInit, callback )
                          {
                              var i, ien;
                              var columns = settings.aoColumns;
                              var loaded = function ( s ) {
                      Severity: Major
                      Found in public/js/jquery.dataTables.js - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language