Covivo/mobicoop

View on GitHub

Showing 1,454 of 1,619 total issues

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

  const optionsInstance = {
    files: `${destinationProject}/.gitlab-ci.yml`,
    from: /\$\$INSTANCE\$\$/gi,
    to: `${program.project}`,
  };
Severity: Minor
Found in bin/helpers/createFrontCanvas.js and 2 other locations - About 30 mins to fix
bin/helpers/createFrontCanvas.js on lines 153..157
bin/helpers/createFrontCanvas.js on lines 163..167

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

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

  const optionsName = {
    files: `${destinationProject}/**/*`,
    from: /\$\$NAME\$\$/gi,
    to: `${program.project}-platform`,
  };
Severity: Minor
Found in bin/helpers/createFrontCanvas.js and 2 other locations - About 30 mins to fix
bin/helpers/createFrontCanvas.js on lines 158..162
bin/helpers/createFrontCanvas.js on lines 163..167

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

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

  const optionsPlatformNameEnv = {
    files: `${destinationProject}/.env`,
    from: /APP_NAME=mobicoop_platform/gi,
    to: `APP_NAME=${program.project}-platform`,
  };
Severity: Minor
Found in bin/helpers/createFrontCanvas.js and 2 other locations - About 30 mins to fix
bin/helpers/createFrontCanvas.js on lines 153..157
bin/helpers/createFrontCanvas.js on lines 158..162

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

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

                    if (null !== $result->getReturn()) {
                        foreach ($result->getReturn()->getWaypoints() as $waypoint) {
                            if ('passenger' == $waypoint['role'] && 'origin' == $waypoint['type']) {
                                $returnOrigin = $waypoint;
                            } elseif ('passenger' == $waypoint['role'] && 'destination' == $waypoint['type']) {
Severity: Major
Found in api/src/Communication/Service/NotificationManager.php and 5 other locations - About 30 mins to fix
api/src/Communication/Service/NotificationManager.php on lines 406..414
api/src/Communication/Service/NotificationManager.php on lines 858..866
api/src/Communication/Service/NotificationManager.php on lines 867..875
api/src/Communication/Service/NotificationManager.php on lines 1098..1106
api/src/Communication/Service/NotificationManager.php on lines 1107..1115

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

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

                    if (null !== $result->getReturn()) {
                        foreach ($result->getReturn()->getWaypoints() as $waypoint) {
                            if ('passenger' == $waypoint['role'] && 'origin' == $waypoint['type']) {
                                $returnOrigin = $waypoint;
                            } elseif ('passenger' == $waypoint['role'] && 'destination' == $waypoint['type']) {
Severity: Major
Found in api/src/Communication/Service/NotificationManager.php and 5 other locations - About 30 mins to fix
api/src/Communication/Service/NotificationManager.php on lines 406..414
api/src/Communication/Service/NotificationManager.php on lines 471..479
api/src/Communication/Service/NotificationManager.php on lines 858..866
api/src/Communication/Service/NotificationManager.php on lines 1098..1106
api/src/Communication/Service/NotificationManager.php on lines 1107..1115

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

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

                    if (null !== $result->getOutward()) {
                        foreach ($result->getOutward()->getWaypoints() as $waypoint) {
                            if ('passenger' == $waypoint['role'] && 'origin' == $waypoint['type']) {
                                $outwardOrigin = $waypoint;
                            } elseif ('passenger' == $waypoint['role'] && 'destination' == $waypoint['type']) {
Severity: Major
Found in api/src/Communication/Service/NotificationManager.php and 5 other locations - About 30 mins to fix
api/src/Communication/Service/NotificationManager.php on lines 406..414
api/src/Communication/Service/NotificationManager.php on lines 471..479
api/src/Communication/Service/NotificationManager.php on lines 867..875
api/src/Communication/Service/NotificationManager.php on lines 1098..1106
api/src/Communication/Service/NotificationManager.php on lines 1107..1115

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

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

    protected function supports($attribute, $subject)
    {
        // if the attribute isn't one we support, return false
        if (!in_array($attribute, [
            self::LIST,
api/src/User/Security/CarVoter.php on lines 51..70
client/src/MobicoopBundle/Carpool/Security/AdVoter.php on lines 57..75

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

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

                        if (null !== $result->getReturn()) {
                            foreach ($result->getReturn()->getWaypoints() as $waypoint) {
                                if ('passenger' == $waypoint['role'] && 'origin' == $waypoint['type']) {
                                    $returnOrigin = $waypoint;
                                } elseif ('passenger' == $waypoint['role'] && 'destination' == $waypoint['type']) {
Severity: Major
Found in api/src/Communication/Service/NotificationManager.php and 5 other locations - About 30 mins to fix
api/src/Communication/Service/NotificationManager.php on lines 471..479
api/src/Communication/Service/NotificationManager.php on lines 858..866
api/src/Communication/Service/NotificationManager.php on lines 867..875
api/src/Communication/Service/NotificationManager.php on lines 1098..1106
api/src/Communication/Service/NotificationManager.php on lines 1107..1115

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

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

                    if (null !== $result->getOutward()) {
                        foreach ($result->getOutward()->getWaypoints() as $waypoint) {
                            if ('passenger' == $waypoint['role'] && 'origin' == $waypoint['type']) {
                                $outwardOrigin = $waypoint;
                            } elseif ('passenger' == $waypoint['role'] && 'destination' == $waypoint['type']) {
Severity: Major
Found in api/src/Communication/Service/NotificationManager.php and 5 other locations - About 30 mins to fix
api/src/Communication/Service/NotificationManager.php on lines 406..414
api/src/Communication/Service/NotificationManager.php on lines 471..479
api/src/Communication/Service/NotificationManager.php on lines 858..866
api/src/Communication/Service/NotificationManager.php on lines 867..875
api/src/Communication/Service/NotificationManager.php on lines 1107..1115

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

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

    protected function supports($attribute, $subject)
    {
        // if the attribute isn't one we support, return false
        if (!in_array($attribute, [
            self::CREATE,
Severity: Minor
Found in api/src/User/Security/CarVoter.php and 2 other locations - About 30 mins to fix
client/src/MobicoopBundle/Carpool/Security/AdVoter.php on lines 57..75
client/src/MobicoopBundle/Community/Security/CommunityVoter.php on lines 48..67

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

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

    protected function supports($attribute, $subject)
    {
        // if the attribute isn't one we support, return false
        if (!in_array($attribute, [
            self::CREATE_AD,
Severity: Minor
Found in client/src/MobicoopBundle/Carpool/Security/AdVoter.php and 2 other locations - About 30 mins to fix
api/src/User/Security/CarVoter.php on lines 51..70
client/src/MobicoopBundle/Community/Security/CommunityVoter.php on lines 48..67

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

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

                    if (null !== $result->getReturn()) {
                        foreach ($result->getReturn()->getWaypoints() as $waypoint) {
                            if ('passenger' == $waypoint['role'] && 'origin' == $waypoint['type']) {
                                $returnOrigin = $waypoint;
                            } elseif ('passenger' == $waypoint['role'] && 'destination' == $waypoint['type']) {
Severity: Major
Found in api/src/Communication/Service/NotificationManager.php and 5 other locations - About 30 mins to fix
api/src/Communication/Service/NotificationManager.php on lines 406..414
api/src/Communication/Service/NotificationManager.php on lines 471..479
api/src/Communication/Service/NotificationManager.php on lines 858..866
api/src/Communication/Service/NotificationManager.php on lines 867..875
api/src/Communication/Service/NotificationManager.php on lines 1098..1106

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

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 (!in_array($attribute, [
            self::SOLIDARY_CREATE,
            self::SOLIDARY_READ,
            self::SOLIDARY_UPDATE,
            self::SOLIDARY_DELETE,
Severity: Minor
Found in api/src/Solidary/Security/SolidaryVoter.php and 1 other location - About 30 mins to fix
api/src/Community/Security/CommunityVoter.php on lines 72..80

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

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 (!in_array($attribute, [
            self::COMMUNITY_CREATE,
            self::COMMUNITY_READ,
            self::COMMUNITY_UPDATE,
            self::COMMUNITY_DELETE,
Severity: Minor
Found in api/src/Community/Security/CommunityVoter.php and 1 other location - About 30 mins to fix
api/src/Solidary/Security/SolidaryVoter.php on lines 72..83

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

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