DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

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/FuxMedia/Service.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                    if ($pos !== false) {
                                        $cityDistrict = trim(substr($cityName, $pos));
                                        $cityName = trim(substr($cityName, 0, $pos));
                                    }
    Severity: Major
    Found in Application/Transfer/Import/Hormersdorf/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/Schneeberg/Service.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                                    if (($tblCommon = Common::useService()->getCommonByPerson($tblRelationship->getServiceTblPersonFrom()))
                                                        && ($tblCommonBirthDates = $tblCommon->getTblCommonBirthDates())
                                                    ) {
                                                        if ($tblCommonBirthDates->getGender() == TblCommonBirthDates::VALUE_GENDER_FEMALE) {
                                                            $tblMother = $tblRelationship->getServiceTblPersonFrom();
        Severity: Major
        Found in Application/Transfer/Import/Schneeberg/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/Schneeberg/Service.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

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

              Avoid deeply nested control flow statements.
              Open

                                          if ($tblPeriod) {
                                              Term::useService()->insertYearPeriod($tblYear, $tblPeriod);
                                          }
              Severity: Major
              Found in Application/Transfer/Import/Meerane/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/Schneeberg/Service.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                          if ($tblSchoolType) {
                                                              if ($division != '10') {
                                                                  $pos = 1;
                                                                  $level = substr($division, 0, $pos);
                                                                  $division = substr($division, $pos);
                  Severity: Major
                  Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                if ($tblPeriod) {
                                                    Term::useService()->insertYearPeriod($tblYear, $tblPeriod);
                                                }
                    Severity: Major
                    Found in Application/Transfer/Import/Tharandt/Service.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                              if (strpos($integration, 'LRS') !== false
                                                                  || strpos($integration, 'Rechtschreibschwäche') !== false
                                                              ) {
                                                                  $tblStudentDisorderType = Student::useService()->getStudentDisorderTypeByName('LRS');
                                                                  Student::useService()->addStudentDisorder($tblStudent,
                      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, '2') !== false) {
                                                                    $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(1);
                                                                    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 !== 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 ($pos !== null) {
                                                                        $streetName = trim(substr($street, 0, $pos));
                                                                        $streetNumber = trim(substr($street, $pos));
                                                                    }
                            Severity: Major
                            Found in Application/Transfer/Import/Tharandt/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 ($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 ($subjectLanguage !== '') {
                                                                              if ($subjectLanguage === 'EN'
                                                                                  || $subjectLanguage === 'Englisch'
                                                                              ) {
                                                                                  $tblSubject = Subject::useService()->getSubjectByAcronym('EN');
                                  Severity: Major
                                  Found in Application/Transfer/Import/Muldental/Service.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if ($courseName == 'GK') {
                                                                    $course = SelectBoxItem::COURSE_BASIC;
                                                                } elseif ($courseName == 'LK') {
                                                                    $course = SelectBoxItem::COURSE_ADVANCED;
                                                                }
                                    Severity: Major
                                    Found in Application/Transfer/Import/Muldental/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/Annaberg/Service.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                                    if ($division !== '') {
                                                                                        $tblYear = Term::useService()->insertYear('20'.$year.'/'.($year + 1));
                                                                                        if ($tblYear) {
                                                                                            $tblPeriodList = Term::useService()->getPeriodAllByYear($tblYear);
                                                                                            if (!$tblPeriodList) {
                                        Severity: Major
                                        Found in Application/Transfer/Import/Dresden/Service.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language