DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Avoid deeply nested control flow statements.
Open

                                    if (trim($Document->getValue($Document->getCell($Location['Sorgeberechtigter1_Wohnort'],
                                            $RunY))) != ''
                                    ) {
                                        $Street = trim($Document->getValue($Document->getCell($Location['Sorgeberechtigter1_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 ($phoneLocation) {
                                        $phoneNumber = trim($Document->getValue($Document->getCell($phoneLocation,
                                            $RunY)));
                                        if ($phoneNumber != '') {
                                            $tblType = Phone::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 ($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 ($leaveDate !== '' && date_create($leaveDate) !== false) {
                                            $tblStudentTransferType = Student::useService()->getStudentTransferTypeByIdentifier('Leave');
                                            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 ($tblPersonFather !== null) {
                                              Address::useService()->insertAddressToPerson(
                                                  $tblPersonFather, $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 ($focus === 'HÖ') {
                                                        $tblStudentFocusType = Student::useService()->getStudentFocusTypeByName('Hören');
                                                        Student::useService()->addStudentFocus($tblStudent,
                                                            $tblStudentFocusType);
                                                    }
            Severity: Major
            Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if (( $company = Company::useService()->getCompanyByDescription(trim(
                                                  $Document->getValue($Document->getCell($Location['Schüler_abgebende_Schule_ID'],
                                                      $RunY)))) )
                                              ) {
                                                  $leaveSchool = $company;
              Severity: Major
              Found in Application/Transfer/Import/FuxMedia/Service.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                if ($subjectReligion !== '') {
                                                    if ($subjectReligion === 'ETH') {
                                                        $tblSubject = Subject::useService()->getSubjectByAcronym('ETH');
                                                    } elseif ($subjectReligion === 'RE/e') {
                                                        $tblSubject = Subject::useService()->getSubjectByAcronym('REV');
                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) {
                                                      $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 (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 ($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 ($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 (( $company = Company::useService()->getCompanyByDescription(trim(
                                                              $Document->getValue($Document->getCell($Location['Schüler_aufnehmende_Schule_ID'],
                                                                  $RunY)))) )
                                                          ) {
                                                              $arriveSchool = $company;
                          Severity: Major
                          Found in Application/Transfer/Import/FuxMedia/Service.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            for ($i = 1; $i < 3; $i++) {
                                                                $PhoneNumber = trim($Document->getValue($Document->getCell($Location['Telefon'.$i],
                                                                    $RunY)));
                                                                if ($PhoneNumber != '') {
                                                                    Phone::useService()->insertPhoneToPerson($tblPerson, $PhoneNumber,
                            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) {
                                                                  $firstName = trim(substr($fatherFullName, 0, $pos));
                                                                  $lastName = trim(substr($fatherFullName, $pos));
                              
                                                                  $tblPersonFatherExists = 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 ($tblPersonFather !== null) {
                                                                    Address::useService()->insertAddressToPerson(
                                                                        $tblPersonFather, $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 ($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 ($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 ($pos !== false) {
                                                                          $firstName = trim(substr($fatherFullName, 0, $pos));
                                                                          $lastName = trim(substr($fatherFullName, $pos));
                                      
                                                                          $tblPersonFatherExists = 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 (!$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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language