DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Avoid deeply nested control flow statements.
Open

                                if ($tblLeaveStudent && $tblLeaveStudent->isApproved()) {
                                    $gradeText->setDisabled();
                                }
Severity: Major
Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                    if (!$tblGroup || Group::useService()->existsGroupPerson($tblGroup, $tblPerson)) {
    
                                        $studentTable[$tblPerson->getId()] = array(
                                            'Number' => count($studentTable) + 1,
                                            'Name' => $tblPerson->getLastFirstName()
    Severity: Major
    Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                              if (!isset($divisionList[$tblDivisionItem->getId()])) {
                                                  $divisionList[$tblDivisionItem->getId()] = $tblDivisionItem;
                                              }
      Severity: Major
      Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                                    if ($tblGradeTextList) {
                                                        $studentTable[$tblPerson->getId()]['Text'] = (new SelectBox('Data[' . $tblPrepareStudent->getId() . '][Text]',
                                                            '',
                                                            array(TblGradeText::ATTR_NAME => $tblGradeTextList)))->setDisabled();
                                                    }
        Severity: Major
        Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                                      if ($tblGradeTextList) {
                                                          $studentTable[$tblPerson->getId()]['Text'] = (new SelectBox('Data[' . $tblPrepareStudent->getId() . '][Text]',
                                                              '',
                                                              array(TblGradeText::ATTR_NAME => $tblGradeTextList)))->setTabIndex($tabIndex++);
                                                      }
          Severity: Major
          Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                            if (!method_exists($Certificate, 'get' . $Type)) {
                                                if (isset($FormField[$PlaceholderName])) {
                                                    if (isset($FormLabel[$PlaceholderName])) {
                                                        $Label = $FormLabel[$PlaceholderName];
                                                    } else {
            Severity: Major
            Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                                          if ($tblDivisionStudentAll) {
                                                              foreach ($tblDivisionStudentAll as $tblPerson) {
                                                                  if (!$tblGroup || Group::useService()->existsGroupPerson($tblGroup, $tblPerson)) {
                                                                      // nur Schüler der ausgewählten Klasse
                                                                      if (isset($divisionPersonList[$tblPerson->getId()])) {
              Severity: Major
              Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if (!$hasRemarkText
                                            && ($tblConsumer = Consumer::useService()->getConsumerBySession())
                                            && $tblConsumer->getAcronym() == 'EVSC'
                                            && ($tblCertificateType = $tblCertificate->getTblCertificateType())
                                            && $tblCertificateType->getIdentifier() == 'YEAR'
                Severity: Major
                Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if (!$hasTransfer) {
                                              $Global->POST['Data'][$tblPrepareStudent->getId()]['Transfer'] = 1;
                                          }
                  Severity: Major
                  Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                    if (!method_exists($Certificate, 'get' . $Type)) {
                                                        if (isset($FormField[$PlaceholderName])) {
                                                            if (isset($FormLabel[$PlaceholderName])) {
                                                                $Label = $FormLabel[$PlaceholderName];
                                                            } else {
                    Severity: Major
                    Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                          if ($tblCertificate) {
                                                              $tblLeaveStudent = Prepare::useService()->createLeaveStudent(
                                                                  $tblPerson,
                                                                  $tblDivision,
                                                                  $tblCertificate
                      Severity: Major
                      Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ($tblFirstPeriod->getId() == $tblCurrentPeriod->getId()) {
                                                    $Global->POST['Data']['Type'] = Generator::useService()->getCertificateTypeByIdentifier('HALF_YEAR');
                                                } elseif ($tblSecondPeriod->getId() == $tblCurrentPeriod->getId()) {
                                                    $Global->POST['Data']['Type'] = Generator::useService()->getCertificateTypeByIdentifier('YEAR');
                                                }
                        Severity: Major
                        Found in Application/Education/Certificate/Generate/Frontend.php - About 45 mins to fix

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

                                  TblPrepareCertificate $tblPrepareCertificate,
                                  TblPerson $tblPerson,
                                  &$studentTable,
                                  &$columnTable,
                                  &$Data,
                          Severity: Minor
                          Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if (!$tblGroup || Group::useService()->existsGroupPerson($tblGroup, $tblPerson)) {
                                                                $studentTable[$tblPerson->getId()] = array(
                                                                    'Number' => count($studentTable) + 1,
                                                                    'Name' => $tblPerson->getLastFirstName()
                                                                        . ($tblGroup
                            Severity: Major
                            Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if ($tblPrepareStudent->isApproved()) {
                                                          $textArea->setDisabled();
                                                      }
                              Severity: Major
                              Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                    if ($tblStudentTransfer) {
                                                                        $tblCourse = $tblStudentTransfer->getServiceTblCourse();
                                                                        if ($tblCourse) {
                                                                            $course = $tblCourse->getName();
                                                                            if ($course == 'Hauptschule') {
                                Severity: Major
                                Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                  if (($tblDivisionItem = $tblPrepareCertificate->getServiceTblDivision())
                                                                      && isset($divisionList[$tblDivisionItem->getId()])
                                                                  ) {
                                                                      if (($tblPrepareStudentList = Prepare::useService()->getPrepareStudentAllByPrepare($tblPrepareCertificate))) {
                                                                          foreach ($tblPrepareStudentList as $tblPrepareStudent) {
                                  Severity: Major
                                  Found in Application/Education/Certificate/PrintCertificate/Frontend.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if (($tblGradeTypeItem = $tblTest->getServiceTblGradeType())) {
                                                                    if (!isset($tblGradeTypeList[$tblGradeTypeItem->getId()])) {
                                                                        $tblGradeTypeList[$tblGradeTypeItem->getId()] = $tblGradeTypeItem;
                                                                        if ($tblCurrentGradeType && !$tblNextGradeType) {
                                                                            $tblNextGradeType = $tblGradeTypeItem;
                                    Severity: Major
                                    Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if ($tblPrepareInformationAll) {
                                                                  foreach ($tblPrepareInformationAll as $tblPrepareInformation) {
                                                                      if ($tblPrepareInformation->getField() == 'Team' || $tblPrepareInformation->getField() == 'TeamExtra') {
                                                                          $isTeamSet = true;
                                                                      }
                                      Severity: Major
                                      Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                                    if ($tblSubjectStudentAllByDivisionSubject) {
                                                                                        foreach ($tblSubjectStudentAllByDivisionSubject as $tblSubjectStudent) {
                                        
                                                                                            $tblPerson = $tblSubjectStudent->getServiceTblPerson();
                                                                                            if (!$tblGroup || Group::useService()->existsGroupPerson($tblGroup, $tblPerson)) {
                                        Severity: Major
                                        Found in Application/Education/Certificate/Prepare/Frontend.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language