DerDu/SPHERE-Framework

View on GitHub
Application/Billing/Bookkeeping/Balance/Service.php

Summary

Maintainability
F
2 wks
Test Coverage

Function createSepaContent has a Cognitive Complexity of 149 (exceeds 5 allowed). Consider refactoring.
Open

    public function createSepaContent(TblBasket $tblBasket, $CheckboxList = array(), $FeeList = array())
    {

        $tblInvoiceList = Invoice::useService()->getInvoiceByBasket($tblBasket);
        if(!$tblInvoiceList){
Severity: Minor
Found in Application/Billing/Bookkeeping/Balance/Service.php - About 3 days 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

File Service.php has 1063 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Billing\Bookkeeping\Balance;

use Digitick\Sepa\GroupHeader;
Severity: Major
Found in Application/Billing/Bookkeeping/Balance/Service.php - About 2 days to fix

    Method createDatevCsv has 322 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function createDatevCsv(TblBasket $tblBasket)
        {
    
            $tblInvoiceList = Invoice::useService()->getInvoiceByBasket($tblBasket);
            if(!$tblInvoiceList){
    Severity: Major
    Found in Application/Billing/Bookkeeping/Balance/Service.php - About 1 day to fix

      Function createBalanceListExcel has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
      Open

          public function createBalanceListExcel($PriceList, $tblItemList = array())
          {
      
              $PersonList = array();
              if(!empty($PriceList)){
      Severity: Minor
      Found in Application/Billing/Bookkeeping/Balance/Service.php - About 7 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 getPriceListByItemAndYear has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getPriceListByItemAndYear(
              TblItem $tblItem,
              $Year,
              $MonthFrom = '1',
              $MonthTo = '12',
      Severity: Minor
      Found in Application/Billing/Bookkeeping/Balance/Service.php - About 6 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 createSepaCreditContent has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
      Open

          public function createSepaCreditContent(TblBasket $tblBasket)
          {
      
              $tblInvoiceList = Invoice::useService()->getInvoiceByBasket($tblBasket);
              if(!$tblInvoiceList){
      Severity: Minor
      Found in Application/Billing/Bookkeeping/Balance/Service.php - About 6 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 createSepaContent has 151 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function createSepaContent(TblBasket $tblBasket, $CheckboxList = array(), $FeeList = array())
          {
      
              $tblInvoiceList = Invoice::useService()->getInvoiceByBasket($tblBasket);
              if(!$tblInvoiceList){
      Severity: Major
      Found in Application/Billing/Bookkeeping/Balance/Service.php - About 6 hrs to fix

        Function fillColumnRowItemPriceList has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
        Open

            private function fillColumnRowItemPriceList(&$tableContent, TblPerson $tblPersonDebtor, $CauserId, $ItemContent)
            {
        
                if(($tblPersonCauser = Person::useService()->getPersonById($CauserId))){
                    $item['Debtor'] = $tblPersonDebtor->getLastFirstName();
        Severity: Minor
        Found in Application/Billing/Bookkeeping/Balance/Service.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 createDatevCsv has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

            public function createDatevCsv(TblBasket $tblBasket)
            {
        
                $tblInvoiceList = Invoice::useService()->getInvoiceByBasket($tblBasket);
                if(!$tblInvoiceList){
        Severity: Minor
        Found in Application/Billing/Bookkeeping/Balance/Service.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 createBalanceListExcel has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function createBalanceListExcel($PriceList, $tblItemList = array())
            {
        
                $PersonList = array();
                if(!empty($PriceList)){
        Severity: Major
        Found in Application/Billing/Bookkeeping/Balance/Service.php - About 3 hrs to fix

          Function getPriceListByPerson has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getPriceListByPerson(TblItem $tblItem, $Year, $MonthFrom, $MonthTo, TblPerson $tblPerson)
              {
                  $ResultList = (new Data($this->getBinding()))->getPriceListByPerson($tblItem, $Year, $MonthFrom, $MonthTo, $tblPerson);
                  $PriceList = array();
                  if($ResultList){
          Severity: Minor
          Found in Application/Billing/Bookkeeping/Balance/Service.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

          Service has 27 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Service extends AbstractService
          {
          
              /**
               * @param bool $doSimulation
          Severity: Minor
          Found in Application/Billing/Bookkeeping/Balance/Service.php - About 3 hrs to fix

            Method getPriceListByItemAndYear has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getPriceListByItemAndYear(
                    TblItem $tblItem,
                    $Year,
                    $MonthFrom = '1',
                    $MonthTo = '12',
            Severity: Major
            Found in Application/Billing/Bookkeeping/Balance/Service.php - About 2 hrs to fix

              Function getSummaryByItemPrice has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getSummaryByItemPrice($PriceList)
                  {
              
                      if(!empty($PriceList)){
                          foreach($PriceList as &$DebtorContent) {
              Severity: Minor
              Found in Application/Billing/Bookkeeping/Balance/Service.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

              Method createSepaCreditContent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function createSepaCreditContent(TblBasket $tblBasket)
                  {
              
                      $tblInvoiceList = Invoice::useService()->getInvoiceByBasket($tblBasket);
                      if(!$tblInvoiceList){
              Severity: Minor
              Found in Application/Billing/Bookkeeping/Balance/Service.php - About 1 hr to fix

                Function fillColumnRowPriceList has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                    private function fillColumnRowPriceList(&$tableContent, TblPerson $tblPersonDebtor, $CauserId, $Value)
                    {
                
                        if(($tblPersonCauser = Person::useService()->getPersonById($CauserId))){
                            $MonthOpenList = array();
                Severity: Minor
                Found in Application/Billing/Bookkeeping/Balance/Service.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

                Method fillColumnRowItemPriceList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function fillColumnRowItemPriceList(&$tableContent, TblPerson $tblPersonDebtor, $CauserId, $ItemContent)
                    {
                
                        if(($tblPersonCauser = Person::useService()->getPersonById($CauserId))){
                            $item['Debtor'] = $tblPersonDebtor->getLastFirstName();
                Severity: Minor
                Found in Application/Billing/Bookkeeping/Balance/Service.php - About 1 hr to fix

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

                      public function getPriceListByItemAndPerson(TblItem $tblItem, $Year, $MonthFrom, $MonthTo, TblPerson $tblPerson, $PriceList = array())
                      {
                          $ResultList = (new Data($this->getBinding()))->getPriceListByPerson($tblItem, $Year, $MonthFrom, $MonthTo, $tblPerson);
                          if($ResultList){
                              foreach($ResultList as $Key => $RowContent) {
                  Severity: Minor
                  Found in Application/Billing/Bookkeeping/Balance/Service.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

                  Method addCombinedTransfer has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function addCombinedTransfer(CustomerDirectDebitFacade $directDebit, $combinedItemDebtorList = array())
                      {
                  
                          /** @var TblInvoiceItemDebtor $tblInvoiceItemDebtor */
                          foreach($combinedItemDebtorList as $ReferenceGroup){
                  Severity: Minor
                  Found in Application/Billing/Bookkeeping/Balance/Service.php - About 1 hr to fix

                    Method getPriceListByPerson has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getPriceListByPerson(TblItem $tblItem, $Year, $MonthFrom, $MonthTo, TblPerson $tblPerson)
                        {
                            $ResultList = (new Data($this->getBinding()))->getPriceListByPerson($tblItem, $Year, $MonthFrom, $MonthTo, $tblPerson);
                            $PriceList = array();
                            if($ResultList){
                    Severity: Minor
                    Found in Application/Billing/Bookkeeping/Balance/Service.php - About 1 hr to fix

                      Method fillColumnRowPriceList has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function fillColumnRowPriceList(&$tableContent, TblPerson $tblPersonDebtor, $CauserId, $Value)
                          {
                      
                              if(($tblPersonCauser = Person::useService()->getPersonById($CauserId))){
                                  $MonthOpenList = array();
                      Severity: Minor
                      Found in Application/Billing/Bookkeeping/Balance/Service.php - About 1 hr to fix

                        Function getTableContentByItemPriceList has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function getTableContentByItemPriceList($PriceList = array())
                            {
                        
                                $tableContent = array();
                                if(!empty($PriceList)){
                        Severity: Minor
                        Found in Application/Billing/Bookkeeping/Balance/Service.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 getTableContentByPriceList has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function getTableContentByPriceList($PriceList = array())
                            {
                        
                                $tableContent = array();
                                if(!empty($PriceList)){
                        Severity: Minor
                        Found in Application/Billing/Bookkeeping/Balance/Service.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

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

                            public function getPriceListByItemAndPerson(TblItem $tblItem, $Year, $MonthFrom, $MonthTo, TblPerson $tblPerson, $PriceList = array())
                        Severity: Minor
                        Found in Application/Billing/Bookkeeping/Balance/Service.php - About 45 mins to fix

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

                                  TblItem $tblItem,
                                  $Year,
                                  $MonthFrom = '1',
                                  $MonthTo = '12',
                                  $DivisionId = '0',
                          Severity: Minor
                          Found in Application/Billing/Bookkeeping/Balance/Service.php - About 45 mins to fix

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

                                public function getPriceListByPerson(TblItem $tblItem, $Year, $MonthFrom, $MonthTo, TblPerson $tblPerson)
                            Severity: Minor
                            Found in Application/Billing/Bookkeeping/Balance/Service.php - About 35 mins to fix

                              Function addCombinedTransfer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private function addCombinedTransfer(CustomerDirectDebitFacade $directDebit, $combinedItemDebtorList = array())
                                  {
                              
                                      /** @var TblInvoiceItemDebtor $tblInvoiceItemDebtor */
                                      foreach($combinedItemDebtorList as $ReferenceGroup){
                              Severity: Minor
                              Found in Application/Billing/Bookkeeping/Balance/Service.php - About 35 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 addCompanyTransfer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private function addCompanyTransfer(CustomerCreditFacade $customerCredit, $tblInvoiceItemDebtorList, $PaymentId)
                                  {
                              
                                      /** @var TblInvoiceItemDebtor $tblInvoiceItemDebtor */
                                      foreach($tblInvoiceItemDebtorList as $tblInvoiceItemDebtor) {
                              Severity: Minor
                              Found in Application/Billing/Bookkeeping/Balance/Service.php - About 35 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 getBookingText has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private function getBookingText(TblInvoiceItemDebtor $tblInvoiceItemDebtor, $bookingText = '', $ItemCombinedName = '')
                                  {
                              
                                      $ItemName = $ItemCombinedName;
                                      if($ItemName == ''){
                              Severity: Minor
                              Found in Application/Billing/Bookkeeping/Balance/Service.php - About 25 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 getPersonListByInvoiceTime has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function getPersonListByInvoiceTime($Year, $From, $To)
                                  {
                              
                                      $tblPersonList = array();
                                      $PersonIdList = (new Data($this->getBinding()))->getPersonIdListByInvoiceTime($Year, $From, $To);
                              Severity: Minor
                              Found in Application/Billing/Bookkeeping/Balance/Service.php - About 25 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

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

                                      if($ResultList){
                                          foreach($ResultList as $Key => $RowContent) {
                                              $PersonDebtorId = isset($RowContent['PersonDebtorId']) ? $RowContent['PersonDebtorId'] : false;
                                              $PersonCauserId = isset($RowContent['PeronCauserId']) ? $RowContent['PeronCauserId'] : false;
                                              $timeString = isset($RowContent['Year']) && isset($RowContent['Month']) ? $RowContent['Year'].'/'.$RowContent['Month'] : false;
                              Severity: Major
                              Found in Application/Billing/Bookkeeping/Balance/Service.php and 1 other location - About 7 hrs to fix
                              Application/Billing/Bookkeeping/Balance/Service.php on lines 562..576

                              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 227.

                              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($ResultList){
                                          foreach($ResultList as $Key => $RowContent) {
                                              $PersonDebtorId = isset($RowContent['PersonDebtorId']) ? $RowContent['PersonDebtorId'] : false;
                                              $PersonCauserId = isset($RowContent['PeronCauserId']) ? $RowContent['PeronCauserId'] : false;
                                              $timeString = isset($RowContent['Year']) && isset($RowContent['Month']) ? $RowContent['Year'].'/'.$RowContent['Month'] : false;
                              Severity: Major
                              Found in Application/Billing/Bookkeeping/Balance/Service.php and 1 other location - About 7 hrs to fix
                              Application/Billing/Bookkeeping/Balance/Service.php on lines 145..159

                              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 227.

                              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(!empty($MonthOpenList)){
                                              $ToolTipMonthPrice = new Bold('Offene Posten<br/>').implode('<br/>',
                                                      $MonthOpenList).new Ruler();
                                              $ToolTipMonthPrice .= new Bold('Bezahlt<br/>').implode('<br/>', $MonthList);
                                          } else {
                              Severity: Minor
                              Found in Application/Billing/Bookkeeping/Balance/Service.php and 1 other location - About 50 mins to fix
                              Application/Billing/Bookkeeping/Balance/Service.php on lines 285..291

                              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 97.

                              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(!empty($MonthOpenList)){
                                                      $ToolTipMonthPrice = new Bold('Offene Posten<br/>').implode('<br/>',
                                                              $MonthOpenList).new Ruler();
                                                      $ToolTipMonthPrice .= new Bold('Bezahlt<br/>').implode('<br/>', $MonthList);
                                                  } else {
                              Severity: Minor
                              Found in Application/Billing/Bookkeeping/Balance/Service.php and 1 other location - About 50 mins to fix
                              Application/Billing/Bookkeeping/Balance/Service.php on lines 330..336

                              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 97.

                              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(isset($Value['PriceMissing'])){
                                                      foreach($Value['PriceMissing'] as $Time => $PriceMissing) {
                                                          $MonthOpenList[] = new DangerText(Balance::useService()->getPriceString($PriceMissing).' ('.$Time.')');
                                                      }
                                                      $item['Info'] = new DangerText(new ToolTip(new EyeOpen(), 'Offene Posten'));
                              Severity: Minor
                              Found in Application/Billing/Bookkeeping/Balance/Service.php and 1 other location - About 40 mins to fix
                              Application/Billing/Bookkeeping/Balance/Service.php on lines 319..324

                              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 93.

                              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(isset($Value['PriceMissing'])){
                                              foreach($Value['PriceMissing'] as $Time => $PriceMissing) {
                                                  $MonthOpenList[] = new DangerText(Balance::useService()->getPriceString($PriceMissing).' ('.$Time.')');
                                              }
                                              $item['Info'] = new DangerText(new ToolTip(new EyeOpen(), 'Offene Posten'));
                              Severity: Minor
                              Found in Application/Billing/Bookkeeping/Balance/Service.php and 1 other location - About 40 mins to fix
                              Application/Billing/Bookkeeping/Balance/Service.php on lines 274..279

                              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 93.

                              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