VSVverkeerskunde/gvq-api

View on GitHub

Showing 1,426 of 1,426 total issues

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

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        /** @var TranslatorInterface $translator */
        $translator = $options['translator'];

Severity: Major
Found in src/Contest/Forms/ContestFormType.php - About 3 hrs to fix

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

              $$$1(Selector.STICKY_CONTENT).each(function (index, element) {
                var actualMargin = $$$1(element)[0].style.marginRight;
                var calculatedMargin = $$$1(element).css('margin-right');
                $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
              }); // Adjust navbar-toggler margin
    Severity: Major
    Found in public/js/bootstrap.js and 1 other location - About 3 hrs to fix
    public/js/bootstrap.js on lines 2322..2326

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

    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.NAVBAR_TOGGLER).each(function (index, element) {
                var actualMargin = $$$1(element)[0].style.marginRight;
                var calculatedMargin = $$$1(element).css('margin-right');
                $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px");
              }); // Adjust body padding
    Severity: Major
    Found in public/js/bootstrap.js and 1 other location - About 3 hrs to fix
    public/js/bootstrap.js on lines 2316..2320

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

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

    function Animation( elem, properties, options ) {
        var result,
            stopped,
            index = 0,
            length = Animation.prefilters.length,
    Severity: Major
    Found in public/js/jquery.js - About 3 hrs to fix

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

          public function sendKickOffMailAfterLaunch(Registration $registration): void
          {
              $subjectId = 'Kickoff.after.launch.mail.subject';
              $templateName = 'kick_off_after_launch';
              $templateParameters = $this->generateKickOffTemplateParameters($registration);
      Severity: Major
      Found in src/Mail/Service/SwiftMailService.php and 1 other location - About 3 hrs to fix
      src/Mail/Service/SwiftMailService.php on lines 151..171

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

      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 sendKickOffMail(Registration $registration): void
          {
              $subjectId = 'Kickoff.mail.subject';
              $templateName = 'kick_off';
              $templateParameters = $this->generateKickOffTemplateParameters($registration);
      Severity: Major
      Found in src/Mail/Service/SwiftMailService.php and 1 other location - About 3 hrs to fix
      src/Mail/Service/SwiftMailService.php on lines 125..145

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

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

          trigger: function( event, data, elem, onlyHandlers ) {
      
              var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
                  eventPath = [ elem || document ],
                  type = hasOwn.call( event, "type" ) ? event.type : event,
      Severity: Major
      Found in public/js/jquery.js - About 3 hrs to fix

        Function Util has 94 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var Util = function ($$$1) {
            /**
             * ------------------------------------------------------------------------
             * Private TransitionEnd Helpers
             * ------------------------------------------------------------------------
        Severity: Major
        Found in public/js/bootstrap.js - About 3 hrs to fix

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

          <?php declare(strict_types=1);
          
          namespace VSV\GVQ_API\Contest\Serializers;
          
          use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
          Severity: Major
          Found in src/Contest/Serializers/ContestParticipationsNormalizer.php and 3 other locations - About 3 hrs to fix
          src/Company/Serializers/CompaniesNormalizer.php on lines 1..45
          src/Statistics/Serializers/TopScoresNormalizer.php on lines 1..45
          src/User/Serializers/UsersNormalizer.php on lines 1..45

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

          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

          <?php declare(strict_types=1);
          
          namespace VSV\GVQ_API\Statistics\Serializers;
          
          use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
          Severity: Major
          Found in src/Statistics/Serializers/TopScoresNormalizer.php and 3 other locations - About 3 hrs to fix
          src/Company/Serializers/CompaniesNormalizer.php on lines 1..45
          src/Contest/Serializers/ContestParticipationsNormalizer.php on lines 1..50
          src/User/Serializers/UsersNormalizer.php on lines 1..45

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

          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

          <?php declare(strict_types=1);
          
          namespace VSV\GVQ_API\Company\Serializers;
          
          use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
          Severity: Major
          Found in src/Company/Serializers/CompaniesNormalizer.php and 3 other locations - About 3 hrs to fix
          src/Contest/Serializers/ContestParticipationsNormalizer.php on lines 1..50
          src/Statistics/Serializers/TopScoresNormalizer.php on lines 1..45
          src/User/Serializers/UsersNormalizer.php on lines 1..45

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

          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

          <?php declare(strict_types=1);
          
          namespace VSV\GVQ_API\User\Serializers;
          
          use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
          Severity: Major
          Found in src/User/Serializers/UsersNormalizer.php and 3 other locations - About 3 hrs to fix
          src/Company/Serializers/CompaniesNormalizer.php on lines 1..45
          src/Contest/Serializers/ContestParticipationsNormalizer.php on lines 1..50
          src/Statistics/Serializers/TopScoresNormalizer.php on lines 1..45

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

          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

                  if (this.options.showRefresh) {
                      html.push(sprintf('<button class="btn' +
                              sprintf(' btn-%s', this.options.buttonsClass) +
                              sprintf(' btn-%s', this.options.iconSize) +
                              '" type="button" name="refresh" aria-label="refresh" title="%s">',
          Severity: Major
          Found in public/js/bootstrap-table.js and 3 other locations - About 3 hrs to fix
          public/js/bootstrap-table.js on lines 1138..1146
          public/js/bootstrap-table.js on lines 1163..1171
          public/js/bootstrap-table.js on lines 1173..1181

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

          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

                  if (this.options.showFullscreen) {
                      html.push(sprintf('<button class="btn' +
                              sprintf(' btn-%s', this.options.buttonsClass) +
                              sprintf(' btn-%s', this.options.iconSize) +
                              '" type="button" name="fullscreen" aria-label="fullscreen" title="%s">',
          Severity: Major
          Found in public/js/bootstrap-table.js and 3 other locations - About 3 hrs to fix
          public/js/bootstrap-table.js on lines 1138..1146
          public/js/bootstrap-table.js on lines 1153..1161
          public/js/bootstrap-table.js on lines 1163..1171

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

          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

                  if (this.options.showPaginationSwitch) {
                      html.push(sprintf('<button class="btn' +
                              sprintf(' btn-%s', this.options.buttonsClass) +
                              sprintf(' btn-%s', this.options.iconSize) +
                              '" type="button" name="paginationSwitch" aria-label="pagination Switch" title="%s">',
          Severity: Major
          Found in public/js/bootstrap-table.js and 3 other locations - About 3 hrs to fix
          public/js/bootstrap-table.js on lines 1153..1161
          public/js/bootstrap-table.js on lines 1163..1171
          public/js/bootstrap-table.js on lines 1173..1181

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

          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

                  if (this.options.showToggle) {
                      html.push(sprintf('<button class="btn' +
                              sprintf(' btn-%s', this.options.buttonsClass) +
                              sprintf(' btn-%s', this.options.iconSize) +
                              '" type="button" name="toggle" aria-label="toggle" title="%s">',
          Severity: Major
          Found in public/js/bootstrap-table.js and 3 other locations - About 3 hrs to fix
          public/js/bootstrap-table.js on lines 1138..1146
          public/js/bootstrap-table.js on lines 1153..1161
          public/js/bootstrap-table.js on lines 1173..1181

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

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

              function _fnBuildAjax( oSettings, data, fn )
              {
                  // Compatibility with 1.9-, allow fnServerData and event to manipulate
                  _fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
              
          Severity: Major
          Found in public/js/jquery.dataTables.js - About 3 hrs to fix

            Function Popover has 91 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function (_Tooltip) {
                  _inheritsLoose(Popover, _Tooltip);
            
                  function Popover() {
                    return _Tooltip.apply(this, arguments) || this;
            Severity: Major
            Found in public/js/bootstrap.js - About 3 hrs to fix

              Function bootstrap has 90 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
                  var api     = new DataTable.Api( settings );
                  var classes = settings.oClasses;
                  var lang    = settings.oLanguage.oPaginate;
                  var aria = settings.oLanguage.oAria.paginate || {};
              Severity: Major
              Found in public/js/dataTables.bootstrap4.js - About 3 hrs to fix

                Function _fnColumnOptions has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function _fnColumnOptions( oSettings, iCol, oOptions )
                    {
                        var oCol = oSettings.aoColumns[ iCol ];
                        var oClasses = oSettings.oClasses;
                        var th = $(oCol.nTh);
                Severity: Major
                Found in public/js/jquery.dataTables.js - About 3 hrs to fix
                  Severity
                  Category
                  Status
                  Source
                  Language