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

    Avoid deeply nested control flow statements.
    Open

                                    if ($tblDivision) {
                                        Division::useService()->insertDivisionStudent($tblDivision, $tblPerson);
                                    }
    Severity: Major
    Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                      if ($emailLocation) {
                                          $mailAddress = trim($Document->getValue($Document->getCell($emailLocation,
                                              $RunY)));
                                          if ($mailAddress != '') {
                                              Mail::useService()->insertMailToPerson(
      Severity: Major
      Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                                if (0 === strpos($phone, '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 (strlen($division) == 2) {
                                                          $level = substr($division, 0, 1);
                                                          $division = substr($division, 1, 1);
                                                          $tblLevel = Division::useService()->insertLevel($tblSchoolType, $level);
          Severity: Major
          Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                            for ($i = 1; $i < 5; $i++) {
                                                $subjectLanguage = trim($Document->getValue($Document->getCell($Location['Fächer_Fremdsprache'.$i],
                                                    $RunY)));
                                                $tblSubject = false;
                                                if ($subjectLanguage !== '') {
            Severity: Major
            Found in Application/Transfer/Import/FuxMedia/Service.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ($tblPersonMother !== null) {
                                                  Address::useService()->insertAddressToPerson(
                                                      $tblPersonMother, $StreetName, $StreetNumber, $cityCode, $cityName,
                                                      $cityDistrict, ''
                                                  );
              Severity: Major
              Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

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

                  Avoid deeply nested control flow statements.
                  Open

                                                  if ($tblPersonMother !== null) {
                                                      Address::useService()->insertAddressToPerson(
                                                          $tblPersonMother, $StreetName, $StreetNumber, $cityCode, $cityName,
                                                          $cityDistrict, ''
                                                      );
                  Severity: Major
                  Found in Application/Transfer/Import/Hormersdorf/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/Schneeberg/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/Hormersdorf/Service.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if ($pos !== false) {
                                                            $firstName = trim(substr($motherFullName, 0, $pos));
                                                            $lastName = trim(substr($motherFullName, $pos));
                        
                                                            $tblPersonMotherExists = Person::useService()->existsPerson(
                        Severity: Major
                        Found in Application/Transfer/Import/Hormersdorf/Service.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          if ($enrollmentDate !== '' && date_create($enrollmentDate) !== false) {
                                                              $tblStudentTransferType = Student::useService()->getStudentTransferTypeByIdentifier('Enrollment');
                                                              Student::useService()->insertStudentTransfer(
                                                                  $tblStudent,
                                                                  $tblStudentTransferType,
                          Severity: Major
                          Found in Application/Transfer/Import/FuxMedia/Service.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if ($arriveDate !== '' && date_create($arriveDate) !== false) {
                                                                $tblStudentTransferType = Student::useService()->getStudentTransferTypeByIdentifier('Arrive');
                                                                Student::useService()->insertStudentTransfer(
                                                                    $tblStudent,
                                                                    $tblStudentTransferType,
                            Severity: Major
                            Found in Application/Transfer/Import/FuxMedia/Service.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if ($arriveDate !== '') {
                                                              $arriveDate = date('Y-m-d',
                                                                  \PHPExcel_Shared_Date::ExcelToPHP($arriveDate));
                                                              $tblStudent = Student::useService()->insertStudent(
                                                                  $tblPerson, ''
                              Severity: Major
                              Found in Application/Transfer/Import/LebensweltZwenkau/Service.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                    if (trim($Document->getValue($Document->getCell($Location['Sorgeberechtigter2_Wohnort'],
                                                                            $RunY))) != ''
                                                                    ) {
                                                                        $Street = trim($Document->getValue($Document->getCell($Location['Sorgeberechtigter2_Straße'],
                                                                            $RunY)));
                                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/Schneeberg/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/Schulstiftung/Service.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

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

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                        if ($PhoneNumber != '') {
                                                                            Phone::useService()->insertPhoneToPerson($tblPerson, $PhoneNumber,
                                                                                Phone::useService()->getTypeById(1), '');
                                                                        }
                                        Severity: Major
                                        Found in Application/Transfer/Import/FuxMedia/Service.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language