DerDu/SPHERE-Framework

View on GitHub
Application/Contact/Address/Service/Data.php

Summary

Maintainability
F
6 days
Test Coverage

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

<?php
namespace SPHERE\Application\Contact\Address\Service;

use SPHERE\Application\Contact\Address\Service\Entity\TblAddress;
use SPHERE\Application\Contact\Address\Service\Entity\TblCity;
Severity: Major
Found in Application/Contact/Address/Service/Data.php - About 1 day to fix

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

    class Data extends AbstractData
    {
    
        /**
         * @return false|ViewAddressToPerson[]
    Severity: Minor
    Found in Application/Contact/Address/Service/Data.php - About 5 hrs to fix

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

          public function createAddress(
              TblState $tblState = null,
              TblCity $tblCity,
              $StreetName,
              $StreetNumber,
      Severity: Minor
      Found in Application/Contact/Address/Service/Data.php - About 1 hr to fix

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

            public function updateCityAnonymousBulk($ProcessList, $CityName = '')
            {
        
                $Manager = $this->getConnection()->getEntityManager();
                if(!empty($ProcessList)){
        Severity: Minor
        Found in Application/Contact/Address/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 createAddress has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                TblState $tblState = null,
                TblCity $tblCity,
                $StreetName,
                $StreetNumber,
                $PostOfficeBox,
        Severity: Major
        Found in Application/Contact/Address/Service/Data.php - About 50 mins to fix

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

              public function getInvoiceAddressByPerson(TblPerson $tblPerson, $isForced = false)
              {
          
                  $Type = $this->getTypeByName(TblType::META_INVOICE_ADDRESS);
                  $Parameter = array(
          Severity: Minor
          Found in Application/Contact/Address/Service/Data.php - About 45 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

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

              public function getAddressByPerson(TblPerson $tblPerson, $isForced = false)
              {
          
                  $Type = $this->getTypeByName(TblType::META_MAIN_ADDRESS);
                  $Parameter = array(
          Severity: Minor
          Found in Application/Contact/Address/Service/Data.php - About 45 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

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

              public function createCity($Code, $Name, $District)
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  $tblCityList= $Manager->getEntity('TblCity')->findBy(array(
          Severity: Minor
          Found in Application/Contact/Address/Service/Data.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 createAddress has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function createAddress(
                  TblState $tblState = null,
                  TblCity $tblCity,
                  $StreetName,
                  $StreetNumber,
          Severity: Minor
          Found in Application/Contact/Address/Service/Data.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 updateAddressAnonymousBulk has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              public function updateAddressAnonymousBulk($ProcessList)
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  if(!empty($ProcessList)){
          Severity: Minor
          Found in Application/Contact/Address/Service/Data.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

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

              public function addAddressToPerson(TblPerson $tblPerson, TblAddress $tblAddress, TblType $tblType, $Remark)
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  $Entity = $Manager->getEntity('TblToPerson')
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 7 other locations - About 5 hrs to fix
          Application/Contact/Address/Service/Data.php on lines 383..403
          Application/Contact/Mail/Service/Data.php on lines 204..224
          Application/Contact/Mail/Service/Data.php on lines 277..297
          Application/Contact/Phone/Service/Data.php on lines 206..226
          Application/Contact/Phone/Service/Data.php on lines 279..299
          Application/Contact/Web/Service/Data.php on lines 172..192
          Application/Contact/Web/Service/Data.php on lines 245..265

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

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

              public function addAddressToCompany(TblCompany $tblCompany, TblAddress $tblAddress, TblType $tblType, $Remark)
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  $Entity = $Manager->getEntity('TblToCompany')
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 7 other locations - About 5 hrs to fix
          Application/Contact/Address/Service/Data.php on lines 331..351
          Application/Contact/Mail/Service/Data.php on lines 204..224
          Application/Contact/Mail/Service/Data.php on lines 277..297
          Application/Contact/Phone/Service/Data.php on lines 206..226
          Application/Contact/Phone/Service/Data.php on lines 279..299
          Application/Contact/Web/Service/Data.php on lines 172..192
          Application/Contact/Web/Service/Data.php on lines 245..265

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

          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 updateAddressToCompany(
                  TblToCompany $tblToCompany,
                  TblAddress $tblAddress,
                  TblType $tblType,
                  $Remark
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 1 other location - About 3 hrs to fix
          Application/Contact/Address/Service/Data.php on lines 702..724

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

          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 updateAddressToPerson(
                  TblToPerson $tblToPerson,
                  TblAddress $tblAddress,
                  TblType $tblType,
                  $Remark
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 1 other location - About 3 hrs to fix
          Application/Contact/Address/Service/Data.php on lines 758..782

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

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

              public function createType($Name, $Description = '')
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  $Entity = $Manager->getEntity('TblType')->findOneBy(array(
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 3 other locations - About 2 hrs to fix
          Application/Contact/Mail/Service/Data.php on lines 58..74
          Application/Contact/Phone/Service/Data.php on lines 52..70
          Application/Contact/Web/Service/Data.php on lines 34..50

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

          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 getAddressAllByPerson(TblPerson $tblPerson, $isForced = false)
              {
          
                  if ($isForced) {
                      return $this->getForceEntityListBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblToPerson',
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 1 other location - About 2 hrs to fix
          Application/Contact/Phone/Service/Data.php on lines 161..182

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

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

              public function removeAddressToPerson(TblToPerson $tblToPerson, $IsSoftRemove = false)
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  /** @var TblToPerson $Entity */
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 12 other locations - About 2 hrs to fix
          Application/Billing/Inventory/Document/Service/Data.php on lines 192..209
          Application/Contact/Mail/Service/Data.php on lines 232..248
          Application/Contact/Phone/Service/Data.php on lines 234..250
          Application/Contact/Web/Service/Data.php on lines 200..216
          Application/Education/ClassRegister/Absence/Service/Data.php on lines 195..216
          Application/People/Meta/Club/Service/Data.php on lines 126..142
          Application/People/Meta/Common/Service/Data.php on lines 330..346
          Application/People/Meta/Custody/Service/Data.php on lines 128..144
          Application/People/Meta/Prospect/Service/Data.php on lines 282..298
          Application/People/Meta/Teacher/Service/Data.php on lines 176..192
          Application/People/Relationship/Service/Data.php on lines 544..560
          Application/People/Relationship/Service/Data.php on lines 568..584

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

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

              public function restoreToPerson(TblToPerson $tblToPerson)
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  /** @var TblToPerson $Entity */
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 14 other locations - About 2 hrs to fix
          Application/Contact/Mail/Service/Data.php on lines 304..318
          Application/Contact/Phone/Service/Data.php on lines 336..350
          Application/Education/ClassRegister/Absence/Service/Data.php on lines 223..237
          Application/Education/Lesson/Division/Service/Data.php on lines 2521..2535
          Application/People/Group/Service/Data.php on lines 541..555
          Application/People/Meta/Club/Service/Data.php on lines 149..163
          Application/People/Meta/Common/Service/Data.php on lines 366..380
          Application/People/Meta/Custody/Service/Data.php on lines 151..165
          Application/People/Meta/Prospect/Service/Data.php on lines 305..319
          Application/People/Meta/Student/Service/Data/Student.php on lines 470..484
          Application/People/Meta/Teacher/Service/Data.php on lines 199..213
          Application/People/Person/Service/Data.php on lines 205..220
          Application/People/Relationship/Service/Data.php on lines 648..662
          Application/People/Relationship/Service/Data.php on lines 669..683

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

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

              public function createState($Name)
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  $Entity = $Manager->getEntity('TblState')->findOneBy(array(
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 3 other locations - About 1 hr to fix
          Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 266..277
          Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 309..320
          Application/Platform/Gatekeeper/Authorization/Access/Service/Data.php on lines 352..363

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

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

              public function removeAddressToCompany(TblToCompany $tblToCompany)
              {
          
                  $Manager = $this->getConnection()->getEntityManager();
                  /** @var TblToCompany $Entity */
          Severity: Major
          Found in Application/Contact/Address/Service/Data.php and 56 other locations - About 55 mins to fix
          Application/Billing/Accounting/Creditor/Service/Data.php on lines 136..149
          Application/Billing/Accounting/Debtor/Service/Data.php on lines 665..678
          Application/Billing/Accounting/Debtor/Service/Data.php on lines 685..698
          Application/Billing/Accounting/Debtor/Service/Data.php on lines 705..718
          Application/Billing/Accounting/Debtor/Service/Data.php on lines 725..738
          Application/Billing/Inventory/Document/Service/Data.php on lines 216..230
          Application/Billing/Inventory/Item/Service/Data.php on lines 600..614
          Application/Billing/Inventory/Item/Service/Data.php on lines 621..634
          Application/Billing/Inventory/Item/Service/Data.php on lines 641..654
          Application/Billing/Inventory/Item/Service/Data.php on lines 661..674
          Application/Contact/Mail/Service/Data.php on lines 255..267
          Application/Contact/Phone/Service/Data.php on lines 257..269
          Application/Contact/Web/Service/Data.php on lines 223..235
          Application/Corporation/Company/Service/Data.php on lines 230..243
          Application/Corporation/Group/Service/Data.php on lines 334..346
          Application/Corporation/Group/Service/Data.php on lines 353..365
          Application/Corporation/Group/Service/Data.php on lines 372..384
          Application/Education/Certificate/Generator/Service/Data.php on lines 3924..3936
          Application/Education/Graduation/Gradebook/MinimumGradeCount/Data.php on lines 257..270
          Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 659..671
          Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 678..690
          Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 697..709
          Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 716..728
          Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 735..747
          Application/Education/Graduation/Gradebook/ScoreRule/Data.php on lines 1097..1112
          Application/Education/Graduation/Gradebook/Service/Data.php on lines 230..243
          Application/Education/Graduation/Gradebook/Service/Data.php on lines 618..631
          Application/Education/Lesson/Division/Service/Data.php on lines 1641..1654
          Application/Education/Lesson/Term/Service/Data.php on lines 893..908
          Application/People/Group/Service/Data.php on lines 452..464
          Application/People/Group/Service/Data.php on lines 471..483
          Application/People/Meta/Student/Service/Data/Agreement.php on lines 212..224
          Application/People/Meta/Student/Service/Data/Integration.php on lines 351..363
          Application/People/Meta/Student/Service/Data/Integration.php on lines 409..421
          Application/People/Meta/Student/Service/Data/Liberation.php on lines 195..207
          Application/People/Meta/Student/Service/Data/Student.php on lines 404..416
          Application/People/Meta/Student/Service/Data/Subject.php on lines 240..254
          Application/People/Meta/Student/Service/Data/Support.php on lines 694..706
          Application/People/Meta/Student/Service/Data/Support.php on lines 713..725
          Application/People/Meta/Student/Service/Data/Support.php on lines 732..744
          Application/People/Meta/Student/Service/Data/Support.php on lines 751..763
          Application/People/Meta/Student/Service/Data/Support.php on lines 770..782
          Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 158..170
          Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 463..475
          Application/Platform/Gatekeeper/Authorization/Account/Service/Data.php on lines 697..709
          Application/Platform/System/Test/Service/Data.php on lines 65..80
          Application/Reporting/CheckList/Service/Data.php on lines 676..688
          Application/Reporting/Individual/Service/Data.php on lines 341..353
          Application/Reporting/Individual/Service/Data.php on lines 360..372
          Application/Reporting/Individual/Service/Data.php on lines 379..391
          Application/Reporting/SerialLetter/Service/Data.php on lines 887..900
          Application/Reporting/SerialLetter/Service/Data.php on lines 907..920
          Application/Setting/Consumer/Responsibility/Service/Data.php on lines 113..127
          Application/Setting/Consumer/School/Service/Data.php on lines 142..156
          Application/Setting/Consumer/SponsorAssociation/Service/Data.php on lines 72..86
          Application/Setting/User/Account/Service/Data.php on lines 277..289

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

          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