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

      Avoid deeply nested control flow statements.
      Open

                                              if ($subjectProfile === 'P/gw-WED') {
                                                  $tblSubject = Subject::useService()->getSubjectByAcronym('WED');
                                                  if (!$tblSubject) {
                                                      $tblSubject = Subject::useService()->insertSubject('WED',
                                                          'gesellschaftswissenschaftliches Profil / Wirtschaftsethik und Diakonie');
      Severity: Major
      Found in Application/Transfer/Import/Herrnhut/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 ($tblPersonMother) {
                                                          Phone::useService()->insertPhoneToPerson(
                                                              $tblPersonMother,
                                                              $phoneNumber,
                                                              $tblType,
          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');
                                                        Student::useService()->addStudentFocus($tblStudent,
                                                            $tblStudentFocusType);
                                                    } elseif ($focus === 'LE'
            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, 'Konzentr.-störung') !== false
                                                          || strpos($integration, 'Konzentrationsstörung') !== false
                                                      ) {
                                                          $tblStudentDisorderType = Student::useService()->getStudentDisorderTypeByName('Konzentrationsstörung');
                                                          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, '4') !== false) {
                                                            $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(5);
                                                            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 (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 ($subjectReligion === 'ETH') {
                                                                $tblSubject = Subject::useService()->getSubjectByAcronym('ETH');
                                                            } elseif ($subjectReligion === 'RE/e') {
                                                                $tblSubject = Subject::useService()->getSubjectByAcronym('REV');
                                                            } elseif ($subjectReligion === 'RE/k') {
                    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/Naundorf/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/Radebeul/Service.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          if ($tblPersonMother !== null) {
                                                              $this->useContactAddress()->createAddressToPersonFromImport(
                                                                  $tblPersonMother, $StreetName, $StreetNumber, $CityCode, $CityName
                                                              );
                                                          }
                          Severity: Major
                          Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                    if (strpos($integration, 'Autismus') !== false) {
                                                                        $tblStudentDisorderType = Student::useService()->getStudentDisorderTypeByName('Autismus');
                                                                        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 (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/Annaberg/Service.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                        if ($tblPersonFather) {
                                                                            $tblCommon = Common::useService()->getCommonByPerson($tblPersonFather);
                                                                            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 (strpos($photo, '1') !== false) {
                                                                              $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(2);
                                                                              Student::useService()->insertStudentAgreement($tblStudent,
                                                                                  $tblStudentAgreementType);
                                                                          }
                                  Severity: Major
                                  Found in Application/Transfer/Import/Radebeul/Service.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                            if ($tblSubject) {
                                                                                Student::useService()->addStudentSubject(
                                                                                    $tblStudent,
                                                                                    Student::useService()->getStudentSubjectTypeByIdentifier('PROFILE'),
                                                                                    Student::useService()->getStudentSubjectRankingByIdentifier('1'),
                                    Severity: Major
                                    Found in Application/Transfer/Import/Herrnhut/Service.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                      if ($FatherFirstName !== '') {
                                                                          $tblPersonFatherExists = $this->usePeoplePerson()->getPersonExists(
                                                                              $FatherFirstName,
                                                                              $LastName,
                                                                              $CityCode
                                      Severity: Major
                                      Found in Application/Transfer/Import/Chemnitz/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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language