DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function runConvert has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function runConvert($Row)
    {


        $ColumnMatch = array(

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function runConvert has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function runConvert($Row)
    {


        $ColumnMatch = array(
Severity: Minor
Found in Application/Transfer/Indiware/Import/LectureshipControl.php - About 45 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

        TblUntisImportLectureship $tblUntisImportLectureship = null,
        TblDivision $tblDivision = null,
        TblTeacher $tblTeacher = null,
        TblSubject $tblSubject = null,
        $SubjectGroup = '',
Severity: Minor
Found in Application/Transfer/Untis/Import/Service/Data.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                    if ($tblPerson && $tblDivision &&
                                        Division::useService()->getDivisionStudentByDivisionAndPerson($tblDivision,
                                            $tblPerson)
                                    ) {
                                        if ($tblDivisionSubject) {
    Severity: Major
    Found in Application/Transfer/Indiware/Import/Service.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  if(($tblCompany = $tblStudentIntegration->getServiceTblCompany())){
                                      $Company = $tblCompany->getDisplayName();
                                  }
      Severity: Major
      Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 45 mins to fix

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

                TblIndiwareImportLectureship $tblIndiwareImportLectureship = null,
                TblDivision $tblDivision = null,
                TblTeacher $tblTeacher = null,
                TblSubject $tblSubject = null,
                $SubjectGroup = '',
        Severity: Minor
        Found in Application/Transfer/Indiware/Import/Service/Data.php - About 45 mins to fix

          Function frontendLectureshipShow has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public function frontendLectureshipShow($Visible = false)
              {
                  $Stage = new Stage('Lehraufträge', 'Übersicht');
                  $Stage->addButton(new Standard('Zurück', '/Transfer/Indiware/Import', new ChevronLeft()));
                  $tblIndiwareImportLectureshipList = Import::useService()->getIndiwareImportLectureshipAll(true);
          Severity: Minor
          Found in Application/Transfer/Indiware/Import/Lectureship.php - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Avoid deeply nested control flow statements.
          Open

                                      if($tblSupport){
                                          $countDecision++;
                                          if(($tblStudentFocusList = Student::useService()->getStudentFocusAllByStudent($tblStudent))){
                                              foreach($tblStudentFocusList as $tblStudentFocus){
                                                  $FocusName = $tblStudentFocus->getTblStudentFocusType()->getName();
          Severity: Major
          Found in Application/Platform/System/DataMaintenance/DataMaintenance.php - About 45 mins to fix

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

                    Manager $Manager,
                    TblYear $tblYear,
                    TblAccount $tblAccount,
                    $Result = array(),
                    $TeacherCount = 1,
            Severity: Minor
            Found in Application/Transfer/Indiware/Import/Service/Data.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) {
                                                        $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 ($tblSubject) {
                                                              Student::useService()->addStudentSubject(
                                                                  $tblStudent,
                                                                  Student::useService()->getStudentSubjectTypeByIdentifier('RELIGION'),
                                                                  Student::useService()->getStudentSubjectRankingByIdentifier('1'),
                  Severity: Major
                  Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                    if (trim($Document->getValue($Document->getCell($Location['Wohnort'],
                                                            $RunY))) != ''
                                                    ) {
                                                        $Street = trim($Document->getValue($Document->getCell($Location['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 (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/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 ($subjectLanguage !== '') {
                                                                      if ($subjectLanguage === 'EN'
                                                                          || $subjectLanguage === 'Englisch'
                                                                      ) {
                                                                          $tblSubject = Subject::useService()->getSubjectByAcronym('EN');
                          Severity: Major
                          Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                    if ($tblCategory) {
                                                                        $tblStudentAgreementTypeAll = Student::useService()->getStudentAgreementTypeAllByCategory($tblCategory);
                                                                        if ($tblStudentAgreementTypeAll) {
                                                                            foreach ($tblStudentAgreementTypeAll as $tblStudentAgreementType) {
                                                                                Student::useService()->insertStudentAgreement($tblStudent,
                            Severity: Major
                            Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                              if ($tblLevel) {
                                                                  $Division = trim($Document->getValue($Document->getCell($Location['Schüler_Klasse'],
                                                                      $RunY)));
                                                                  if ($Division != '') {
                                                                      if (( $pos = strpos($Division, $Level) ) !== false) {
                              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) {
                                                                        $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 (0 === strpos($phoneNumber, '01')) {
                                                                              $tblType = Phone::useService()->getTypeById(2);
                                                                          }
                                  Severity: Major
                                  Found in Application/Transfer/Import/Schneeberg/Service.php - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language