Covivo/mobicoop

View on GitHub

Showing 1,612 of 1,620 total issues

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

    public function findSoonExpiredAds(int $numberOfDays): ?array
    {
        $now = new \DateTime();
        $toDate = $now->modify('+'.$numberOfDays.' days')->format('Y-m-d');

Severity: Major
Found in api/src/Carpool/Repository/ProposalRepository.php and 1 other location - About 1 hr to fix
api/src/Carpool/Repository/ProposalRepository.php on lines 1395..1410

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

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

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

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

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

Refactorings

Further Reading

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

    public function findInactiveAdsSinceXDays(int $numberOfDays): ?array
    {
        $now = new \DateTime();
        $toDate = $now->modify('-'.$numberOfDays.' days')->format('Y-m-d');

Severity: Major
Found in api/src/Carpool/Repository/ProposalRepository.php and 1 other location - About 1 hr to fix
api/src/Carpool/Repository/ProposalRepository.php on lines 1378..1393

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

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

            'driver' => [
                'id' => (string) $booking->getDriver()->getExternalId(),
                'operator' => $booking->getDriver()->getOperator(),
                'alias' => preg_replace('/\s+/', '-', $booking->getDriver()->getAlias()),
                'firstName' => $booking->getDriver()->getFirstName(),
Severity: Major
Found in api/src/DataProvider/Entity/InteropProvider.php and 1 other location - About 1 hr to fix
api/src/DataProvider/Entity/InteropProvider.php on lines 120..130

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

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

            'passenger' => [
                'id' => (string) $booking->getPassenger()->getExternalId(),
                'operator' => $booking->getPassenger()->getOperator(),
                'alias' => preg_replace('/\s+/', '-', $booking->getPassenger()->getAlias()),
                'firstName' => $booking->getPassenger()->getFirstName(),
Severity: Major
Found in api/src/DataProvider/Entity/InteropProvider.php and 1 other location - About 1 hr to fix
api/src/DataProvider/Entity/InteropProvider.php on lines 109..119

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

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 ($response->getCode() == 200) {
            $data = json_decode($response->getValue(), true);
            if (!isset($data["StatusCode"])) {
                return $this->collection;
            }
Severity: Major
Found in api/src/DataProvider/Entity/CitywayProvider.php and 1 other location - About 1 hr to fix
api/src/DataProvider/Entity/CitywayProvider.php on lines 296..310

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

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

Severity
Category
Status
Source
Language