DerDu/SPHERE-Framework

View on GitHub
Application/Api/Billing/Accounting/ApiDebtorSelection.php

Summary

Maintainability
F
1 wk
Test Coverage

File ApiDebtorSelection.php has 803 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Api\Billing\Accounting;

use SPHERE\Application\Api\ApiTrait;
Severity: Major
Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 1 day to fix

    Function formDebtorSelection has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
    Open

        public function formDebtorSelection($Identifier = '', $PersonId = '', $ItemId = '', $DebtorSelectionId = '')
        {
    
            // choose between Add and Edit
            $SaveButton = new Primary('Speichern', self::getEndpoint(), new Save());
    Severity: Minor
    Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 1 day 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 formDebtorSelection has 159 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function formDebtorSelection($Identifier = '', $PersonId = '', $ItemId = '', $DebtorSelectionId = '')
        {
    
            // choose between Add and Edit
            $SaveButton = new Primary('Speichern', self::getEndpoint(), new Save());
    Severity: Major
    Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 6 hrs to fix

      Function saveEditDebtorSelection has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
      Open

          public function saveEditDebtorSelection(
              $Identifier = '',
              $PersonId = '',
              $ItemId = '',
              $DebtorSelectionId = '',
      Severity: Minor
      Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 5 hrs 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 getSelectBoxDebtor has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function getSelectBoxDebtor(TblPerson $tblPerson)
          {
      
              if(($tblRelationshipType = Relationship::useService()->getTypeByName('Beitragszahler'))){
                  if(($tblRelationshipList = Relationship::useService()->getPersonRelationshipAllByPerson($tblPerson,
      Severity: Minor
      Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 4 hrs 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 checkInputDebtorSelection has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
      Open

          private function checkInputDebtorSelection(
              $Identifier = '',
              $PersonId = '',
              $ItemId = '',
              $DebtorSelectionId = '',
      Severity: Minor
      Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 4 hrs 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 showDeleteDebtorSelection has 84 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function showDeleteDebtorSelection($Identifier = '', $PersonId = '', $ItemId = '', $DebtorSelectionId = '')
          {
      
              $tblDebtorSelection = Debtor::useService()->getDebtorSelectionById($DebtorSelectionId);
      
      
      Severity: Major
      Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 3 hrs to fix

        Function getBankAccountRadioBoxList has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

            public static function getBankAccountRadioBoxList($PersonDebtorList)
            {
        
                $PostBankAccountId = false;
                $RadioBoxListBankAccount['-1'] = new RadioBox('DebtorSelection[BankAccount]'
        Severity: Minor
        Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 3 hrs 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 saveEditDebtorSelection has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function saveEditDebtorSelection(
                $Identifier = '',
                $PersonId = '',
                $ItemId = '',
                $DebtorSelectionId = '',
        Severity: Major
        Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 2 hrs to fix

          Method checkInputDebtorSelection has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function checkInputDebtorSelection(
                  $Identifier = '',
                  $PersonId = '',
                  $ItemId = '',
                  $DebtorSelectionId = '',
          Severity: Major
          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 2 hrs to fix

            Function showDeleteDebtorSelection has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
            Open

                public function showDeleteDebtorSelection($Identifier = '', $PersonId = '', $ItemId = '', $DebtorSelectionId = '')
                {
            
                    $tblDebtorSelection = Debtor::useService()->getDebtorSelectionById($DebtorSelectionId);
            
            
            Severity: Minor
            Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 2 hrs 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

            ApiDebtorSelection has 22 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class ApiDebtorSelection extends Extension implements IApiInterface
            {
            
                // registered method
                use ApiTrait;
            Severity: Minor
            Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 2 hrs to fix

              Method saveAddDebtorSelection has 52 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function saveAddDebtorSelection($Identifier = '', $PersonId = '', $ItemId = '', $DebtorSelection = array())
                  {
              
                      // Handle error's
                      if($form = $this->checkInputDebtorSelection($Identifier, $PersonId, $ItemId, '', $DebtorSelection)){
              Severity: Major
              Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 2 hrs to fix

                Method getSelectBoxDebtor has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function getSelectBoxDebtor(TblPerson $tblPerson)
                    {
                
                        if(($tblRelationshipType = Relationship::useService()->getTypeByName('Beitragszahler'))){
                            if(($tblRelationshipList = Relationship::useService()->getPersonRelationshipAllByPerson($tblPerson,
                Severity: Minor
                Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 1 hr to fix

                  Function saveAddDebtorSelection has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function saveAddDebtorSelection($Identifier = '', $PersonId = '', $ItemId = '', $DebtorSelection = array())
                      {
                  
                          // Handle error's
                          if($form = $this->checkInputDebtorSelection($Identifier, $PersonId, $ItemId, '', $DebtorSelection)){
                  Severity: Minor
                  Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 1 hr 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 getDebtorNumberByPerson has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private static function getDebtorNumberByPerson(TblPerson $tblPerson)
                      {
                  
                          $IsDebtorNumberNeed = false;
                          if($tblSetting = Setting::useService()->getSettingByIdentifier(TblSetting::IDENT_IS_DATEV)){
                  Severity: Minor
                  Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 1 hr 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){
                                                  $ItemPrice = $tblItemCalculation->getValue();
                                              }
                  Severity: Major
                  Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 45 mins to fix

                    Method saveEditDebtorSelection has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            $Identifier = '',
                            $PersonId = '',
                            $ItemId = '',
                            $DebtorSelectionId = '',
                            $DebtorSelection = array()
                    Severity: Minor
                    Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 35 mins to fix

                      Method pipelineOpenEditDebtorSelectionModal has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              $Identifier = '',
                              $PersonId = '',
                              $ItemId = '',
                              $DebtorSelectionId = '',
                              $DebtorSelection = array()
                      Severity: Minor
                      Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 35 mins to fix

                        Method checkInputDebtorSelection has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                $Identifier = '',
                                $PersonId = '',
                                $ItemId = '',
                                $DebtorSelectionId = '',
                                $DebtorSelection = array()
                        Severity: Minor
                        Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php - About 35 mins to fix

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      if(isset($DebtorSelection['Price']) && empty($DebtorSelection['Price']) && $DebtorSelection['Price'] != '0'){
                                          $Warning .= new Warning('Bitte geben Sie einen individuellen Preis an');
                          //                $form->setError('DebtorSelection[Price]', 'Bitte geben Sie einen Individuellen Preis an');
                                          $Error = true;
                                      } elseif(isset($DebtorSelection['Price']) && !is_numeric(str_replace(',', '.',
                          Severity: Major
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 1 other location - About 3 hrs to fix
                          Application/Api/Billing/Bookkeeping/ApiBasketVerification.php on lines 708..720

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 147.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              public static function pipelineDeleteDebtorSelection($Identifier = '', $PersonId = '', $ItemId = '',
                                  $DebtorSelectionId = ''
                              ){
                          
                                  $Receiver = self::receiverModal(null, $Identifier);
                          Severity: Major
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 1 other location - About 2 hrs to fix
                          Application/Api/Billing/Accounting/ApiDebtorSelection.php on lines 237..259

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 140.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              public static function pipelineOpenDeleteDebtorSelectionModal(
                                  $Identifier = '',
                                  $PersonId = '',
                                  $ItemId = '',
                                  $DebtorSelectionId = ''
                          Severity: Major
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 1 other location - About 2 hrs to fix
                          Application/Api/Billing/Accounting/ApiDebtorSelection.php on lines 269..288

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 140.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 7 locations. Consider refactoring.
                          Open

                              public static function pipelineSaveAddDebtorSelection($Identifier = '', $PersonId = '', $ItemId = '')
                              {
                          
                                  $Receiver = self::receiverModal(null, $Identifier);
                                  $Pipeline = new Pipeline();
                          Severity: Major
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 6 other locations - About 2 hrs to fix
                          Application/Api/Billing/Accounting/ApiBankAccount.php on lines 202..219
                          Application/Api/Billing/Accounting/ApiBankAccount.php on lines 228..245
                          Application/Api/Billing/Accounting/ApiBankReference.php on lines 205..222
                          Application/Api/Billing/Accounting/ApiBankReference.php on lines 231..248
                          Application/Api/Billing/Accounting/ApiDebtor.php on lines 208..225
                          Application/Api/Billing/Accounting/ApiDebtor.php on lines 234..251

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 129.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if(($tblRelationshipType = Relationship::useService()->getTypeByName('Bevollmächtigt'))){
                                      if(($tblRelationshipList = Relationship::useService()->getPersonRelationshipAllByPerson($tblPerson,
                                          $tblRelationshipType))){
                                          foreach($tblRelationshipList as $tblRelationship) {
                                              if(($tblPersonRel = $tblRelationship->getServiceTblPersonFrom()) && $tblPersonRel->getId() !== $tblPerson->getId()){
                          Severity: Major
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 2 other locations - About 2 hrs to fix
                          Application/Api/Billing/Accounting/ApiDebtorSelection.php on lines 575..586
                          Application/Api/Billing/Accounting/ApiDebtorSelection.php on lines 587..598

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 121.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if(($tblRelationshipType = Relationship::useService()->getTypeByName('Sorgeberechtigt'))){
                                      if(($tblRelationshipList = Relationship::useService()->getPersonRelationshipAllByPerson($tblPerson,
                                          $tblRelationshipType))){
                                          foreach($tblRelationshipList as $tblRelationship) {
                                              if(($tblPersonRel = $tblRelationship->getServiceTblPersonFrom()) && $tblPersonRel->getId() !== $tblPerson->getId()){
                          Severity: Major
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 2 other locations - About 2 hrs to fix
                          Application/Api/Billing/Accounting/ApiDebtorSelection.php on lines 575..586
                          Application/Api/Billing/Accounting/ApiDebtorSelection.php on lines 599..610

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 121.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if(($tblRelationshipType = Relationship::useService()->getTypeByName('Beitragszahler'))){
                                      if(($tblRelationshipList = Relationship::useService()->getPersonRelationshipAllByPerson($tblPerson,
                                          $tblRelationshipType))){
                                          foreach($tblRelationshipList as $tblRelationship) {
                                              if(($tblPersonRel = $tblRelationship->getServiceTblPersonFrom()) && $tblPersonRel->getId() !== $tblPerson->getId()){
                          Severity: Major
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 2 other locations - About 2 hrs to fix
                          Application/Api/Billing/Accounting/ApiDebtorSelection.php on lines 587..598
                          Application/Api/Billing/Accounting/ApiDebtorSelection.php on lines 599..610

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 121.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                              if(isset($DebtorSelection['BankAccount']) && empty($DebtorSelection['BankAccount'])){
                                                  $Warning .= new Warning('Bitte geben sie eine Bankverbindung an. (Eine Bankverbindung wird benötigt,
                                                   um ein SEPA-Lastschriftverfahren zu hinterlegen) Wahlweise andere Bezahlart auswählen.');
                                                  $form->setError('DebtorSelection[BankAccount]', 'Bitte geben Sie eine Bankverbindung an');
                                                  $Error = true;
                          Severity: Major
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 1 other location - About 1 hr to fix
                          Application/Api/Billing/Bookkeeping/ApiBasketVerification.php on lines 736..746

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 115.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  if(($tblPerson = Person::useService()->getPersonById($PersonId))){
                                      $PersonTitle = ' für '.new Bold($tblPerson->getFirstName().' '.$tblPerson->getLastName());
                                      $ObjectList = self::getSelectBoxDebtor($tblPerson);
                                      if(isset($ObjectList['SelectBoxDebtorList']) && $ObjectList['SelectBoxDebtorList']){
                                          $SelectBoxDebtorList = $ObjectList['SelectBoxDebtorList'];
                          Severity: Major
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 1 other location - About 1 hr to fix
                          Application/Api/Billing/Bookkeeping/ApiBasketVerification.php on lines 595..604

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 107.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  if($tblBankReferenceList){
                                      // Post first entry if PaymentType = SEPA-Lastschrift
                                      if(isset($_POST['DebtorSelection']['PaymentType'])
                                          && ($tblPaymentType = Balance::useService()->getPaymentTypeById($_POST['DebtorSelection']['PaymentType']))
                                          && $tblPaymentType->getName() == 'SEPA-Lastschrift'){
                          Severity: Minor
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 1 other location - About 45 mins to fix
                          Application/Api/Billing/Bookkeeping/ApiBasketVerification.php on lines 608..617

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 96.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                          new FormRow(array(
                                              new FormColumn(
                                                  array(
                                                      new Bold('Varianten '.new DangerText('*')),
                                                      new Listing($RadioBoxListVariant)
                          Severity: Minor
                          Found in Application/Api/Billing/Accounting/ApiDebtorSelection.php and 1 other location - About 30 mins to fix
                          Application/Api/Billing/Bookkeeping/ApiBasketVerification.php on lines 646..659

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 90.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          There are no issues that match your filters.

                          Category
                          Status