Covivo/mobicoop

View on GitHub
api/src/Solidary/Admin/Service/SolidaryManager.php

Summary

Maintainability
F
3 wks
Test Coverage

SolidaryManager has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

class SolidaryManager
{
    /**
     * @var User
     */
Severity: Minor
Found in api/src/Solidary/Admin/Service/SolidaryManager.php - About 2 hrs to fix

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

                if (!is_null($homeAddress)) {
                    // we have to update each field...
                    /**
                     * @var Address $homeAddress
                     */
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 1 other location - About 4 days to fix
    api/src/Solidary/Admin/Service/SolidaryBeneficiaryManager.php on lines 225..290

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

    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

                            $asolution['carpoolerSchedule'][$way] = [
                                'mon' => $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getProposalOffer()->getCriteria()->isMonCheck() ? $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getProposalOffer()->getCriteria()->getMonTime() : false,
                                'tue' => $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getProposalOffer()->getCriteria()->isTueCheck() ? $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getProposalOffer()->getCriteria()->getTueTime() : false,
                                'wed' => $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getProposalOffer()->getCriteria()->isWedCheck() ? $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getProposalOffer()->getCriteria()->getWedTime() : false,
                                'thu' => $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getProposalOffer()->getCriteria()->isThuCheck() ? $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getProposalOffer()->getCriteria()->getThuTime() : false,
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 1 other location - About 1 day to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 766..774

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

    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

                            $asolution['schedule'][$way] = [
                                'mon' => $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getProposalLinked()->getCriteria()->isMonCheck() ? $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getProposalLinked()->getCriteria()->getMonTime() : false,
                                'tue' => $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getProposalLinked()->getCriteria()->isTueCheck() ? $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getProposalLinked()->getCriteria()->getTueTime() : false,
                                'wed' => $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getProposalLinked()->getCriteria()->isWedCheck() ? $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getProposalLinked()->getCriteria()->getWedTime() : false,
                                'thu' => $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getProposalLinked()->getCriteria()->isThuCheck() ? $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getProposalLinked()->getCriteria()->getThuTime() : false,
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 1 other location - About 1 day to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 724..732

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

    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

                            $asolution['schedule'][$way] = [
                                'mon' => $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getCriteria()->isMonCheck() ? $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getCriteria()->getMonTime() : false,
                                'tue' => $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getCriteria()->isTueCheck() ? $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getCriteria()->getTueTime() : false,
                                'wed' => $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getCriteria()->isWedCheck() ? $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getCriteria()->getWedTime() : false,
                                'thu' => $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getCriteria()->isThuCheck() ? $solution->getSolidaryMatching()->getSolidaryMatchingLinked()->getMatching()->getCriteria()->getThuTime() : false,
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 1 other location - About 1 day to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 670..678

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

    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

                        $asolution['carpoolerSchedule'][$way] = [
                            'mon' => $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getCriteria()->isMonCheck() ? $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getCriteria()->getMonTime() : false,
                            'tue' => $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getCriteria()->isTueCheck() ? $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getCriteria()->getTueTime() : false,
                            'wed' => $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getCriteria()->isWedCheck() ? $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getCriteria()->getWedTime() : false,
                            'thu' => $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getCriteria()->isThuCheck() ? $solution->getSolidaryMatching()->getMatching()->getProposalOffer()->getCriteria()->getThuTime() : false,
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 1 other location - About 1 day to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 715..723

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

    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

                        $asolution['schedule'][$way] = [
                            'mon' => $solution->getSolidaryMatching()->getMatching()->getCriteria()->isMonCheck() ? $solution->getSolidaryMatching()->getMatching()->getCriteria()->getMonTime() : false,
                            'tue' => $solution->getSolidaryMatching()->getMatching()->getCriteria()->isTueCheck() ? $solution->getSolidaryMatching()->getMatching()->getCriteria()->getTueTime() : false,
                            'wed' => $solution->getSolidaryMatching()->getMatching()->getCriteria()->isWedCheck() ? $solution->getSolidaryMatching()->getMatching()->getCriteria()->getWedTime() : false,
                            'thu' => $solution->getSolidaryMatching()->getMatching()->getCriteria()->isThuCheck() ? $solution->getSolidaryMatching()->getMatching()->getCriteria()->getThuTime() : false,
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 1 other location - About 1 day to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 286..294

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

    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

                        $carpool['carpoolerSchedule'] = [
                            'mon' => $solidaryMatching->getMatching()->getProposalOffer()->getCriteria()->isMonCheck() ? $solidaryMatching->getMatching()->getProposalOffer()->getCriteria()->getMonTime() : false,
                            'tue' => $solidaryMatching->getMatching()->getProposalOffer()->getCriteria()->isTueCheck() ? $solidaryMatching->getMatching()->getProposalOffer()->getCriteria()->getTueTime() : false,
                            'wed' => $solidaryMatching->getMatching()->getProposalOffer()->getCriteria()->isWedCheck() ? $solidaryMatching->getMatching()->getProposalOffer()->getCriteria()->getWedTime() : false,
                            'thu' => $solidaryMatching->getMatching()->getProposalOffer()->getCriteria()->isThuCheck() ? $solidaryMatching->getMatching()->getProposalOffer()->getCriteria()->getThuTime() : false,
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 1 other location - About 1 day to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 661..669

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

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

                    case Solidary::PUNCTUAL_RETURN_DATE_CHOICE_1:
                        $ad->setOneWay(false);
                        // add 1 hour to outward time
                        $now = new DateTime();
                        if (Criteria::FREQUENCY_PUNCTUAL == $ad->getFrequency()) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 2 other locations - About 6 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 2479..2494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 2496..2511

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

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

                    case Solidary::PUNCTUAL_RETURN_DATE_CHOICE_3:
                        $ad->setOneWay(false);
                        // add 3 hours to outward time
                        $now = new DateTime();
                        if (Criteria::FREQUENCY_PUNCTUAL == $ad->getFrequency()) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 2 other locations - About 6 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 2462..2477
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 2479..2494

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

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

                    case Solidary::PUNCTUAL_RETURN_DATE_CHOICE_2:
                        $ad->setOneWay(false);
                        // add 2 hours to outward time
                        $now = new DateTime();
                        if (Criteria::FREQUENCY_PUNCTUAL == $ad->getFrequency()) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 2 other locations - About 6 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 2462..2477
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 2496..2511

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

    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

            } elseif (Criteria::FREQUENCY_PUNCTUAL == $solidary->getAdminfrequency()) {
                // set time for punctual proposal
                $solidary->setAdminoutwardMinTime($solidary->getProposal()->getCriteria()->getMinTime());
                $solidary->setAdminoutwardTime($solidary->getProposal()->getCriteria()->getFromTime());
                $solidary->setAdminoutwardMaxTime($solidary->getProposal()->getCriteria()->getMaxTime());
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 1 other location - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 207..228

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

    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

            if (Criteria::FREQUENCY_FLEXIBLE == $solidary->getAdminfrequency()) {
                // set min and max time for flexible proposal
                // for a flexible proposal, we have only one schedule, with all days checked
                $solidary->setAdminoutwardMinTime($solidary->getProposal()->getCriteria()->getMonMinTime());
                $solidary->setAdminoutwardTime($solidary->getProposal()->getCriteria()->getMonTime());
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 1 other location - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 218..228

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

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

                        if (
                            $solidaryMatching->getCriteria()->isWedCheck()
                            && strtotime($solidaryMatching->getCriteria()->getWedMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getEMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getWedMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getEMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isThuCheck()
                            && strtotime($solidaryMatching->getCriteria()->getThuMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getMMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getThuMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getMMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isSunCheck()
                            && strtotime($solidaryMatching->getCriteria()->getSunMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getAMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getSunMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getAMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isTueCheck()
                            && strtotime($solidaryMatching->getCriteria()->getTueMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getEMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getTueMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getEMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isThuCheck()
                            && strtotime($solidaryMatching->getCriteria()->getThuMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getEMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getThuMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getEMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isWedCheck()
                            && strtotime($solidaryMatching->getCriteria()->getWedMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getAMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getWedMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getAMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isFriCheck()
                            && strtotime($solidaryMatching->getCriteria()->getFriMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getAMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getFriMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getAMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isThuCheck()
                            && strtotime($solidaryMatching->getCriteria()->getThuMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getAMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getThuMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getAMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isSatCheck()
                            && strtotime($solidaryMatching->getCriteria()->getSatMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getEMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getSatMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getEMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isSatCheck()
                            && strtotime($solidaryMatching->getCriteria()->getSatMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getAMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getSatMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getAMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isTueCheck()
                            && strtotime($solidaryMatching->getCriteria()->getTueMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getMMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getTueMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getMMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isMonCheck()
                            && strtotime($solidaryMatching->getCriteria()->getMonMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getMMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getMonMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getMMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isTueCheck()
                            && strtotime($solidaryMatching->getCriteria()->getTueMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getAMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getTueMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getAMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isMonCheck()
                            && strtotime($solidaryMatching->getCriteria()->getMonMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getAMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getMonMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getAMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isFriCheck()
                            && strtotime($solidaryMatching->getCriteria()->getFriMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getEMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getFriMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getEMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isSunCheck()
                            && strtotime($solidaryMatching->getCriteria()->getSunMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getMMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getSunMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getMMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isSatCheck()
                            && strtotime($solidaryMatching->getCriteria()->getSatMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getMMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getSatMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getMMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isMonCheck()
                            && strtotime($solidaryMatching->getCriteria()->getMonMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getEMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getMonMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getEMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isWedCheck()
                            && strtotime($solidaryMatching->getCriteria()->getWedMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getMMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getWedMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getMMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isFriCheck()
                            && strtotime($solidaryMatching->getCriteria()->getFriMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getMMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getFriMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getMMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 509..515

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

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

                        if (
                            $solidaryMatching->getCriteria()->isSunCheck()
                            && strtotime($solidaryMatching->getCriteria()->getSunMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getEMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getSunMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getEMinTime()->format('H:i:s'))
                        ) {
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 20 other locations - About 2 hrs to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 369..375
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 376..382
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 383..389
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 390..396
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 397..403
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 404..410
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 411..417
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 418..424
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 425..431
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 432..438
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 439..445
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 446..452
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 453..459
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 460..466
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 467..473
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 474..480
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 481..487
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 488..494
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 495..501
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 502..508

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

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

                        if (
                            strtotime($solidaryMatching->getCriteria()->getMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getAMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getAMinTime()->format('H:i:s'))
                        ) {
                            $volunteer['schedule']['a'.$key] = true;
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 2 other locations - About 1 hr to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 549..554
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 561..566

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

                        if (
                            strtotime($solidaryMatching->getCriteria()->getMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getEMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getEMinTime()->format('H:i:s'))
                        ) {
                            $volunteer['schedule']['e'.$key] = true;
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 2 other locations - About 1 hr to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 549..554
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 555..560

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

                        if (
                            strtotime($solidaryMatching->getCriteria()->getMinTime()->format('H:i:s')) < strtotime($solidaryMatching->getSolidaryUser()->getMMaxTime()->format('H:i:s'))
                            && strtotime($solidaryMatching->getCriteria()->getMaxTime()->format('H:i:s')) >= strtotime($solidaryMatching->getSolidaryUser()->getMMinTime()->format('H:i:s'))
                        ) {
                            $volunteer['schedule']['m'.$key] = true;
    Severity: Major
    Found in api/src/Solidary/Admin/Service/SolidaryManager.php and 2 other locations - About 1 hr to fix
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 555..560
    api/src/Solidary/Admin/Service/SolidaryManager.php on lines 561..566

    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

    There are no issues that match your filters.

    Category
    Status