DerDu/SPHERE-Framework

View on GitHub
Application/People/Meta/Club/Service/Data.php

Summary

Maintainability
B
6 hrs
Test Coverage

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

        TblClub $tblClub,
        $Identifier,
        $EntryDate,
        $ExitDate,
        $Remark
Severity: Minor
Found in Application/People/Meta/Club/Service/Data.php - About 35 mins to fix

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

            TblPerson $tblPerson,
            $Identifier,
            $EntryDate,
            $ExitDate,
            $Remark
    Severity: Minor
    Found in Application/People/Meta/Club/Service/Data.php - About 35 mins to fix

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

          public function destroyClub(TblClub $tblClub, $IsSoftRemove = false)
          {
      
              $Manager = $this->getConnection()->getEntityManager();
              /** @var TblClub $Entity */
      Severity: Major
      Found in Application/People/Meta/Club/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/Address/Service/Data.php on lines 732..748
      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/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 restoreClub(TblClub $tblClub)
          {
      
              $Manager = $this->getConnection()->getEntityManager();
              /** @var TblClub $Entity */
      Severity: Major
      Found in Application/People/Meta/Club/Service/Data.php and 14 other locations - About 2 hrs to fix
      Application/Contact/Address/Service/Data.php on lines 863..877
      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/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 10 locations. Consider refactoring.
      Open

          public function getClubByPerson(TblPerson $tblPerson, $isForced = false)
          {
      
              if ($isForced) {
                  return $this->getForceEntityBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblClub', array(
      Severity: Major
      Found in Application/People/Meta/Club/Service/Data.php and 9 other locations - About 1 hr to fix
      Application/Contact/Mail/Service/Data.php on lines 166..180
      Application/People/Group/Service/Data.php on lines 229..242
      Application/People/Group/Service/Data.php on lines 340..357
      Application/People/Meta/Common/Service/Data.php on lines 45..58
      Application/People/Meta/Custody/Service/Data.php on lines 98..109
      Application/People/Meta/Prospect/Service/Data.php on lines 45..59
      Application/People/Meta/Student/Service/Data/Student.php on lines 354..366
      Application/People/Meta/Teacher/Service/Data.php on lines 67..79
      Application/People/Relationship/Service/Data.php on lines 475..489

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

      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