DerDu/SPHERE-Framework

View on GitHub

Showing 7,620 of 7,620 total issues

Function contentEditTestGrade has a Cognitive Complexity of 369 (exceeds 5 allowed). Consider refactoring.
Open

    private function contentEditTestGrade(Stage $Stage, TblTest $tblTest, $Grade, $BasicRoute, $IsEdit = false)
    {

        if (!$tblTest->getServiceTblDivision()) {
            return new Danger(new Ban() . ' Klasse nicht gefunden')
Severity: Minor
Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 wk 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

File Certificate.php has 2679 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Api\Education\Certificate\Generator;

use MOC\V\Component\Template\Component\IBridgeInterface;
Severity: Major
Found in Application/Api/Education/Certificate/Generator/Certificate.php - About 1 wk to fix

    Function createSerialLetterExcel has a Cognitive Complexity of 365 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createSerialLetterExcel(TblSerialLetter $tblSerialLetter)
        {
    
            $tblPersonList = $this->getPersonAllBySerialLetter($tblSerialLetter);
            $ExportData = array();
    Severity: Minor
    Found in Application/Reporting/SerialLetter/Service.php - About 1 wk 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 createDivisionReportExcel has a Cognitive Complexity of 364 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createDivisionReportExcel()
        {
    
            $tblYearList = false;
            $DataContent = array();
    Severity: Minor
    Found in Application/Reporting/DeclarationBasis/Service.php - About 1 wk 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

    File Frontend.php has 2670 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    namespace SPHERE\Application\Reporting\SerialLetter;
    
    use SPHERE\Application\Api\Reporting\SerialLetter\ApiSerialLetter;
    use SPHERE\Application\Contact\Address\Address;
    Severity: Major
    Found in Application/Reporting/SerialLetter/Frontend.php - About 1 wk to fix

      Function createStudentsFromFile has a Cognitive Complexity of 363 (exceeds 5 allowed). Consider refactoring.
      Open

          public function createStudentsFromFile(
              IFormInterface $Form = null,
              UploadedFile $File = null
          ) {
      
      
      Severity: Minor
      Found in Application/Transfer/Import/Seelitz/Service.php - About 1 wk 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

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

          public function frontendCustodyAdd($Id = null, $PersonId = null, $Remove = null, $Description = null)
          {
      
              $tblDivision = $Id === null ? false : Division::useService()->getDivisionById($Id);
              if (!$tblDivision) {
      Severity: Major
      Found in Application/Education/Lesson/Division/Frontend.php and 1 other location - About 1 wk to fix
      Application/Education/Lesson/Division/Frontend.php on lines 438..593

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

      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 frontendTeacherAdd($Id = null, $TeacherId = null, $Remove = null, $Description = null)
          {
      
              $tblDivision = $Id === null ? false : Division::useService()->getDivisionById($Id);
              if (!$tblDivision) {
      Severity: Major
      Found in Application/Education/Lesson/Division/Frontend.php and 1 other location - About 1 wk to fix
      Application/Education/Lesson/Division/Frontend.php on lines 603..757

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

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

          public function createInterestedPersonsFromFile(
              IFormInterface $Form = null,
              UploadedFile $File = null
          ) {
      
      
      Severity: Minor
      Found in Application/Transfer/Import/BadDueben/Service.php - About 1 wk 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 setGradeOverviewForTask has a Cognitive Complexity of 350 (exceeds 5 allowed). Consider refactoring.
      Open

          private function setGradeOverviewForTask(
              TblTask $tblTask,
              $divisionList,
              $tableHeaderList,
              $studentList,
      Severity: Minor
      Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 wk 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 createStudentsFromFile has a Cognitive Complexity of 348 (exceeds 5 allowed). Consider refactoring.
      Open

          public function createStudentsFromFile(
              IFormInterface $Form = null,
              UploadedFile $File = null
          ) {
      
      
      Severity: Minor
      Found in Application/Transfer/Import/Schulstiftung/Service.php - About 1 wk 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

      Method getContent has 1399 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function getContent()
          {
              $sliceList = array();
      
              $sliceList[] = (new Slice())
      Severity: Major
      Found in Application/Api/Document/Standard/Repository/KamenzReport/E07.php - About 6 days to fix

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

        <?php
        /**
         * Created by PhpStorm.
         * User: lehmann
         * Date: 23.06.2017
        Application/Api/Document/Standard/Repository/KamenzReportGS/E02_1.php on lines 1..347

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

        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
        /**
         * Created by PhpStorm.
         * User: Kauschke
         * Date: 05.09.2018
        Application/Api/Document/Standard/Repository/KamenzReportGS/E02.php on lines 1..344

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

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

            public function createStudentsFromFile(
                IFormInterface $Form = null,
                UploadedFile $File = null,
                $TypeId = null,
                $YearId = null
        Severity: Minor
        Found in Application/Transfer/Import/FuxMedia/Service.php - About 6 days 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

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

                    ->addSlice((new Slice())
                        ->addSection((new Section())
                            ->addElementColumn(
                                ($this->isSample()
                                    ? $Header
        Application/Api/Education/Certificate/Generator/Repository/FESH/HorHjOne.php on lines 49..293

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

        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

                    ->addSlice((new Slice())
                        ->addSection((new Section())
                            ->addElementColumn(
                                ($this->isSample()
                                    ? $Header
        Application/Api/Education/Certificate/Generator/Repository/FESH/HorJOne.php on lines 48..295

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

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

            public function frontendDivisionShow($Id = null)
            {
        
                $Stage = new Stage('Klassenansicht', 'Übersicht');
                $Stage->addButton(new Standard('Zurück', '/Education/Lesson/Division', new ChevronLeft()));
        Severity: Minor
        Found in Application/Education/Lesson/Division/Frontend.php - About 6 days 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 frontendPreparePreview has a Cognitive Complexity of 321 (exceeds 5 allowed). Consider refactoring.
        Open

            public function frontendPreparePreview(
                $PrepareId = null,
                $Route = 'Teacher',
                $GroupId = false
            ) {
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/Frontend.php - About 6 days 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 contentSelectedGradeBook has a Cognitive Complexity of 318 (exceeds 5 allowed). Consider refactoring.
        Open

            private function contentSelectedGradeBook(
                Stage $Stage,
                TblDivisionSubject $tblDivisionSubject,
                $BasicRoute
            ) {
        Severity: Minor
        Found in Application/Education/Graduation/Gradebook/Frontend.php - About 6 days 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