DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

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 (strpos($photo, '3') !== false) {
                                                  $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(7);
                                                  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 ($tblCompany && ($firstName != '' || $lastName != '')) {
                                        if ($personId != '') {
                                            if (($tblPerson = Person::useService()->getPersonById($personId))) {
                                                if ($tblPerson->getFirstName() != $firstName) {
                                                    $errorList[] = array(
        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/Naundorf/Service.php - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                        if ($occupationFather !== '') {
                                                            Custody::useService()->insertMeta(
                                                                $tblPersonFather,
                                                                $occupationFather,
                                                                '',
            Severity: Major
            Found in Application/Transfer/Import/Radebeul/Service.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ($tblPersonFather !== null) {
                                                  $this->useContactAddress()->createAddressToPersonFromImport(
                                                      $tblPersonFather, $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 (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 (strpos($photo, '7') !== false) {
                                                              $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(6);
                                                              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 ($birthday !== '') {
                    
                                                            $birthday = date('d.m.Y', \PHPExcel_Shared_Date::ExcelToPHP($birthday));
                                                            Common::useService()->insertMeta(
                                                                $tblPerson,
                    Severity: Major
                    Found in Application/Transfer/Import/Radebeul/Service.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                          if ($pos !== false) {
                                                              $cityDistrict = trim(substr($cityName, $pos + 4));
                                                              $cityName = trim(substr($cityName, 0, $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 (0 === strpos($phoneNumber, '01')) {
                                                                      $tblType = Phone::useService()->getTypeById(2);
                                                                  }
                          Severity: Major
                          Found in Application/Transfer/Import/Naundorf/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/Radebeul/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/Radebeul/Service.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                            if ($tblCompany) {
                                                                                \SPHERE\Application\Corporation\Group\Group::useService()->addGroupCompany(
                                                                                    \SPHERE\Application\Corporation\Group\Group::useService()->getGroupByMetaTable('COMMON'),
                                                                                    $tblCompany
                                                                                );
                                Severity: Major
                                Found in Application/Transfer/Import/Radebeul/Service.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                          if ($focus === 'LE') {
                                                                              $tblStudentFocusType = Student::useService()->getStudentFocusTypeByName('Lernen');
                                                                              if ($tblStudentFocusType) {
                                                                                  Student::useService()->addStudentFocus($tblStudent,
                                                                                      $tblStudentFocusType);
                                  Severity: Major
                                  Found in Application/Transfer/Import/Radebeul/Service.php - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                            if (strpos($photo, '6') !== false) {
                                                                                $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(4);
                                                                                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 ($tblSchoolType) {
                                                                                        if (($pos = stripos($division, '-'))) {
                                                                                            $level = substr($division, 0, $pos);
                                                                                            $division = substr($division, $pos + 1);
                                                                                            $tblGroup = Group::useService()->insertGroup((2020 - $level) . '-' . $division);
                                        Severity: Major
                                        Found in Application/Transfer/Import/Herrnhut/Service.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language