DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Avoid deeply nested control flow statements.
Open

                                        if (strpos($photo, '3') !== false) {
                                            $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(7);
                                            Student::useService()->insertStudentAgreement($tblStudent,
                                                $tblStudentAgreementType);
                                        }
Severity: Major
Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                            if ($focus === 'GE') {
                                                $tblStudentFocusType = Student::useService()->getStudentFocusTypeByName('Geistige Entwicklung');
                                                if ($tblStudentFocusType) {
                                                    Student::useService()->addStudentFocus($tblStudent,
                                                        $tblStudentFocusType);
    Severity: Major
    Found in Application/Transfer/Import/Annaberg/Service.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                              if (0 === strpos($phoneNumber, '01')) {
                                                  $tblType = Phone::useService()->getTypeById(2);
                                              }
      Severity: Major
      Found in Application/Transfer/Import/Tharandt/Service.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                                if ($tblPersonMother) {
                                                    $tblCommon = Common::useService()->getCommonByPerson($tblPersonMother);
                                                    if ($tblCommon && $tblCommon->getTblCommonBirthDates()) {
                                                        if ($tblCommon->getTblCommonBirthDates()->getGender() == TblCommonBirthDates::VALUE_GENDER_FEMALE) {
                                                            $insuranceState = 5;
        Severity: Major
        Found in Application/Transfer/Import/Annaberg/Service.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                          if ($MailAddress != '') {
                                              Mail::useService()->insertMailToPerson($tblPerson, $MailAddress,
                                                  Mail::useService()->getTypeById(1), '');
                                          }
          Severity: Major
          Found in Application/Transfer/Import/FuxMedia/Service.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                    if (0 === strpos($phoneNumber, '01')) {
                                                        $tblType = Phone::useService()->getTypeById(2);
                                                    }
            Severity: Major
            Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ($streetName && $streetNumber && $zipCode && $city) {
                                                  Address::useService()->insertAddressToCompany(
                                                      $tblCompany,
                                                      $streetName,
                                                      $streetNumber,
              Severity: Major
              Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                            if ($pos !== false) {
                                                                $level = trim(substr($division, 0, $pos));
                                                                //$division = trim(substr($division, $pos + 1));
                                                                $tblGroup = Group::useService()->insertGroup($division);
                                                                if ($tblGroup){
                Severity: Major
                Found in Application/Transfer/Import/Annaberg/Service.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                          if ($pos !== null) {
                                                              $streetName = trim(substr($street, 0, $pos));
                                                              $streetNumber = trim(substr($street, $pos));
                                                          }
                  Severity: Major
                  Found in Application/Transfer/Import/Annaberg/Service.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                            if (0 === strpos($phoneNumber, '01')) {
                                                                $tblType = Phone::useService()->getTypeById(2);
                                                            }
                    Severity: Major
                    Found in Application/Transfer/Import/Tharandt/Service.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      if ($mail) {
                                                          Mail::useService()->insertMailToCompany($tblCompany, $mail, Mail::useService()->getTypeById(2), '');
                                                      }
                      Severity: Major
                      Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                                if (!$tblPeriodList) {
                                                                    // firstTerm
                                                                    $tblPeriod = Term::useService()->insertPeriod(
                                                                        '1. Halbjahr',
                                                                        '01.08.20' . $year,
                        Severity: Major
                        Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                                  if (strpos($integration, 'ADHS') !== false) {
                                                                      $tblStudentDisorderType = Student::useService()->getStudentDisorderTypeByName('ADS / ADHS');
                                                                      Student::useService()->addStudentDisorder($tblStudent,
                                                                          $tblStudentDisorderType);
                                                                  }
                          Severity: Major
                          Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                    if (strpos($photo, '6') !== false) {
                                                                        $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(4);
                                                                        Student::useService()->insertStudentAgreement($tblStudent,
                                                                            $tblStudentAgreementType);
                                                                    }
                            Severity: Major
                            Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                  if ($pos !== false) {
                                                                      $cityDistrict = trim(substr($cityName, $pos + 4));
                                                                      $cityName = trim(substr($cityName, 0, $pos));
                                                                  }
                              Severity: Major
                              Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                    if (preg_match_all('!\d+!', $Street, $matches)) {
                                                                        $pos = strpos($Street, $matches[0][0]);
                                                                        if ($pos !== null) {
                                                                            $StreetName = trim(substr($Street, 0, $pos));
                                                                            $StreetNumber = trim(substr($Street, $pos));
                                Severity: Major
                                Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                      if ($emailAddress != '') {
                                                                          Mail::useService()->insertMailToPerson($tblPerson, $emailAddress,
                                                                              Mail::useService()->getTypeById(1), '');
                                                                      }
                                  Severity: Major
                                  Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                            if ($level !== '') {
                                                                                $tblLevel = Division::useService()->insertLevel($tblSchoolType, $level);
                                                                                if ($tblLevel) {
                                                                                    $tblDivision = Division::useService()->insertDivision(
                                                                                        $tblSelectedYear,
                                    Severity: Major
                                    Found in Application/Transfer/Import/Annaberg/Service.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                      if ($streetName && $streetNumber && $zipCode && $city) {
                                                                          Address::useService()->insertAddressToCompany(
                                                                              $tblCompany,
                                                                              $streetName,
                                                                              $streetNumber,
                                      Severity: Major
                                      Found in Application/Transfer/Import/Radebeul/Service.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                                if (strpos($photo, '5') !== false) {
                                                                                    $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(3);
                                                                                    Student::useService()->insertStudentAgreement($tblStudent,
                                                                                        $tblStudentAgreementType);
                                                                                }
                                        Severity: Major
                                        Found in Application/Transfer/Import/Radebeul/Service.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language