DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function scanFile has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
Open

    final public function scanFile($Offset, $Length = null)
    {

        for ($RunHeight = ( 1 + $Offset ); $RunHeight <= ( $Length ? ( $Offset + $Length ) : $this->SizeHeight ); $RunHeight++) {

Severity: Minor
Found in Application/Transfer/Gateway/Converter/AbstractConverter.php - About 1 day 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 updateStudentGeneral has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateStudentGeneral(TblPerson $tblPerson, $Meta)
    {

        // Student mit Automatischer Schülernummer anlegen falls noch nicht vorhanden
        $tblStudent = $tblPerson->getStudent(true);
Severity: Minor
Found in Application/People/Meta/Student/Service.php - About 1 day 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 updateStudentSubject has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateStudentSubject(TblPerson $tblPerson, $Meta)
    {

        // Student mit Automatischer Schülernummer anlegen falls noch nicht vorhanden
        $tblStudent = $tblPerson->getStudent(true);
Severity: Minor
Found in Application/People/Meta/Student/Service.php - About 1 day 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 createTest has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
Open

    public function createTest(IFormInterface $Stage = null, $DivisionSubjectId = null, $Test = null, $BasicRoute)
    {

        /**
         * Skip to Frontend
Severity: Minor
Found in Application/Education/Graduation/Evaluation/Service.php - About 1 day 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 getTemplateInformation has 243 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function getTemplateInformation(
        TblPrepareCertificate $tblPrepareCertificate,
        TblPerson $tblPerson,
        &$studentTable,
        &$columnTable,
Severity: Major
Found in Application/Education/Certificate/Prepare/Frontend.php - About 1 day to fix

    File Service.php has 571 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    namespace SPHERE\Application\Reporting\Dynamic;
    
    use SPHERE\Application\Platform\Gatekeeper\Authorization\Account\Account;
    use SPHERE\Application\Platform\Gatekeeper\Authorization\Account\Service\Entity\TblAccount;
    Severity: Major
    Found in Application/Reporting/Dynamic/Service.php - About 1 day to fix

      Method getContent has 242 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/KamenzReportGym/B02.php - About 1 day to fix

        Method createStudentsFromFile has 242 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function createStudentsFromFile(
                IFormInterface $Form = null,
                UploadedFile $File = null,
                $DivisionId = null
            ) {
        Severity: Major
        Found in Application/Transfer/Import/Chemnitz/Service.php - About 1 day to fix

          Method tablePerson has 241 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function tablePerson($DivisionSubjectId = null)
              {
          
                  // get Content
                  $tblDivisionSubject = DivisionApplication::useService()->getDivisionSubjectById($DivisionSubjectId);
          Severity: Major
          Found in Application/Api/Education/Division/StudentGroupSelect.php - About 1 day to fix

            Method getContent has 241 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/KamenzReportGym/E06.php - About 1 day to fix

              Method calcStudentGrade has 241 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function calcStudentGrade(
                      TblPerson $tblPerson,
                      TblDivision $tblDivision,
                      TblSubject $tblSubject,
                      TblTestType $tblTestType,
              Severity: Major
              Found in Application/Education/Graduation/Gradebook/Service.php - About 1 day to fix

                Method updateGradeToTest has 241 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function updateGradeToTest(
                        IFormInterface $Stage = null,
                        $TestId = null,
                        $Grade = null,
                        $BasicRoute,
                Severity: Major
                Found in Application/Education/Graduation/Gradebook/Service.php - About 1 day to fix

                  Method buildPages has 240 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function buildPages(TblPerson $tblPerson = null)
                      {
                  
                          $personId = $tblPerson ? $tblPerson->getId() : 0;
                          $headerHeight = '110px';

                    File Service.php has 566 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    namespace SPHERE\Application\Transfer\Import\Coswig;
                    
                    
                    
                    Severity: Major
                    Found in Application/Transfer/Import/Coswig/Service.php - About 1 day to fix

                      Function formatFilterListMessages has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private static function formatFilterListMessages($list, $contentTable, &$count, $countMessages)
                          {
                      
                              $hasEditButton = true;
                              $tblStudentGroup = Group::useService()->getGroupByMetaTable('STUDENT');
                      Severity: Minor
                      Found in Application/Education/Lesson/Division/Filter/Service.php - About 1 day 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 getPersonListByRadebeul has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function getPersonListByRadebeul()
                          {
                      
                              $StudentList = array();
                              $tblDivisionList = array();
                      Severity: Minor
                      Found in Application/Document/Custom/Radebeul/Radebeul.php - About 1 day 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 buildPages has 239 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function buildPages(TblPerson $tblPerson = null)
                          {
                      
                              $personId = $tblPerson ? $tblPerson->getId() : 0;
                      
                      

                        File RadebeulOsJahreszeugnis.php has 563 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /**
                         * Created by PhpStorm.
                         * User: Kauschke
                         * Date: 15.11.2018

                          File Service.php has 563 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          namespace SPHERE\Application\Education\Lesson\Term;
                          
                          use SPHERE\Application\Education\Lesson\Term\Service\Data;
                          use SPHERE\Application\Education\Lesson\Term\Service\Entity\TblHoliday;
                          Severity: Major
                          Found in Application/Education/Lesson/Term/Service.php - About 1 day to fix

                            Function createGroupListExcel has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function createGroupListExcel($PersonList, $tblPersonList, $GroupId)
                                {
                            
                                    $tblGroup = Group::useService()->getGroupById($GroupId);
                                    if (!empty($PersonList) && $tblGroup) {
                            Severity: Minor
                            Found in Application/Reporting/Standard/Person/Service.php - About 1 day 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