DerDu/SPHERE-Framework

View on GitHub

Showing 7,620 of 7,620 total issues

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

<?php
namespace SPHERE\Application\Education\Graduation\Evaluation;

use DateTime;
use SPHERE\Application\Api\Education\Graduation\Evaluation\ApiEvaluation;
Severity: Major
Found in Application/Education/Graduation/Evaluation/Frontend.php - About 1 wk to fix

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

        public function getCMSOrientationStandard($personId, $TextSize = '14px', $IsGradeUnderlined = false)
        {
    
            $tblPerson = Person::useService()->getPersonById($personId);
    
    
    Application/Api/Education/Certificate/Generator/Certificate.php on lines 2181..2480

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

    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 getOrientationStandard($personId, $TextSize = '14px', $IsGradeUnderlined = false)
        {
    
            $tblPerson = Person::useService()->getPersonById($personId);
    
    
    Application/Api/Education/Certificate/Generator/Repository/CMS/CmsStyle.php on lines 447..747

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

    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 502 (exceeds 5 allowed). Consider refactoring.
    Open

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

        private function createExamsContent(
            $tblTestList,
            $IsFinalGrade,
            $studentTable,
            $tblCurrentSubject,
    Severity: Minor
    Found in Application/Education/Certificate/Prepare/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 Data.php has 3568 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    namespace SPHERE\Application\Education\Certificate\Generator\Service;
    
    use SPHERE\Application\Education\Certificate\Generator\Service\Entity\TblCertificate;
    use SPHERE\Application\Education\Certificate\Generator\Service\Entity\TblCertificateField;
    Severity: Major
    Found in Application/Education/Certificate/Generator/Service/Data.php - About 1 wk to fix

      Function createCheckListExcel has a Cognitive Complexity of 486 (exceeds 5 allowed). Consider refactoring.
      Open

          public function createCheckListExcel(
              TblList $tblList,
              $YearPersonId = null,
              $LevelPersonId = null,
              $SchoolOption1Id = null,
      Severity: Minor
      Found in Application/Reporting/CheckList/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 getStudentTableContent has a Cognitive Complexity of 482 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getStudentTableContent($Result, $Option = null, $PersonGroup = null)
          {
      
              $SearchResult = array();
              if (!empty($Result)) {
      Severity: Minor
      Found in Application/Reporting/Standard/Person/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 updateGroupFromFile has a Cognitive Complexity of 462 (exceeds 5 allowed). Consider refactoring.
      Open

          public function updateGroupFromFile(
              IFormInterface $Form = null,
              UploadedFile $File = null
          ) {
      
      
      Severity: Minor
      Found in Application/Transfer/Import/Dresden/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 Service.php has 3341 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * Created by PhpStorm.
       * User: Kauschke
       * Date: 12.07.2016
      Severity: Major
      Found in Application/Education/Certificate/Prepare/Service.php - About 1 wk to fix

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

            public function createStudentsFromFile(
                IFormInterface $Form = null,
                UploadedFile $File = null
            ) {
        
        
        Severity: Minor
        Found in Application/Transfer/Import/Coswig/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 createCertificateContent has a Cognitive Complexity of 434 (exceeds 5 allowed). Consider refactoring.
        Open

            private function createCertificateContent(
                TblPrepareCertificate $tblPrepare = null,
                TblLeaveStudent $tblLeaveStudent = null,
                TblPerson $tblPerson,
                $Content = array()
        Severity: Minor
        Found in Application/Education/Certificate/Prepare/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 frontendListObjectElementShow has a Cognitive Complexity of 421 (exceeds 5 allowed). Consider refactoring.
        Open

            public function frontendListObjectElementShow
            (
                $Id = null,
                $Filter = null,
        //        $Data = null,
        Severity: Minor
        Found in Application/Reporting/CheckList/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

        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/HorJ.php on lines 48..349

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

        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/HorHj.php on lines 48..346

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

        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

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

        <?php
        
        namespace SPHERE\Application\Education\Graduation\Gradebook;
        
        use SPHERE\Application\Api\Education\Graduation\Gradebook\ApiGradebook;
        Severity: Major
        Found in Application/Education/Graduation/Gradebook/Frontend.php - About 1 wk to fix

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

          <?php
          /**
           * Created by PhpStorm.
           * User: lehmann
           * Date: 27.06.2017
          Application/Api/Document/Standard/Repository/KamenzReportGym/E02.php on lines 1..318

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

          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: lehmann
           * Date: 27.06.2017
          Application/Api/Document/Standard/Repository/KamenzReportGym/E02_1.php on lines 1..320

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

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

              private static function setGraduate(
                  $tblPastYearList,
                  &$Content,
                  TblType $tblKamenzSchoolType
              ) {

          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 Service.php has 2714 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          namespace SPHERE\Application\Reporting\Standard\Person;
          
          use MOC\V\Component\Document\Component\Bridge\Repository\PhpExcel;
          Severity: Major
          Found in Application/Reporting/Standard/Person/Service.php - About 1 wk to fix
            Severity
            Category
            Status
            Source
            Language