DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

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

        Avoid deeply nested control flow statements.
        Open

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

          Avoid deeply nested control flow statements.
          Open

                                                  if ($remark !== '') {
                                                      $remark = 'Staatliche Schule: ' . $remark;
                                                  }
          Severity: Major
          Found in Application/Transfer/Import/Radebeul/Service.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                    if (0 === strpos($phoneNumber, '01')) {
                                                        if ($i !== 3 && $i !== 4) {
                                                            $tblType = Phone::useService()->getTypeById(2);
                                                        } else {
                                                            $tblType = Phone::useService()->getTypeById(4);
            Severity: Major
            Found in Application/Transfer/Import/Herrnhut/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');
                                                      }
              Severity: Major
              Found in Application/Transfer/Import/Herrnhut/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 ($tblCompany && $isNew) {
                                                  $streetName = '';
                                                  $streetNumber = '';
                                                  $street = trim($Document->getValue($Document->getCell($Location['Straße'], $RunY)));
                                                  if (preg_match_all('!\d+!', $street, $matches)) {
                  Severity: Major
                  Found in Application/Transfer/Import/Herrnhut/Service.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                    if ($MotherFirstName !== '') {
                                                        $tblPersonMotherExists = $this->usePeoplePerson()->getPersonExists(
                                                            $MotherFirstName,
                                                            $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 ($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 ($tblSubject) {
                                                                    Student::useService()->addStudentSubject(
                                                                        $tblStudent,
                                                                        Student::useService()->getStudentSubjectTypeByIdentifier('RELIGION'),
                                                                        Student::useService()->getStudentSubjectRankingByIdentifier('1'),
                        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/Annaberg/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/Radebeul/Service.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

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

                                Avoid deeply nested control flow statements.
                                Open

                                                                            if ($tblPersonFather) {
                                                                                Phone::useService()->insertPhoneToPerson(
                                                                                    $tblPersonFather,
                                                                                    $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 (strpos($photo, '7') !== false) {
                                                                              $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(6);
                                                                              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 ($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

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                                if ($entrance != '') {
                                                                                    $entrance = str_replace('ab ', '', $entrance);
                                                                                    // php kommt nicht mit 2 stelligen Jahreszahlen klar :(
                                                                                    if (($split = preg_split('/[.]/', $entrance))) {
                                                                                        $entrance = $split[0] . '.' . $split[1] . '.' . '20' . $split[2];
                                        Severity: Major
                                        Found in Application/Transfer/Import/Naundorf/Service.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language