DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Avoid deeply nested control flow statements.
Open

                                if ($phoneNumber) {
                                    // Vereinheitlichen der Telefonnummer
                                    $phoneNumber = str_replace(' / ', '/', $phoneNumber);
                                    $phoneNumber = str_replace(' - ', '/', $phoneNumber);
                                    $phoneNumber = str_replace('- ', '/', $phoneNumber);
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, 'KB') !== false) {
                                                $tblStudentDisorderType = Student::useService()->getStudentDisorderTypeByName('Körperliche Beeinträchtigung');
                                                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 (strpos($photo, '5') !== false) {
                                                  $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(3);
                                                  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 ($tblProfileSubject) {
                                                    Student::useService()->addStudentSubject(
                                                        $tblStudent,
                                                        Student::useService()->getStudentSubjectTypeByIdentifier('PROFILE'),
                                                        Student::useService()->getStudentSubjectRankingByIdentifier('1'),
        Severity: Major
        Found in Application/Transfer/Import/Annaberg/Service.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                          if ($FaxNumber != '') {
                                              Phone::useService()->insertPhoneToPerson($tblPerson, $FaxNumber,
                                                  Phone::useService()->getTypeById(7), '');
                                          }
          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($phone, '01')) {
                                                        $tblType = Phone::useService()->getTypeById(2);
                                                    }
            Severity: Major
            Found in Application/Transfer/Import/Tharandt/Service.php - About 45 mins to fix

              Method createMinimumGradeCounts has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function createMinimumGradeCounts(TblLevel $tblLevel,TblSubject $tblSubject,PhpExcel $Document, $RunY, $period, $course)
              Severity: Minor
              Found in Application/Transfer/Import/Muldental/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/Muldental/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/Annaberg/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/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/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/Tharandt/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/Muldental/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/Muldental/Service.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                      if($Key == 'Kind'){
                                                                          // Kinder zur Hauptperson
                                                                          Relationship::useService()->insertRelationshipToPerson($tblMainPerson, $tblPersonPeople, $tblRelationShipType, '');
                                                                      } elseif($Key != 'Haupt') {
                                                                          // Verheiratet
                              Severity: Major
                              Found in Application/Transfer/Import/Dresden/Service.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                        if (strpos($integration, 'Dyskalkulie') !== false) {
                                                                            $tblStudentDisorderType = Student::useService()->getStudentDisorderTypeByName('Dyskalkulie');
                                                                            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 ($Division != '') {
                                                                      if (( $pos = strpos($Division, $Level) ) !== false) {
                                                                          if (strlen($Division) > ( ( $start = $pos + strlen($Level) ) )) {
                                                                              $Division = substr($Division, $start);
                                                                          }
                                  Severity: Major
                                  Found in Application/Transfer/Import/FuxMedia/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/Annaberg/Service.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                              if ($tblSchoolType) {
                                                                                  $tblLevel = Division::useService()->insertLevel($tblSchoolType, $division);
                                                                                  if ($tblLevel) {
                                                                                      $tblDivision = Division::useService()->insertDivision(
                                                                                          $tblYear,
                                      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/Annaberg/Service.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language