Covivo/mobicoop

View on GitHub
api/src/Rdex/Service/RdexManager.php

Summary

Maintainability
F
3 days
Test Coverage

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

                case 0:
                    $days->setSunday(1);
                    if (!is_null($journey->getSunMarginDuration())) {
                        $punctualMargin = $journey->getSunMarginDuration();
                    }
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 743..754
api/src/Rdex/Service/RdexManager.php on lines 756..767
api/src/Rdex/Service/RdexManager.php on lines 769..780
api/src/Rdex/Service/RdexManager.php on lines 782..793
api/src/Rdex/Service/RdexManager.php on lines 795..806
api/src/Rdex/Service/RdexManager.php on lines 808..819

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

                case 6:
                    $days->setSaturday(1);
                    if (!is_null($journey->getSatMarginDuration())) {
                        $punctualMargin = $journey->getSatMarginDuration();
                    }
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 730..741
api/src/Rdex/Service/RdexManager.php on lines 743..754
api/src/Rdex/Service/RdexManager.php on lines 756..767
api/src/Rdex/Service/RdexManager.php on lines 769..780
api/src/Rdex/Service/RdexManager.php on lines 782..793
api/src/Rdex/Service/RdexManager.php on lines 795..806

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

                case 3:
                    $days->setWednesday(1);
                    if (!is_null($journey->getWedMarginDuration())) {
                        $punctualMargin = $journey->getWedMarginDuration();
                    }
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 730..741
api/src/Rdex/Service/RdexManager.php on lines 743..754
api/src/Rdex/Service/RdexManager.php on lines 756..767
api/src/Rdex/Service/RdexManager.php on lines 782..793
api/src/Rdex/Service/RdexManager.php on lines 795..806
api/src/Rdex/Service/RdexManager.php on lines 808..819

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

                case 1:
                    $days->setMonday(1);
                    if (!is_null($journey->getMonMarginDuration())) {
                        $punctualMargin = $journey->getMonMarginDuration();
                    }
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 730..741
api/src/Rdex/Service/RdexManager.php on lines 756..767
api/src/Rdex/Service/RdexManager.php on lines 769..780
api/src/Rdex/Service/RdexManager.php on lines 782..793
api/src/Rdex/Service/RdexManager.php on lines 795..806
api/src/Rdex/Service/RdexManager.php on lines 808..819

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

                case 5:
                    $days->setFriday(1);
                    if (!is_null($journey->getFriMarginDuration())) {
                        $punctualMargin = $journey->getFriMarginDuration();
                    }
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 730..741
api/src/Rdex/Service/RdexManager.php on lines 743..754
api/src/Rdex/Service/RdexManager.php on lines 756..767
api/src/Rdex/Service/RdexManager.php on lines 769..780
api/src/Rdex/Service/RdexManager.php on lines 782..793
api/src/Rdex/Service/RdexManager.php on lines 808..819

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

                case 2:
                    $days->setTuesday(1);
                    if (!is_null($journey->getTueMarginDuration())) {
                        $punctualMargin = $journey->getTueMarginDuration();
                    }
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 730..741
api/src/Rdex/Service/RdexManager.php on lines 743..754
api/src/Rdex/Service/RdexManager.php on lines 769..780
api/src/Rdex/Service/RdexManager.php on lines 782..793
api/src/Rdex/Service/RdexManager.php on lines 795..806
api/src/Rdex/Service/RdexManager.php on lines 808..819

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

                case 4:
                    $days->setThursday(1);
                    if (!is_null($journey->getThuMarginDuration())) {
                        $punctualMargin = $journey->getThuMarginDuration();
                    }
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 730..741
api/src/Rdex/Service/RdexManager.php on lines 743..754
api/src/Rdex/Service/RdexManager.php on lines 756..767
api/src/Rdex/Service/RdexManager.php on lines 769..780
api/src/Rdex/Service/RdexManager.php on lines 795..806
api/src/Rdex/Service/RdexManager.php on lines 808..819

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

            if ($result->isWedCheck() && !is_null($journey->getWedTime())) {
                $days->setWednesday(1);
                $rdexDayTime = new RdexDayTime();
                $minMaxTime = $this->computeMinMaxTime($journey->getWedTime(), $journey->getWedMarginDuration());
                $rdexDayTime->setMintime($minMaxTime[0]->format('H:i:s'));
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 826..833
api/src/Rdex/Service/RdexManager.php on lines 834..841
api/src/Rdex/Service/RdexManager.php on lines 850..857
api/src/Rdex/Service/RdexManager.php on lines 858..865
api/src/Rdex/Service/RdexManager.php on lines 866..873
api/src/Rdex/Service/RdexManager.php on lines 874..881

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

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

            if ($result->isThuCheck() && !is_null($journey->getThuTime())) {
                $days->setThursday(1);
                $rdexDayTime = new RdexDayTime();
                $minMaxTime = $this->computeMinMaxTime($journey->getThuTime(), $journey->getThuMarginDuration());
                $rdexDayTime->setMintime($minMaxTime[0]->format('H:i:s'));
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 826..833
api/src/Rdex/Service/RdexManager.php on lines 834..841
api/src/Rdex/Service/RdexManager.php on lines 842..849
api/src/Rdex/Service/RdexManager.php on lines 858..865
api/src/Rdex/Service/RdexManager.php on lines 866..873
api/src/Rdex/Service/RdexManager.php on lines 874..881

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

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

            if ($result->isFriCheck() && !is_null($journey->getFriTime())) {
                $days->setFriday(1);
                $rdexDayTime = new RdexDayTime();
                $minMaxTime = $this->computeMinMaxTime($journey->getFriTime(), $journey->getFriMarginDuration());
                $rdexDayTime->setMintime($minMaxTime[0]->format('H:i:s'));
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 826..833
api/src/Rdex/Service/RdexManager.php on lines 834..841
api/src/Rdex/Service/RdexManager.php on lines 842..849
api/src/Rdex/Service/RdexManager.php on lines 850..857
api/src/Rdex/Service/RdexManager.php on lines 866..873
api/src/Rdex/Service/RdexManager.php on lines 874..881

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

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

            if ($result->isSatCheck() && !is_null($journey->getSatTime())) {
                $days->setSaturday(1);
                $rdexDayTime = new RdexDayTime();
                $minMaxTime = $this->computeMinMaxTime($journey->getSatTime(), $journey->getSatMarginDuration());
                $rdexDayTime->setMintime($minMaxTime[0]->format('H:i:s'));
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 826..833
api/src/Rdex/Service/RdexManager.php on lines 834..841
api/src/Rdex/Service/RdexManager.php on lines 842..849
api/src/Rdex/Service/RdexManager.php on lines 850..857
api/src/Rdex/Service/RdexManager.php on lines 858..865
api/src/Rdex/Service/RdexManager.php on lines 874..881

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

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

            if ($result->isMonCheck() && !is_null($journey->getMonTime())) {
                $days->setMonday(1);
                $rdexDayTime = new RdexDayTime();
                $minMaxTime = $this->computeMinMaxTime($journey->getMonTime(), $journey->getMonMarginDuration());
                $rdexDayTime->setMintime($minMaxTime[0]->format('H:i:s'));
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 834..841
api/src/Rdex/Service/RdexManager.php on lines 842..849
api/src/Rdex/Service/RdexManager.php on lines 850..857
api/src/Rdex/Service/RdexManager.php on lines 858..865
api/src/Rdex/Service/RdexManager.php on lines 866..873
api/src/Rdex/Service/RdexManager.php on lines 874..881

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

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

            if ($result->isTueCheck() && !is_null($journey->getTueTime())) {
                $days->setTuesday(1);
                $rdexDayTime = new RdexDayTime();
                $minMaxTime = $this->computeMinMaxTime($journey->getTueTime(), $journey->getTueMarginDuration());
                $rdexDayTime->setMintime($minMaxTime[0]->format('H:i:s'));
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 826..833
api/src/Rdex/Service/RdexManager.php on lines 842..849
api/src/Rdex/Service/RdexManager.php on lines 850..857
api/src/Rdex/Service/RdexManager.php on lines 858..865
api/src/Rdex/Service/RdexManager.php on lines 866..873
api/src/Rdex/Service/RdexManager.php on lines 874..881

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

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

            if ($result->isSunCheck() && !is_null($journey->getSunTime())) {
                $days->setSunday(1);
                $rdexDayTime = new RdexDayTime();
                $minMaxTime = $this->computeMinMaxTime($journey->getSunTime(), $journey->getSunMarginDuration());
                $rdexDayTime->setMintime($minMaxTime[0]->format('H:i:s'));
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 6 other locations - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 826..833
api/src/Rdex/Service/RdexManager.php on lines 834..841
api/src/Rdex/Service/RdexManager.php on lines 842..849
api/src/Rdex/Service/RdexManager.php on lines 850..857
api/src/Rdex/Service/RdexManager.php on lines 858..865
api/src/Rdex/Service/RdexManager.php on lines 866..873

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

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 ('recipient' === $request->get('driver')['state']) {
            if (
                !isset($request->get('driver')['uuid'])
                || '' === trim($request->get('driver')['uuid'])
                || !is_numeric($request->get('driver')['uuid'])
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 1 other location - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 555..563

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

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 ('recipient' === $request->get('passenger')['state']) {
            if (
                !isset($request->get('passenger')['uuid'])
                || '' === trim($request->get('passenger')['uuid'])
                || !is_numeric($request->get('passenger')['uuid'])
Severity: Major
Found in api/src/Rdex/Service/RdexManager.php and 1 other location - About 1 hr to fix
api/src/Rdex/Service/RdexManager.php on lines 533..541

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

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