Covivo/mobicoop

View on GitHub

Showing 1,607 of 1,615 total issues

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

                        if (isset($matching['offer']->getFilters()['pickup']['satMinPickupTime'], $matching['offer']->getFilters()['pickup']['satMaxPickupTime'])) {
                            $item->setSatCheck(true);
                            $item->setSatTime($proposal->getCriteria()->getSatTime());
                            $item->setTime($proposal->getCriteria()->getSatTime());
                            $item->setSatMarginDuration($proposal->getCriteria()->getSatMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

                        if (isset($matching['request']->getFilters()['pickup']['thuMinPickupTime'], $matching['request']->getFilters()['pickup']['thuMaxPickupTime'])) {
                            $item->setThuCheck(true);
                            $item->setThuTime($proposal->getCriteria()->getThuTime());
                            $item->setTime($proposal->getCriteria()->getThuTime());
                            $item->setThuMarginDuration($proposal->getCriteria()->getThuMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

                        if (isset($matching['offer']->getFilters()['pickup']['thuMinPickupTime'], $matching['offer']->getFilters()['pickup']['thuMaxPickupTime'])) {
                            $item->setThuCheck(true);
                            $item->setThuTime($proposal->getCriteria()->getThuTime());
                            $item->setTime($proposal->getCriteria()->getThuTime());
                            $item->setThuMarginDuration($proposal->getCriteria()->getThuMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

                        if (isset($matching['offer']->getFilters()['pickup']['tueMinPickupTime'], $matching['offer']->getFilters()['pickup']['tueMaxPickupTime'])) {
                            $item->setTueCheck(true);
                            $item->setTueTime($proposal->getCriteria()->getTueTime());
                            $item->setTime($proposal->getCriteria()->getTueTime());
                            $item->setTueMarginDuration($proposal->getCriteria()->getTueMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

                        if (isset($matching['offer']->getFilters()['pickup']['sunMinPickupTime'], $matching['offer']->getFilters()['pickup']['sunMaxPickupTime'])) {
                            $item->setSunCheck(true);
                            $item->setSunTime($proposal->getCriteria()->getSunTime());
                            $item->setTime($proposal->getCriteria()->getSunTime());
                            $item->setSunMarginDuration($proposal->getCriteria()->getSunMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567

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

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

                        if (isset($matching['offer']->getFilters()['pickup']['friMinPickupTime'], $matching['offer']->getFilters()['pickup']['friMaxPickupTime'])) {
                            $item->setFriCheck(true);
                            $item->setFriTime($proposal->getCriteria()->getFriTime());
                            $item->setTime($proposal->getCriteria()->getFriTime());
                            $item->setFriMarginDuration($proposal->getCriteria()->getFriMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

            if ($body) {
                if (is_null($bodyType)) {
                    switch ($bodyType) {
                        case self::BODY_TYPE_JSON: $options[self::BODY_TYPE_JSON] = $body;

Severity: Major
Found in api/src/DataProvider/Service/DataProvider.php and 2 other locations - About 45 mins to fix
api/src/DataProvider/Service/DataProvider.php on lines 236..252
api/src/DataProvider/Service/DataProvider.php on lines 292..308

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

            if ($body) {
                if (is_null($bodyType)) {
                    switch ($bodyType) {
                        case self::BODY_TYPE_JSON: $options[self::BODY_TYPE_JSON] = $body;

Severity: Major
Found in api/src/DataProvider/Service/DataProvider.php and 2 other locations - About 45 mins to fix
api/src/DataProvider/Service/DataProvider.php on lines 170..186
api/src/DataProvider/Service/DataProvider.php on lines 236..252

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

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

                        if (isset($matching['request']->getFilters()['pickup']['tueMinPickupTime'], $matching['request']->getFilters()['pickup']['tueMaxPickupTime'])) {
                            $item->setTueCheck(true);
                            $item->setTueTime($proposal->getCriteria()->getTueTime());
                            $item->setTime($proposal->getCriteria()->getTueTime());
                            $item->setTueMarginDuration($proposal->getCriteria()->getTueMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

                        if (isset($matching['request']->getFilters()['pickup']['satMinPickupTime'], $matching['request']->getFilters()['pickup']['satMaxPickupTime'])) {
                            $item->setSatCheck(true);
                            $item->setSatTime($proposal->getCriteria()->getSatTime());
                            $item->setTime($proposal->getCriteria()->getSatTime());
                            $item->setSatMarginDuration($proposal->getCriteria()->getSatMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

Identical blocks of code found in 3 locations. Consider refactoring.
Open

            if ($body) {
                if (is_null($bodyType)) {
                    switch ($bodyType) {
                        case self::BODY_TYPE_JSON: $options[self::BODY_TYPE_JSON] = $body;

Severity: Major
Found in api/src/DataProvider/Service/DataProvider.php and 2 other locations - About 45 mins to fix
api/src/DataProvider/Service/DataProvider.php on lines 170..186
api/src/DataProvider/Service/DataProvider.php on lines 292..308

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

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

                        if (isset($matching['request']->getFilters()['pickup']['wedMinPickupTime'], $matching['request']->getFilters()['pickup']['wedMaxPickupTime'])) {
                            $item->setWedCheck(true);
                            $item->setWedTime($proposal->getCriteria()->getWedTime());
                            $item->setTime($proposal->getCriteria()->getWedTime());
                            $item->setWedMarginDuration($proposal->getCriteria()->getWedMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

                        if (isset($matching['offer']->getFilters()['pickup']['wedMinPickupTime'], $matching['offer']->getFilters()['pickup']['wedMaxPickupTime'])) {
                            $item->setWedCheck(true);
                            $item->setWedTime($proposal->getCriteria()->getWedTime());
                            $item->setTime($proposal->getCriteria()->getWedTime());
                            $item->setWedMarginDuration($proposal->getCriteria()->getWedMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

                        if (isset($matching['request']->getFilters()['pickup']['monMinPickupTime'], $matching['request']->getFilters()['pickup']['monMaxPickupTime'])) {
                            $item->setMonCheck(true);
                            $item->setMonTime($proposal->getCriteria()->getMonTime());
                            $item->setTime($proposal->getCriteria()->getMonTime());
                            $item->setMonMarginDuration($proposal->getCriteria()->getMonMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

                        if (isset($matching['request']->getFilters()['pickup']['friMinPickupTime'], $matching['request']->getFilters()['pickup']['friMaxPickupTime'])) {
                            $item->setFriCheck(true);
                            $item->setFriTime($proposal->getCriteria()->getFriTime());
                            $item->setTime($proposal->getCriteria()->getFriTime());
                            $item->setFriMarginDuration($proposal->getCriteria()->getFriMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1532..1537
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

                        if (isset($matching['offer']->getFilters()['pickup']['monMinPickupTime'], $matching['offer']->getFilters()['pickup']['monMaxPickupTime'])) {
                            $item->setMonCheck(true);
                            $item->setMonTime($proposal->getCriteria()->getMonTime());
                            $item->setTime($proposal->getCriteria()->getMonTime());
                            $item->setMonMarginDuration($proposal->getCriteria()->getMonMarginDuration());
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 13 other locations - About 45 mins to fix
api/src/Carpool/Service/ResultManager.php on lines 1008..1013
api/src/Carpool/Service/ResultManager.php on lines 1014..1019
api/src/Carpool/Service/ResultManager.php on lines 1020..1025
api/src/Carpool/Service/ResultManager.php on lines 1026..1031
api/src/Carpool/Service/ResultManager.php on lines 1032..1037
api/src/Carpool/Service/ResultManager.php on lines 1038..1043
api/src/Carpool/Service/ResultManager.php on lines 1044..1049
api/src/Carpool/Service/ResultManager.php on lines 1538..1543
api/src/Carpool/Service/ResultManager.php on lines 1544..1549
api/src/Carpool/Service/ResultManager.php on lines 1550..1555
api/src/Carpool/Service/ResultManager.php on lines 1556..1561
api/src/Carpool/Service/ResultManager.php on lines 1562..1567
api/src/Carpool/Service/ResultManager.php on lines 1568..1573

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

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

<?php

/**
 * Copyright (c) 2023, MOBICOOP. All rights reserved.
 * This project is dual licensed under AGPL and proprietary licence.
Severity: Major
Found in api/src/Carpool/Command/CarpoolProofManualSendCommand.php and 3 other locations - About 45 mins to fix
api/src/Carpool/Command/CarpoolProofCheckStatusCommand.php on lines 1..61
api/src/Incentive/Command/SubscriptionsVerificationCommand.php on lines 1..58
api/src/Journey/Command/JourneyHydrateCommand.php on lines 1..60

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

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

<?php

namespace App\UserRelaunch\Command;

use App\UserRelaunch\Service\RelaunchManager;
Severity: Major
Found in api/src/UserRelaunch/Command/RelaunchCommand.php and 2 other locations - About 45 mins to fix
api/src/Payment/Command/BankTransfersCommand.php on lines 1..59
api/src/Payment/Command/UnpaidReminderCommand.php on lines 1..37

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

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

<?php

/**
 * Copyright (c) 2022, MOBICOOP. All rights reserved.
 * This project is dual licensed under AGPL and proprietary licence.
Severity: Major
Found in api/src/Carpool/Command/CarpoolProofCheckStatusCommand.php and 3 other locations - About 45 mins to fix
api/src/Carpool/Command/CarpoolProofManualSendCommand.php on lines 1..61
api/src/Incentive/Command/SubscriptionsVerificationCommand.php on lines 1..58
api/src/Journey/Command/JourneyHydrateCommand.php on lines 1..60

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

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

<?php

namespace App\Payment\Command;

use App\Payment\Service\UnpaidReminderManager;
Severity: Major
Found in api/src/Payment/Command/UnpaidReminderCommand.php and 2 other locations - About 45 mins to fix
api/src/Payment/Command/BankTransfersCommand.php on lines 1..59
api/src/UserRelaunch/Command/RelaunchCommand.php on lines 1..37

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

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