DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Method frontendListElementSelect has 87 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function frontendListElementSelect($Id = null, $Element = null)
    {

        $Stage = new Stage('Check-Listen', 'Elemente einer Check-Liste zuordnen');

Severity: Major
Found in Application/Reporting/CheckList/Frontend.php - About 3 hrs to fix

    Method getEditStudentTransferContent has 87 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getEditStudentTransferContent($PersonId = null)
        {
    
            $tblPerson = false;
            if ($PersonId && ($tblPerson = Person::useService()->getPersonById($PersonId))) {
    Severity: Major
    Found in Application/People/Person/Frontend/FrontendStudentTransfer.php - About 3 hrs to fix

      Method frontendHeadmasterDivisionList has 87 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function frontendHeadmasterDivisionList($IsAllYears = false, $IsGroup = false, $YearId = null)
          {
      
              $Stage = new Stage('Schülerübersicht', 'Klasse des Schülers Auswählen');
              $Stage->addButton(
      Severity: Major
      Found in Application/Education/Graduation/Gradebook/Frontend.php - About 3 hrs to fix

        Method updateAbiturPreliminaryGrades has 87 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function updateAbiturPreliminaryGrades(
                IFormInterface $Form = null,
                TblPerson $tblPerson,
                TblPrepareCertificate $tblPrepare,
                $GroupId = null,
        Severity: Major
        Found in Application/Education/Certificate/Prepare/Service.php - About 3 hrs to fix

          Method frontendHeadmasterSelectDivision has 87 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function frontendHeadmasterSelectDivision($IsAllYears = false, $IsGroup = false, $YearId = null)
              {
          
                  $Stage = new Stage('Zeugnisvorbereitung', 'Klasse auswählen');
                  $this->setHeaderButtonList($Stage, View::HEADMASTER);
          Severity: Major
          Found in Application/Education/Certificate/Prepare/Frontend.php - About 3 hrs to fix

            Method frontendSubjectAdd has 87 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function frontendSubjectAdd($Id = null, $IsHasGradingView = false, $Data = null)
                {
            
                    $tblDivision = $Id === null ? false : Division::useService()->getDivisionById($Id);
                    if (!$tblDivision) {
            Severity: Major
            Found in Application/Education/Lesson/Division/Frontend.php - About 3 hrs to fix

              Method setRepeatersFromCertificates has 87 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static function setRepeatersFromCertificates(&$Content, $tblPastYearList, TblType $tblKamenzSchoolType)
                  {
              
                      if ($tblPastYearList) {
                          foreach ($tblPastYearList as $tblPastYear) {
              Severity: Major
              Found in Application/Document/Generator/Service/Kamenz/KamenzReportService.php - About 3 hrs to fix

                File FrontendStudent.php has 311 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * Created by PhpStorm.
                 * User: Kauschke
                 * Date: 12.12.2018
                Severity: Minor
                Found in Application/People/Person/Frontend/FrontendStudent.php - About 3 hrs to fix

                  Method frontendCustodyAdd has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function frontendCustodyAdd($Person = null, $Year = null, $Division = null, $TypeId = null)
                      {
                          $Stage = new Stage('Sorgeberechtigten-Accounts', 'Erstellen');
                  
                          $form = $this->getCustodyFilterForm();
                  Severity: Major
                  Found in Application/Setting/User/Account/Frontend.php - About 3 hrs to fix

                    Method formDebtorNumber has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function formDebtorNumber($Identifier = '', $PersonId = '', $DebtorNumberId = '')
                        {
                    
                            // choose between Add and Edit
                            $SaveButton = new Primary('Speichern', self::getEndpoint(), new Save());
                    Severity: Major
                    Found in Application/Api/Billing/Accounting/ApiDebtor.php - About 3 hrs to fix

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

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

                        Method createElectiveClassListExcel has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function createElectiveClassListExcel($PersonList, $tblPersonList, $DivisionId)
                            {
                        
                                // get PersonList sorted by GradeBook
                                if (!empty($PersonList)) {
                        Severity: Major
                        Found in Application/Reporting/Standard/Person/Service.php - About 3 hrs to fix

                          Method frontendAppointmentGradeUpload has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function frontendAppointmentGradeUpload(
                                  UploadedFile $File = null,
                                  $Period = null,
                                  $TaskId = null
                              ) {
                          Severity: Major
                          Found in Application/Transfer/Indiware/Export/AppointmentGrade/Frontend.php - About 3 hrs to fix

                            Method frontendSaveRelationshipCustody has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function frontendSaveRelationshipCustody()
                                {
                                    $stage = new Stage('Einordnung der Sorgeberechtigten', 'nach S1, S2, S3');
                                    $stage->addButton(new Standard('Zurück', '/People/Group', new ChevronLeft()));
                            
                            
                            Severity: Major
                            Found in Application/People/Group/Frontend.php - About 3 hrs to fix

                              Method getSelectLeaveCertificateStage has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private function getSelectLeaveCertificateStage(
                                      TblPerson $tblPerson,
                                      TblDivision $tblDivision,
                                      TblType $tblType,
                                      TblCourse $tblCourse = null,
                              Severity: Major
                              Found in Application/Education/Certificate/Prepare/Frontend.php - About 3 hrs to fix

                                Method frontendDestroyAbsence has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function frontendDestroyAbsence($Id = null, $Confirm = false, $BasicRoute = '')
                                    {
                                
                                        $Stage = new Stage('Fehlzeit', 'Löschen');
                                
                                
                                Severity: Major
                                Found in Application/Education/ClassRegister/Absence/Frontend.php - About 3 hrs to fix

                                  Function frontendSponsorAssociationDestroy has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function frontendSponsorAssociationDestroy($Id, $Confirm = false)
                                      {
                                  
                                          $Stage = new Stage('Förderverein', 'Löschen');
                                          if ($Id) {
                                  Severity: Minor
                                  Found in Application/Setting/Consumer/SponsorAssociation/Frontend.php - About 3 hrs 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 frontendDestroyPrepare has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function frontendDestroyPrepare($Id = null, $Confirm = false)
                                      {
                                  
                                          $Stage = new Stage('Benutzer', 'Löschen');
                                          if ($Id) {
                                  Severity: Minor
                                  Found in Application/Setting/User/Account/Frontend.php - About 3 hrs 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 downloadBalanceList has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function downloadBalanceList($ItemIdString = '', $Year = '', $From = '', $To = '', $DivisionId = '', $GroupId = '', $PersonId = '')
                                      {
                                  
                                          if($ItemIdString){
                                              $ItemIdList = explode(",", $ItemIdString);
                                  Severity: Minor
                                  Found in Application/Api/Billing/Balance/BalanceDownload.php - About 3 hrs 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 pipelineNavigation has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public static function pipelineNavigation($isLoadFilter = true, $ViewType = TblWorkSpace::VIEW_TYPE_ALL, $PresetId = null)
                                      {
                                  
                                          $Pipeline = new Pipeline();
                                          $Emitter = new ServerEmitter(self::receiverNavigation(), self::getEndpoint());
                                  Severity: Minor
                                  Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 3 hrs 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