DerDu/SPHERE-Framework

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

Summary

Maintainability
C
1 day
Test Coverage

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

        TblProspectReservation $tblProspectReservation,
        $ReservationYear,
        $ReservationDivision,
        TblType $tblTypeOptionA = null,
        TblType $tblTypeOptionB = null
Severity: Minor
Found in Application/People/Meta/Prospect/Service/Data.php - About 35 mins to fix

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

        public function destroyProspect(TblProspect $tblProspect, $IsSoftRemove = false)
        {
    
            $Manager = $this->getConnection()->getEntityManager();
            /** @var TblProspect $Entity */
    Severity: Major
    Found in Application/People/Meta/Prospect/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/Common/Service/Data.php on lines 330..346
    Application/People/Meta/Custody/Service/Data.php on lines 128..144
    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 updateProspect(
            TblProspect $tblProspect,
            $Remark
        ) {
    
    
    Severity: Major
    Found in Application/People/Meta/Prospect/Service/Data.php and 4 other locations - About 2 hrs to fix
    Application/People/Meta/Common/Service/Data.php on lines 305..322
    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 createProspect(
            TblPerson $tblPerson,
            TblProspectAppointment $tblProspectAppointment,
            TblProspectReservation $tblProspectReservation,
            $Remark
    Severity: Major
    Found in Application/People/Meta/Prospect/Service/Data.php and 1 other location - About 2 hrs to fix
    Application/People/Meta/Common/Service/Data.php on lines 140..158

    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 restoreProspect(TblProspect $tblProspect)
        {
    
            $Manager = $this->getConnection()->getEntityManager();
            /** @var TblProspect $Entity */
    Severity: Major
    Found in Application/People/Meta/Prospect/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/Common/Service/Data.php on lines 366..380
    Application/People/Meta/Custody/Service/Data.php on lines 151..165
    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 getProspectByPerson(TblPerson $tblPerson, $isForced = false)
        {
    
            if ($isForced) {
                return $this->getForceEntityBy(__METHOD__, $this->getConnection()->getEntityManager(), 'TblProspect',
    Severity: Major
    Found in Application/People/Meta/Prospect/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/Common/Service/Data.php on lines 45..58
    Application/People/Meta/Custody/Service/Data.php on lines 98..109
    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