DerDu/SPHERE-Framework

View on GitHub
Application/Billing/Bookkeeping/Basket/Service/Data.php

Summary

Maintainability
F
1 wk
Test Coverage

File Data.php has 536 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SPHERE\Application\Billing\Bookkeeping\Basket\Service;

use SPHERE\Application\Billing\Accounting\Creditor\Service\Entity\TblCreditor;
Severity: Major
Found in Application/Billing/Bookkeeping/Basket/Service/Data.php - About 1 day to fix

    Data has 33 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Data extends AbstractData
    {
    
        public function setupDatabaseContent()
        {
    Severity: Minor
    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php - About 4 hrs to fix

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

          public function createBasketVerificationBulk(
              TblBasket $tblBasket,
              TblItem $tblItem,
              $DebtorDataArray = array()
          ){
      Severity: Minor
      Found in Application/Billing/Bookkeeping/Basket/Service/Data.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 createBasketVerificationBulk has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function createBasketVerificationBulk(
              TblBasket $tblBasket,
              TblItem $tblItem,
              $DebtorDataArray = array()
          ){
      Severity: Major
      Found in Application/Billing/Bookkeeping/Basket/Service/Data.php - About 2 hrs to fix

        Method createBasket has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $Name,
                $Description,
                $Year,
                $Month,
                $TargetTime,
        Severity: Major
        Found in Application/Billing/Bookkeeping/Basket/Service/Data.php - About 1 hr to fix

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

              public function createBasketVerification(
                  TblBasket $tblBasket,
                  TblItem $tblItem,
                  $Price,
                  TblPerson $tblPersonCauser,
          Severity: Minor
          Found in Application/Billing/Bookkeeping/Basket/Service/Data.php - About 1 hr to fix

            Method createBasketVerification has 10 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    TblBasket $tblBasket,
                    TblItem $tblItem,
                    $Price,
                    TblPerson $tblPersonCauser,
                    TblPerson $tblPersonDebtor = null,
            Severity: Major
            Found in Application/Billing/Bookkeeping/Basket/Service/Data.php - About 1 hr to fix

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

                  public function destroyBasketItemBulk($BasketItemIdList)
                  {
              
                      $Manager = $this->getConnection()->getEntityManager();
                      if(!empty($BasketItemIdList)){
              Severity: Minor
              Found in Application/Billing/Bookkeeping/Basket/Service/Data.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 destroyBasketVerificationBulk has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function destroyBasketVerificationBulk($BasketVerificationIdList = array())
                  {
              
                      $Manager = $this->getConnection()->getEntityManager();
                      if(!empty($BasketVerificationIdList)){
              Severity: Minor
              Found in Application/Billing/Bookkeeping/Basket/Service/Data.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 createBasket has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function createBasket(
                      $Name,
                      $Description,
                      $Year,
                      $Month,
              Severity: Minor
              Found in Application/Billing/Bookkeeping/Basket/Service/Data.php - About 1 hr to fix

                Method updateBasketVerificationDebtor has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        TblBasketVerification $tblBasketVerification,
                        TblPerson $tblPersonDebtor,
                        TblPaymentType $tblPaymentType,
                        $Value = '0',
                        TblItemVariant $tblItemVariant = null,
                Severity: Major
                Found in Application/Billing/Bookkeeping/Basket/Service/Data.php - About 50 mins to fix

                  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

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

                        public function updateBasketVerificationDebtor(
                            TblBasketVerification $tblBasketVerification,
                            TblPerson $tblPersonDebtor,
                            TblPaymentType $tblPaymentType,
                            $Value = '0',
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 1 other location - About 3 hrs to fix
                    Application/Education/Certificate/Prepare/Service/Data.php on lines 547..577

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

                    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 function destroyBasketItemBulk($BasketItemIdList)
                        {
                    
                            $Manager = $this->getConnection()->getEntityManager();
                            if(!empty($BasketItemIdList)){
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 1 other location - About 3 hrs to fix
                    Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 840..861

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

                    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 function destroyBasketVerificationBulk($BasketVerificationIdList = array())
                        {
                    
                            $Manager = $this->getConnection()->getEntityManager();
                            if(!empty($BasketVerificationIdList)){
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 1 other location - About 3 hrs to fix
                    Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 791..812

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

                    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 function updateBasketSepa(TblBasket $tblBasket, $PersonName)
                        {
                    
                            $Manager = $this->getConnection()->getEntityManager();
                    
                    
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 1 other location - About 3 hrs to fix
                    Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 611..631

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

                    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 function updateBasketDatev(TblBasket $tblBasket, $PersonName)
                        {
                    
                            $Manager = $this->getConnection()->getEntityManager();
                    
                    
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 1 other location - About 3 hrs to fix
                    Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 583..603

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

                    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 23 locations. Consider refactoring.
                    Open

                        public function createBasketItem(TblBasket $tblBasket, TblItem $tblItem)
                        {
                    
                            $Manager = $this->getConnection()->getEntityManager();
                    
                    
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 22 other locations - About 3 hrs to fix
                    Application/Billing/Inventory/Document/Service/Data.php on lines 166..184
                    Application/Billing/Inventory/Item/Service/Data.php on lines 569..593
                    Application/Corporation/Group/Service/Data.php on lines 286..303
                    Application/Education/Certificate/Generator/Service/Data.php on lines 4382..4404
                    Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 496..519
                    Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 595..618
                    Application/Education/Lesson/Division/Service/Data.php on lines 1095..1112
                    Application/Education/Lesson/Division/Service/Data.php on lines 1120..1138
                    Application/Education/Lesson/Subject/Service/Data.php on lines 221..238
                    Application/Education/Lesson/Subject/Service/Data.php on lines 272..289
                    Application/Education/Lesson/Term/Service/Data.php on lines 234..251
                    Application/People/Group/Service/Data.php on lines 365..382
                    Application/People/Meta/Student/Service/Data/Agreement.php on lines 182..205
                    Application/People/Meta/Student/Service/Data/Integration.php on lines 321..344
                    Application/People/Meta/Student/Service/Data/Liberation.php on lines 165..188
                    Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 285..302
                    Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 328..345
                    Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 371..388
                    Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 294..311
                    Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 319..336
                    Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 1132..1149
                    Application/Reporting/SerialLetter/Service/Data.php on lines 472..493

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

                    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 function updateBasketDone(TblBasket $tblBasket, $IsDone = true)
                        {
                    
                            $Manager = $this->getConnection()->getEntityManager();
                    
                    
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 1 other location - About 2 hrs to fix
                    Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 556..575

                    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 function updateBasketArchive(TblBasket $tblBasket, $IsArchive = true)
                        {
                    
                            $Manager = $this->getConnection()->getEntityManager();
                    
                    
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 1 other location - About 2 hrs to fix
                    Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 529..548

                    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 5 locations. Consider refactoring.
                    Open

                        public function createBasketType(
                            $Name,
                            $Description
                        ){
                    
                    
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 4 other locations - About 2 hrs to fix
                    Application/People/Meta/Student/Service/Data/Student.php on lines 444..463
                    Application/People/Meta/Student/Service/Data/Subject.php on lines 26..41
                    Application/People/Meta/Student/Service/Data/Subject.php on lines 71..86
                    Application/People/Meta/Student/Service/Data/Transfer.php on lines 27..42

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

                    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 14 locations. Consider refactoring.
                    Open

                        public function updateBasketVerificationInQuantity(TblBasketVerification $tblBasketVerification, $Quantity)
                        {
                    
                            $Manager = $this->getConnection()->getEntityManager();
                    
                    
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 13 other locations - About 2 hrs to fix
                    Application/Education/Certificate/Generate/Service/Data.php on lines 279..299
                    Application/Education/Certificate/Prepare/Service/Data.php on lines 1642..1662
                    Application/Education/Certificate/Prepare/Service/Data.php on lines 1729..1749
                    Application/Education/Certificate/Prepare/Service/Data.php on lines 1799..1819
                    Application/Education/Graduation/Gradebook/MinimumGradeCount/Data.php on lines 230..250
                    Application/Education/Lesson/Division/Service/Data.php on lines 2033..2050
                    Application/Education/Lesson/Division/Service/Data.php on lines 2298..2315
                    Application/Reporting/CheckList/Service/Data.php on lines 69..84
                    Application/Reporting/CheckList/Service/Data.php on lines 567..584
                    Application/Reporting/CheckList/Service/Data.php on lines 696..713
                    Application/Reporting/Individual/Service/Data.php on lines 219..238
                    Application/Reporting/SerialLetter/Service/Data.php on lines 619..635
                    Application/Setting/Consumer/Service/Data.php on lines 475..493

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

                    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 16 locations. Consider refactoring.
                    Open

                        public function destroyBasketItem(
                            TblBasketItem $tblBasketItem
                        ){
                    
                            $Manager = $this->getConnection()->getEntityManager();
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 15 other locations - About 1 hr to fix
                    Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 819..833
                    Application/Billing/Inventory/Item/Service/Data.php on lines 681..699
                    Application/Education/Certificate/Generator/Service/Data.php on lines 4453..4466
                    Application/Education/Certificate/Generator/Service/Data.php on lines 4473..4486
                    Application/Education/Certificate/Generator/Service/Data.php on lines 4631..4644
                    Application/Education/Certificate/Generator/Service/Data.php on lines 4651..4664
                    Application/Education/Lesson/Division/Service/Data.php on lines 1601..1614
                    Application/Education/Lesson/Division/Service/Data.php on lines 1621..1634
                    Application/Education/Lesson/Division/Service/Data.php on lines 2411..2426
                    Application/Education/Lesson/Subject/Service/Data.php on lines 399..413
                    Application/Education/Lesson/Subject/Service/Data.php on lines 420..434
                    Application/Education/Lesson/Term/Service/Data.php on lines 191..205
                    Application/Education/Lesson/Term/Service/Data.php on lines 212..226
                    Application/Education/Lesson/Term/Service/Data.php on lines 871..886
                    Application/Setting/Consumer/Service/Data.php on lines 556..569

                    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

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

                        public function destroyBasketVerification(TblBasketVerification $tblBasketVerification)
                        {
                    
                            $Manager = $this->getConnection()->getEntityManager();
                            $Entity = $Manager->getEntity('TblBasketVerification')->findOneBy(array('Id' => $tblBasketVerification->getId()));
                    Severity: Major
                    Found in Application/Billing/Bookkeeping/Basket/Service/Data.php and 15 other locations - About 1 hr to fix
                    Application/Billing/Bookkeeping/Basket/Service/Data.php on lines 766..784
                    Application/Billing/Inventory/Item/Service/Data.php on lines 681..699
                    Application/Education/Certificate/Generator/Service/Data.php on lines 4453..4466
                    Application/Education/Certificate/Generator/Service/Data.php on lines 4473..4486
                    Application/Education/Certificate/Generator/Service/Data.php on lines 4631..4644
                    Application/Education/Certificate/Generator/Service/Data.php on lines 4651..4664
                    Application/Education/Lesson/Division/Service/Data.php on lines 1601..1614
                    Application/Education/Lesson/Division/Service/Data.php on lines 1621..1634
                    Application/Education/Lesson/Division/Service/Data.php on lines 2411..2426
                    Application/Education/Lesson/Subject/Service/Data.php on lines 399..413
                    Application/Education/Lesson/Subject/Service/Data.php on lines 420..434
                    Application/Education/Lesson/Term/Service/Data.php on lines 191..205
                    Application/Education/Lesson/Term/Service/Data.php on lines 212..226
                    Application/Education/Lesson/Term/Service/Data.php on lines 871..886
                    Application/Setting/Consumer/Service/Data.php on lines 556..569

                    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

                    There are no issues that match your filters.

                    Category
                    Status