DerDu/SPHERE-Framework

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

Summary

Maintainability
D
2 days
Test Coverage

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

        TblCommonInformation $tblCommonInformation,
        $Nationality,
        $Denomination,
        $IsAssistance,
        $AssistanceActivity
Severity: Minor
Found in Application/People/Meta/Common/Service/Data.php - About 35 mins to fix

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

        public function updateCommonInformation(
            TblCommonInformation $tblCommonInformation,
            $Nationality,
            $Denomination,
            $IsAssistance,
    Severity: Major
    Found in Application/People/Meta/Common/Service/Data.php and 1 other location - About 4 hrs to fix
    Application/People/Meta/Student/Service/Data.php on lines 706..728

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

    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 destroyCommon(TblCommon $tblCommon, $IsSoftRemove = false)
        {
    
            $Manager = $this->getConnection()->getEntityManager();
            /** @var TblCommon $Entity */
    Severity: Major
    Found in Application/People/Meta/Common/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/Club/Service/Data.php on lines 126..142
    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 5 locations. Consider refactoring.
    Open

        public function updateCommon(
            TblCommon $tblCommon,
            $Remark
        ) {
    
    
    Severity: Major
    Found in Application/People/Meta/Common/Service/Data.php and 4 other locations - About 2 hrs to fix
    Application/People/Meta/Prospect/Service/Data.php on lines 248..264
    Application/People/Meta/Student/Service/Data/Liberation.php on lines 215..233
    Application/People/Meta/Student/Service/Data/Subject.php on lines 49..63
    Application/People/Meta/Teacher/Service/Data.php on lines 123..140

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

        public function createCommon(
            TblPerson $tblPerson,
            TblCommonBirthDates $tblCommonBirthDates,
            TblCommonInformation $tblCommonInformation,
            $Remark
    Severity: Major
    Found in Application/People/Meta/Common/Service/Data.php and 1 other location - About 2 hrs to fix
    Application/People/Meta/Prospect/Service/Data.php on lines 122..140

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

        public function restoreCommon(TblCommon $tblCommon)
        {
    
            $Manager = $this->getConnection()->getEntityManager();
            /** @var TblPerson $Entity */
    Severity: Major
    Found in Application/People/Meta/Common/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/Club/Service/Data.php on lines 149..163
    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 8 locations. Consider refactoring.
    Open

        public function createCommonGender($Name)
        {
    
            $Manager = $this->getConnection()->getEntityManager();
            $Entity = $Manager->getEntity('TblCommonGender')->findOneBy(array(TblCommonGender::ATTR_NAME => $Name));
    Severity: Major
    Found in Application/People/Meta/Common/Service/Data.php and 7 other locations - About 1 hr to fix
    Application/Billing/Bookkeeping/Balance/Service/Data.php on lines 36..50
    Application/Billing/Inventory/Item/Service/Data.php on lines 444..462
    Application/Contact/Mail/Service/Data.php on lines 143..158
    Application/Contact/Phone/Service/Data.php on lines 139..153
    Application/Contact/Web/Service/Data.php on lines 119..134
    Application/People/Relationship/Service/Data.php on lines 236..252
    Application/Reporting/SerialLetter/Service/Data.php on lines 49..68

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 115.

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

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

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

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

    Refactorings

    Further Reading

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

        public function createCommonInformation(
            $Nationality,
            $Denomination,
            $IsAssistance,
            $AssistanceActivity
    Severity: Major
    Found in Application/People/Meta/Common/Service/Data.php and 1 other location - About 1 hr to fix
    Application/People/Meta/Student/Service/Data.php on lines 677..695

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

    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 getCommonByPerson(TblPerson $tblPerson, $IsForced = false)
        {
    
            if($IsForced){
                return $this->getForceEntityBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblCommon', array(
    Severity: Major
    Found in Application/People/Meta/Common/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/Club/Service/Data.php on lines 40..52
    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