DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Avoid deeply nested control flow statements.
Open

                                        if ($subjectLanguage !== '') {
                                            if ($subjectLanguage === 'EN') {
                                                $tblSubject = Subject::useService()->getSubjectByAcronym('EN');
                                            } elseif ($subjectLanguage === 'FR') {
                                                $tblSubject = Subject::useService()->getSubjectByAcronym('FR');
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));
                                            ContactAddress\Address::useService()->insertAddressToCompany
                                            (
    Severity: Major
    Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                      if (($OptionTypeB = trim($Document->getValue($Document->getCell($Location['Schulart 2'],
                                              $RunY)))) !== ''
                                      ) {
                                          if ($OptionTypeB == 'Oberschule') {
                                              $tblOptionTypeB = Type::useService()->getTypeById(8);
      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($phone, '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 ($mailAddress != '') {
                                                  Mail::useService()->insertMailToPerson(
                                                      $tblPerson,
                                                      $mailAddress,
                                                      Mail::useService()->getTypeById(1),
          Severity: Major
          Found in Application/Transfer/Import/Naundorf/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/Herrnhut/Service.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ($tblPerson !== false) {
                                                  $countStudent++;
              
                                                  $LastName = trim($Document->getValue($Document->getCell($Location['Name'], $RunY)));
                                                  $City = trim($Document->getValue($Document->getCell($Location['PLZ Ort'], $RunY)));
              Severity: Major
              Found in Application/Transfer/Import/Chemnitz/Service.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                if (($OptionTypeA = trim($Document->getValue($Document->getCell($Location['Schulart 1'],
                                                        $RunY)))) !== ''
                                                ) {
                                                    if ($OptionTypeA == 'Oberschule') {
                                                        $tblOptionTypeA = Type::useService()->getTypeById(8);
                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($Number, '01')) {
                                                          $tblType = \SPHERE\Application\Contact\Phone\Phone::useService()->getTypeById(2);
                                                      }
                  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/Naundorf/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/Naundorf/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/Radebeul/Service.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                                  if (strpos($photo, '4') !== false) {
                                                                      $tblStudentAgreementType = Student::useService()->getStudentAgreementTypeById(5);
                                                                      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 (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 ($tblPersonFather) {
                                                                              Phone::useService()->insertPhoneToPerson(
                                                                                  $tblPersonFather,
                                                                                  $phoneNumber,
                                                                                  $tblType,
                              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));
                                                                            $this->useContactAddress()->createAddressToPersonFromImport(
                                                                                $tblPerson, $StreetName, $StreetNumber,
                                Severity: Major
                                Found in Application/Transfer/Import/Chemnitz/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 ($tblPersonFather) {
                                                                                    Phone::useService()->insertPhoneToPerson(
                                                                                        $tblPersonFather,
                                                                                        $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 ($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

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

                                                $Salutation,
                                                $Title,
                                                $FirstName,
                                                $SecondName,
                                                $LastName,
                                        Severity: Minor
                                        Found in Application/Transfer/Import/Chemnitz/Service/Person.php - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language