DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Avoid deeply nested control flow statements.
Open

                                if ($tblGrade->getGrade() !== null && $tblGrade->getGrade() !== '') {
                                    if ($tblSubject->getAcronym() == 'EN2') {
                                        $tblSubject = Subject::useService()->getSubjectByAcronym('EN');
                                    }

Severity: Major
Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

            TblPrepareCertificate $tblPrepare,
            $Date,
            $Name,
            TblTask $tblAppointedDateTask = null,
            TblTask $tblBehaviorTask = null,
    Severity: Minor
    Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

              IFormInterface $Form,
              $Data,
              TblPrepareCertificate $tblPrepareCertificate,
              TblGroup $tblGroup = null,
              TblPerson $tblPerson,
      Severity: Minor
      Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                        if ($tblSubject->getAcronym() == 'EN2') {
                                            $tblSubject = Subject::useService()->getSubjectByAcronym('EN');
                                        }
        Severity: Major
        Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                  IFormInterface $Form = null,
                  TblPerson $tblPerson,
                  TblPrepareCertificate $tblPrepare,
                  $GroupId = null,
                  $View = null,
          Severity: Minor
          Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if (!$tblCertificateSubject
                                            && $tblPrepareGrade && $tblPrepareGrade->getGrade() != ''
                                        ) {
                                            $grade = str_replace('+', '', $tblPrepareGrade->getGrade());
                                            $grade = str_replace('-', '', $grade);
            Severity: Major
            Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          if ($tblTestList) {
                                              foreach ($tblTestList as $tblTest) {
                                                  $tblPrepareGrade = Gradebook::useService()->getGradeByTestAndStudent($tblTest,
                                                      $tblPerson);
                                                  if ($tblPrepareGrade) {
              Severity: Major
              Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                    public function setYearGroupButtonList($Route, $IsAllYears, $IsGroup, $YearId, &$tblYear, $HasAllYears = true)
                Severity: Minor
                Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if (is_numeric($grade)) {
                                                  $gradeList[] = $grade;
                                              }
                  Severity: Major
                  Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                            TblPrepareCertificate $tblPrepare,
                            $Date,
                            $Name,
                            TblTask $tblAppointedDateTask = null,
                            TblTask $tblBehaviorTask = null,
                    Severity: Minor
                    Found in Application/Education/Certificate/Prepare/Service/Data.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                          if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
                                                              && !$tblCertificate->isInformation()
                                                          ) {
                                                              $withTrend = false;
                                                          }
                      Severity: Major
                      Found in Application/Education/Certificate/Prepare/Service/Data.php - About 45 mins to fix

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

                                IFormInterface $Stage = null,
                                TblPrepareCertificate $tblPrepare,
                                TblGroup $tblGroup = null,
                                $Route,
                                $Data,
                        Severity: Minor
                        Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          if ($tblSubject) {
                                                              if ($tblSubjectGroup->isAdvancedCourse()) {
                                                                  $advancedCourses[$tblSubject->getId()] = $tblSubject;
                                                              } else {
                                                                  $basicCourses[$tblSubject->getId()] = $tblSubject;
                          Severity: Major
                          Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

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

                                    TblPrepareCertificate $tblPrepare,
                                    TblPerson $tblPerson,
                                    TblDivision $tblDivision,
                                    TblTestType $tblTestType,
                                    TblGradeType $tblGradeType,
                            Severity: Minor
                            Found in Application/Education/Certificate/Prepare/Service/Data.php - About 45 mins to fix

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

                                      TblPrepareCertificate $tblPrepare,
                                      TblPerson $tblPerson,
                                      TblDivision $tblDivision,
                                      TblTestType $tblTestType,
                                      TblGradeType $tblGradeType,
                              Severity: Minor
                              Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                            if (($tblSubject = $tblPrepareAdditionalGrade->getServiceTblSubject())) {
                                                                if (isset($Data[$midTerm][$tblSubject->getId()])) {
                                                                    if (!$tblPrepareAdditionalGrade->isSelected()) {
                                                                        (new Data($this->getBinding()))->updatePrepareAdditionalGrade(
                                                                            $tblPrepareAdditionalGrade, $tblPrepareAdditionalGrade->getGrade(), true);
                                Severity: Major
                                Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if ($tblCourse->getName() == 'Hauptschule') {
                                                              $Content['P' . $personId]['Student']['Course']['Degree'] = 'Hauptschulabschlusses';
                                                              $Content['P' . $personId]['Student']['Course']['Name'] = 'Hauptschulbildungsgang';
                                                          } elseif ($tblCourse->getName() == 'Realschule') {
                                                              $Content['P' . $personId]['Student']['Course']['Degree'] = 'Realschulabschlusses';
                                  Severity: Major
                                  Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if (!$tblCertificateSubject
                                                                    && $tblGrade && $tblGrade->getGrade() != ''
                                                                ) {
                                                                    $grade = str_replace('+', '', $tblGrade->getGrade());
                                                                    $grade = str_replace('-', '', $grade);
                                    Severity: Major
                                    Found in Application/Education/Certificate/Prepare/Service.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if (!$isTeamSet) {
                                                                  if (($tblStudent = $tblPerson->getStudent())
                                                                      && ($tblSubjectType = Student::useService()->getStudentSubjectTypeByIdentifier('TEAM'))
                                                                      && ($tblStudentSubjectList = Student::useService()->getStudentSubjectAllByStudentAndSubjectType(
                                                                          $tblStudent, $tblSubjectType
                                      Severity: Major
                                      Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                                if (($tblDivisionSubject = Division::useService()->getDivisionSubjectByDivisionAndSubjectAndSubjectGroup(
                                                                                        $tblDivisionItem, $tblSubject, $tblSubjectGroup
                                                                                    ))
                                                                                    && (($tblSubjectStudent = Division::useService()->exitsSubjectStudent(
                                                                                        $tblDivisionSubject, $tblPerson
                                        Severity: Major
                                        Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language