DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

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

    public function getActiveBasketVerificationByDebtorSelection(TblDebtorSelection $tblDebtorSelection)
    {

        if(($tblBasketVerificationList = $this->getBasketVerificationAllByDebtorSelection($tblDebtorSelection))){
            $BasketVerificationList = array();
Severity: Minor
Found in Application/Billing/Bookkeeping/Basket/Service.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 updateBasket has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        TblBasket $tblBasket,
        $Name,
        $Description,
        $TargetTime,
        $BillTime,
Severity: Minor
Found in Application/Billing/Bookkeeping/Basket/Service/Data.php - About 45 mins to fix

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

        public function changeBasket(TblBasket $tblBasket, $Name, $Description, $TargetTime, $BillTime, $CreditorId = '')
    Severity: Minor
    Found in Application/Billing/Bookkeeping/Basket/Service.php - About 45 mins to fix

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

          public function getSepaRemark($ignoreDefault = false)
          {
      
              if($ignoreDefault){
                  return $this->SepaRemark;
      Severity: Minor
      Found in Application/Billing/Inventory/Item/Service/Entity/TblItem.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

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

          public function getDocumentPanel(TblItem $tblItem, $Data, $Location, $Date)
          {
              $global = $this->getGlobal();
              $tblDocumentList = Document::useService()->getDocumentAllByItem($tblItem);
              if (!($tblDocument = Document::useService()->getDocumentById($Data['Document']))) {
      Severity: Minor
      Found in Application/Billing/Bookkeeping/Balance/Frontend.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

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

          public function runConvert($Row)
          {
      
              $ColumnMatch = array(
                  // Muster in Spalte ?? gefunden
      Severity: Minor
      Found in Application/Billing/Inventory/Import/ImportControl.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(($tblItemCalculation = Item::useService()->getItemCalculationNowByItemVariant($tblItemVariant))){
                                              $ItemPriceString = $tblItemCalculation->getPriceString();
                                          }
      Severity: Major
      Found in Application/Billing/Accounting/Causer/Frontend.php - About 45 mins to fix

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

                IFormInterface $Form,
                TblGroup $tblGroup,
                $DataAddPerson = null,
                $DataRemovePerson = null,
                TblGroup $tblFilterGroup = null,
        Severity: Minor
        Found in Application/People/Group/Service.php - About 45 mins to fix

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

                  TblStudent $tblStudent,
                  TblStudentSubjectType $tblStudentSubjectType,
                  TblStudentSubjectRanking $tblStudentSubjectRanking,
                  TblSubject $tblSubject,
                  TblLevel $tblLevelFrom = null,
          Severity: Minor
          Found in Application/People/Meta/Student/Service/Service/Subject.php - About 45 mins to fix

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

                    TblAccount $tblAccount,
                    $Description,
                    $Number,
                    $IsActive,
                    TblAccountKey $tblAccountKey,
            Severity: Minor
            Found in Application/Billing/Accounting/Account/Service/Data.php - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                                  if($IsDebtorNumberNeed && !($tblDebtorNumber = Debtor::useService()->getDebtorNumberByPerson($tblPersonDebtor))){
                                                      $Debtor .= ' '.new DangerText(new ToolTip(new Info(),
                                                              'Keine Debitoren-Nr. hinterlegt'));
                                                  }
              Severity: Major
              Found in Application/Billing/Accounting/Causer/Frontend.php - About 45 mins to fix

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

                    public function frontendDestroyGroup($Id, $Confirm = false)
                    {
                
                        $Stage = new Stage('Gruppe', 'Löschen');
                        $Stage->addButton(new Standard('Zurück', '/People/Group', new ChevronLeft()));
                Severity: Minor
                Found in Application/People/Group/Frontend.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

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

                    public function directRoute(IFormInterface &$Form, $GroupId = null, $Direction = '')
                    {
                
                        /**
                         * Skip to Frontend
                Severity: Minor
                Found in Application/Billing/Accounting/Debtor/Service.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 createKey has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function createKey($ValidFrom, $Value, $ValidTo, $Description, $Code, TblAccountKeyType $tblAccountKeyType)
                Severity: Minor
                Found in Application/Billing/Accounting/Account/Service/Data.php - About 45 mins to fix

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

                          $Id = null,
                          $DataAddPerson = null,
                          $DataRemovePerson = null,
                          $Filter = null,
                          $FilterGroupId = null,
                  Severity: Minor
                  Found in Application/People/Group/Frontend.php - About 45 mins to fix

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

                            TblStudentMedicalRecord $tblStudentMedicalRecord,
                            $Disease,
                            $Medication,
                            $AttendingDoctor,
                            $InsuranceState,
                    Severity: Minor
                    Found in Application/People/Meta/Student/Service/Data.php - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                  if (($tblLevel = $tblDivision->getTblLevel())
                                                      && !$tblLevel->getIsChecked()
                                                  ) {
                                                      return $tblDivision;
                                                  }
                      Severity: Major
                      Found in Application/People/Meta/Student/Service.php - About 45 mins to fix

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

                                TblStudent $tblStudent,
                                TblStudentSubjectType $tblStudentSubjectType,
                                TblStudentSubjectRanking $tblStudentSubjectRanking,
                                TblSubject $tblSubject,
                                TblLevel $tblLevelFrom = null,
                        Severity: Minor
                        Found in Application/People/Meta/Student/Service.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                                  if ($tblToPerson->getTblType()->getName() == "Sorgeberechtigt"
                                                                      && ($tblPersonFrom = $tblToPerson->getServiceTblPersonFrom())
                                                                      && ($tblPersonTo = $tblToPerson->getServiceTblPersonTo())
                                                                      && $tblPersonFrom->getId() == $tblPerson->getId()
                                                                  ) {
                          Severity: Major
                          Found in Application/People/Search/Group/Frontend.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if (isset( $Meta['SubjectLevelTill'] ) && isset( $Meta['SubjectLevelTill'][$Category][$Ranking] )) {
                                                                if ($Meta['SubjectLevelTill'][$Category][$Ranking]) {
                                                                    $tblLevelTill = Division::useService()->getLevelById($Meta['SubjectLevelTill'][$Category][$Ranking]);
                                                                }
                                                            }
                            Severity: Major
                            Found in Application/People/Meta/Student/Service.php - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language