VSVverkeerskunde/gvq-api

View on GitHub

Showing 1,426 of 1,426 total issues

Function renderView has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function renderView (viewName, quizId, questionNr, answerId, scroll) {
Severity: Minor
Found in public/js/quiz.js - About 35 mins to fix

    Method getTraversableDomainMessages has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            array $types = [],
            int $firstId = null,
            int $lastId = null,
            callable $eventEntityFeedback = null,
            string $uuidStart = null
    Severity: Minor
    Found in src/Quiz/EventStore/DoctrineEventStore.php - About 35 mins to fix

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

              UuidFactoryInterface $uuidFactory,
              QuestionRepository $questionRepository,
              CategoryRepository $categoryRepository,
              ImageController $imageController,
              TranslatorInterface $translator
      Severity: Minor
      Found in src/Question/Controllers/QuestionViewController.php - About 35 mins to fix

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

                UuidFactoryInterface $uuidFactory,
                UserRepository $userRepository,
                SerializerInterface $serializer,
                TranslatorInterface $translator,
                ResponseFactory $responseFactory
        Severity: Minor
        Found in src/User/Controllers/UserViewController.php - About 35 mins to fix

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

                  iterable $companies,
                  CompanyPlayedQuizzesRepository $companyPlayedQuizzesRepository,
                  EmployeeParticipationRepository $employeeParticipationRepository,
                  TopScoreRepository $topScoreRepository,
                  NormalizerInterface $normalizer
          Severity: Minor
          Found in src/Company/CompaniesCsvData.php - About 35 mins to fix

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

                    CompanyQuestionDifficultyRepositoryFactory $questionDifficultyRepositoryFactory,
                    CompanyQuestionCounterRepositoryFactory $questionAnsweredCorrectRepositoryFactory,
                    CompanyQuestionCounterRepositoryFactory $questionAnsweredInCorrectRepositoryFactory,
                    QuizRepository $quizRepository,
                    EmployeeParticipationRepository $employeeParticipationRepository
            Severity: Minor
            Found in src/Statistics/Projectors/CompanyQuestionDifficultyProjector.php - About 35 mins to fix

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

                      \Redis $redis,
                      QuestionCounterRepository $answeredCorrectRepository,
                      QuestionCounterRepository $answeredInCorrectRepository,
                      QuestionRepository $questionRepository,
                      NotEmptyString $keyPrefix = null
              Severity: Minor
              Found in src/Statistics/Repositories/QuestionDifficultyRedisRepository.php - About 35 mins to fix

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

                      _proto.dispose = function dispose() {
                        $$$1.removeData(this._element, DATA_KEY);
                        this._element = null;
                      }; // Private
                Severity: Minor
                Found in public/js/bootstrap.js and 2 other locations - About 35 mins to fix
                public/js/bootstrap.js on lines 268..271
                public/js/bootstrap.js on lines 474..477

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

                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 (active && isTransitioning) {
                          var transitionDuration = Util.getTransitionDurationFromElement(active);
                          $$$1(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
                        } else {
                          complete();
                Severity: Minor
                Found in public/js/bootstrap.js and 1 other location - About 35 mins to fix
                public/js/bootstrap.js on lines 2794..2799

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

                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.tip).hasClass(ClassName.FADE)) {
                          var transitionDuration = Util.getTransitionDurationFromElement(tip);
                          $$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
                        } else {
                          complete();
                Severity: Minor
                Found in public/js/bootstrap.js and 1 other location - About 35 mins to fix
                public/js/bootstrap.js on lines 3781..3786

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

                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

                        this.timeoutId_ = setTimeout($.proxy(this.fitHeader, this), this.$el.is(':hidden') ? 100 : 0);
                Severity: Minor
                Found in public/js/bootstrap-table.js and 1 other location - About 35 mins to fix
                public/js/bootstrap-table.js on lines 2369..2370

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

                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(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
                Severity: Minor
                Found in public/js/bootstrap.js and 1 other location - About 35 mins to fix
                public/js/bootstrap.js on lines 1249..1249

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

                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 ( data === undefined ) {
                            // Get
                            return ctx.length && this.length ?
                                ctx[0].aoData[ this[0] ]._aData :
                                undefined;
                Severity: Minor
                Found in public/js/jquery.dataTables.js and 1 other location - About 35 mins to fix
                public/js/jquery.dataTables.js on lines 8310..8327

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

                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

                      _proto.dispose = function dispose() {
                        $$$1.removeData(this._element, DATA_KEY);
                        this._element = null;
                      }; // Private
                Severity: Minor
                Found in public/js/bootstrap.js and 2 other locations - About 35 mins to fix
                public/js/bootstrap.js on lines 474..477
                public/js/bootstrap.js on lines 3757..3760

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

                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

                        this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this),
                            this.$el.is(':hidden') ? 100 : 0);
                Severity: Minor
                Found in public/js/bootstrap-table.js and 1 other location - About 35 mins to fix
                public/js/bootstrap-table.js on lines 2229..2229

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

                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 ( data === undefined ) {
                            // get
                            return ctx.length && this.length ?
                                ctx[0].aoData[ this[0] ]._details :
                                undefined;
                Severity: Minor
                Found in public/js/jquery.dataTables.js and 1 other location - About 35 mins to fix
                public/js/jquery.dataTables.js on lines 8106..8111

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

                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(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
                Severity: Minor
                Found in public/js/bootstrap.js and 1 other location - About 35 mins to fix
                public/js/bootstrap.js on lines 1194..1194

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

                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

                      _proto.dispose = function dispose() {
                        $$$1.removeData(this._element, DATA_KEY);
                        this._element = null;
                      }; // Static
                Severity: Minor
                Found in public/js/bootstrap.js and 2 other locations - About 35 mins to fix
                public/js/bootstrap.js on lines 268..271
                public/js/bootstrap.js on lines 3757..3760

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

                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 activate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function activate(string $urlSuffix): Response
                    {
                        $registration = $this->registrationRepository->getByUrlSuffix(
                            new UrlSuffix($urlSuffix)
                        );
                Severity: Minor
                Found in src/Account/Controllers/AccountViewController.php - About 35 mins 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 canPlayQuiz has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                Open

                    private function canPlayQuiz(): bool
                    {
                        if ($this->allowAnonymous) {
                            return true;
                        } else {
                Severity: Minor
                Found in src/Quiz/Controllers/QuizViewController.php - About 35 mins 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

                Severity
                Category
                Status
                Source
                Language