DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Avoid deeply nested control flow statements.
Open

                                    if ($tblPrivilegeAll) {
                                        /** @var TblPrivilege $tblPrivilege */
                                        foreach ($tblPrivilegeAll as $tblPrivilege) {
                                            $tblRightAll = $tblPrivilege->getTblRightAll();
                                            if ($tblRightAll) {
Severity: Major
Found in Application/Platform/Gatekeeper/Authorization/Access/Service.php - About 45 mins to fix

    Method createProtocolEntry has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            $DatabaseName,
            TblAccount $tblAccount = null,
            TblConsumer $tblConsumer = null,
            Element $FromEntity = null,
            Element $ToEntity = null,
    Severity: Minor
    Found in Application/Platform/System/Protocol/Service/Data.php - About 45 mins to fix

      Method createArchiveEntry has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $DatabaseName,
              TblAccount $tblAccount = null,
              TblConsumer $tblConsumer = null,
              Element $Entity = null,
              $Type = TblArchive::ARCHIVE_TYPE_CREATE,
      Severity: Minor
      Found in Application/Platform/System/Archive/Service/Data.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if($tblCommonGender->getName() == 'Männlich'){
                                        $Gender = 'm';
                                    } elseif($tblCommonGender->getName() == 'Weiblich') {
                                        $Gender = 'w';
                                    }
        Severity: Major
        Found in Application/Transfer/Indiware/Export/Meta/Service.php - About 45 mins to fix

          Function createIndiwareStudentSubjectOrderBulk has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public function createIndiwareStudentSubjectOrderBulk($ImportList, $Period, TblTask $tblTask)
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  if (!empty($ImportList)) {
          Severity: Minor
          Found in Application/Transfer/Indiware/Export/AppointmentGrade/Service/Data.php - About 45 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

          Avoid deeply nested control flow statements.
          Open

                                  if ($tblAccount->getPassword() == $Password) {
                                      $IsEqual = true;
                                  }
          Severity: Major
          Found in Application/Platform/Gatekeeper/Authentication/Frontend.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if(($tblStudentDisorderList = Student::useService()->getStudentDisorderAllByStudent($tblStudent))){
                                            $PersonEditor = '';
                                            $Remark = '';
                                            $tblSpecial = Student::useService()->importSpecial($tblPerson, $Date->format('d.m.Y'), $PersonEditor, $Remark);
                                            if($tblSpecial){
            Severity: Major
            Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if($Date <= $Decision){
                                                  $Date = $Decision;
                                              }
              Severity: Major
              Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if ($tblGradeList) {
                
                                                foreach ($tblGradeList as $tblGrade) {
                                                    $tblPersonStudent = $tblGrade->getServiceTblPerson();
                                                    if ($tblPersonStudent) {
                Severity: Major
                Found in Application/Transfer/Indiware/Export/AppointmentGrade/Service.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                  if($Date <= $Counsel){
                                                      $Date = $Counsel;
                                                  }
                  Severity: Major
                  Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 45 mins to fix

                    Function runConvert has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function runConvert($Row)
                        {
                    
                            $ColumnMatch = array(
                                // Muster in Spalte ?? gefunden
                    Severity: Minor
                    Found in Application/Transfer/Indiware/Import/StudentCourseControl.php - About 45 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 renderDiffToHTMLFromOpcode has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private static function renderDiffToHTMLFromOpcode($opcode, $from, $from_offset, $from_len)
                        {
                    
                            if ($opcode === 'c') {
                                echo htmlentities(substr($from, $from_offset, $from_len));
                    Severity: Minor
                    Found in Application/Platform/System/Protocol/Difference/finediff.php - About 45 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 setTestPicture has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private function setTestPicture(Schema &$Schema)
                        {
                    
                            $Table = $this->getConnection()->createTable($Schema, 'tblTestPicture');
                            if (!$this->getConnection()->hasColumn('tblTestPicture', 'Name')) {
                    Severity: Minor
                    Found in Application/Platform/System/Test/Service/Setup.php - About 45 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

                    Method createArchiveEntry has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            $DatabaseName,
                            TblAccount $tblAccount = null,
                            TblConsumer $tblConsumer = null,
                            Element $Entity = null,
                            $Type = TblArchive::ARCHIVE_TYPE_CREATE,
                    Severity: Minor
                    Found in Application/Platform/System/Archive/Service.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                  if($tblSupport){
                                                      $countRequest++;
                                                      if(($tblStudentFocusList = Student::useService()->getStudentFocusAllByStudent($tblStudent))){
                                                          foreach($tblStudentFocusList as $tblStudentFocus){
                                                              $FocusName = $tblStudentFocus->getTblStudentFocusType()->getName();
                      Severity: Major
                      Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                    if($tblSupport){
                                                        $countCounsel++;
                                                        if(($tblStudentFocusList = Student::useService()->getStudentFocusAllByStudent($tblStudent))){
                                                            foreach($tblStudentFocusList as $tblStudentFocus){
                                                                $FocusName = $tblStudentFocus->getTblStudentFocusType()->getName();
                        Severity: Major
                        Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                      if(($tblCompany = $tblStudentIntegration->getServiceTblCompany())){
                                                          $Company = $tblCompany->getDisplayName();
                                                      }
                          Severity: Major
                          Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        if(($tblCompany = $tblStudentIntegration->getServiceTblCompany())){
                                                            $Company = $tblCompany->getDisplayName();
                                                        }
                            Severity: Major
                            Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 45 mins to fix

                              Function frontendLectureshipShow has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function frontendLectureshipShow($Visible = false)
                                  {
                                      $Stage = new Stage('Lehraufträge', 'Übersicht');
                                      $Stage->addButton(new Standard('Zurück', '/Transfer/Untis/Import', new ChevronLeft()));
                                      $tblUntisImportLectureshipList = Import::useService()->getUntisImportLectureshipAll(true);
                              Severity: Minor
                              Found in Application/Transfer/Untis/Import/Lectureship.php - About 45 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

                              Avoid deeply nested control flow statements.
                              Open

                                                          if ($GradeList) {
                                                              foreach ($GradeList as $Grade) {
                                                                  // stop search if every Person got found
                                                                  if (empty($PersonList)) {
                                                                      break;
                              Severity: Major
                              Found in Application/Transfer/Indiware/Export/AppointmentGrade/Service.php - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language