Covivo/mobicoop

View on GitHub

Showing 1,612 of 1,620 total issues

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

Cypress.Commands.add('delete', () => {
    cy.visit(Cypress.env('baseUrl') + "utilisateur/profil/modifier/mon-profil")
    cy.get('.text-center > .button > .v-btn__content').click()
    cy.get('.v-card__actions > a.v-btn > .v-btn__content').click()
    cy.get('.v-snack__content > div').contains('Votre compte à été supprimé avec succès.')
Severity: Major
Found in client/cypress/support/user-commands.js and 2 other locations - About 3 hrs to fix
client/cypress/support/user-commands.js on lines 261..266
client/cypress/support/user-commands.js on lines 268..273

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

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

Cypress.Commands.add('acceptCarpool', () => {
    cy.visit(Cypress.env('baseUrl') + 'utilisateur/messages')
    cy.get(':nth-child(2) > .v-main__wrap > .container > .mx-0 > .row.ma-0 > :nth-child(2) > :nth-child(2) > .col-8').click()
    cy.get('.mr-12 > .v-btn__content').click()
    cy.get('.v-main__wrap > :nth-child(1) > .white--text').contains('Le covoiturage a été accepté')
Severity: Major
Found in client/cypress/support/user-commands.js and 2 other locations - About 3 hrs to fix
client/cypress/support/user-commands.js on lines 49..54
client/cypress/support/user-commands.js on lines 268..273

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

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

Cypress.Commands.add('refuseCarpool', () => {
    cy.visit(Cypress.env('baseUrl') + 'utilisateur/messages')
    cy.get(':nth-child(2) > .v-main__wrap > .container > .mx-0 > .row.ma-0 > :nth-child(2) > :nth-child(2) > .col-8').click()
    cy.get('.ml-12 > .v-btn__content').click()
    cy.get('.v-main__wrap > :nth-child(1) > .white--text').contains('Le covoiturage a été refusé')
Severity: Major
Found in client/cypress/support/user-commands.js and 2 other locations - About 3 hrs to fix
client/cypress/support/user-commands.js on lines 49..54
client/cypress/support/user-commands.js on lines 261..266

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

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

            if ($routes && count($addresses) > 2) {
                // if the user is passenger we keep only the first and last points
                if ($routes = $this->geoRouter->getRoutes([$addresses[0], $addresses[count($addresses) - 1]], false, false, GeorouterInterface::RETURN_TYPE_OBJECT)) {
                    $direction = $routes[0];
                }
Severity: Major
Found in api/src/Carpool/Service/ProposalManager.php and 1 other location - About 3 hrs to fix
api/src/Carpool/Service/ProposalManager.php on lines 1033..1042

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

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

            if ($routes && count($addresses) > 2) {
                // if the user is passenger we keep only the first and last points
                if ($routes = $this->geoRouter->getRoutes([$addresses[0], $addresses[count($addresses) - 1]], false, false, GeorouterInterface::RETURN_TYPE_OBJECT)) {
                    $direction = $routes[0];
                }
Severity: Major
Found in api/src/Carpool/Service/ProposalManager.php and 1 other location - About 3 hrs to fix
api/src/Carpool/Service/ProposalManager.php on lines 941..950

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

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

    public function userPhoneNumberValidity(Request $request, UserManager $userManager)
    {
        if ($request->isMethod('POST')) {
            $data = json_decode($request->getContent(), true);
            if (isset($data['telephone']) && '' !== $data['telephone']) {
client/src/MobicoopBundle/User/Controller/UserController.php on lines 1378..1390
client/src/MobicoopBundle/User/Controller/UserController.php on lines 1414..1426

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

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

    public function userDriverLicenceNumberValidity(Request $request, UserManager $userManager)
    {
        if ($request->isMethod('POST')) {
            $data = json_decode($request->getContent(), true);
            if (isset($data['driverLicenceNumber']) && '' !== $data['driverLicenceNumber']) {
client/src/MobicoopBundle/User/Controller/UserController.php on lines 1378..1390
client/src/MobicoopBundle/User/Controller/UserController.php on lines 1396..1408

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

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

    public function userCheckEmailExists(Request $request, UserManager $userManager)
    {
        if ($request->isMethod('POST')) {
            $data = json_decode($request->getContent(), true);
            if (isset($data['email']) && '' !== $data['email']) {
client/src/MobicoopBundle/User/Controller/UserController.php on lines 1396..1408
client/src/MobicoopBundle/User/Controller/UserController.php on lines 1414..1426

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

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

                    $regularDays[$carpoolItem->getAsk()->getAskLinked()->getId()]['outward'] = [
                        ['id' => null, 'status' => PaymentItem::DAY_UNAVAILABLE],
                        ['id' => null, 'status' => PaymentItem::DAY_UNAVAILABLE],
                        ['id' => null, 'status' => PaymentItem::DAY_UNAVAILABLE],
                        ['id' => null, 'status' => PaymentItem::DAY_UNAVAILABLE],
Severity: Major
Found in api/src/Payment/Service/PaymentManager.php and 1 other location - About 3 hrs to fix
api/src/Payment/Service/PaymentManager.php on lines 247..255

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

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 (Ad::ROLE_DRIVER == $role) {
                $waypoints[$key] = [
                    'id' => $key,
                    'person' => 1 == $waypoint['candidate'] ? 'requester' : 'carpooler',
                    'role' => 1 == $waypoint['candidate'] ? 'driver' : 'passenger',
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 1 other location - About 3 hrs to fix
api/src/Carpool/Service/ResultManager.php on lines 2716..2729

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

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

            } else {
                $waypoints[$key] = [
                    'id' => $key,
                    'person' => 1 == $waypoint['candidate'] ? 'carpooler' : 'requester',
                    'role' => 1 == $waypoint['candidate'] ? 'driver' : 'passenger',
Severity: Major
Found in api/src/Carpool/Service/ResultManager.php and 1 other location - About 3 hrs to fix
api/src/Carpool/Service/ResultManager.php on lines 2703..2729

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

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

                    $regularDays[$carpoolItem->getAsk()->getId()]['outward'] = [
                        ['id' => null, 'status' => PaymentItem::DAY_UNAVAILABLE],
                        ['id' => null, 'status' => PaymentItem::DAY_UNAVAILABLE],
                        ['id' => null, 'status' => PaymentItem::DAY_UNAVAILABLE],
                        ['id' => null, 'status' => PaymentItem::DAY_UNAVAILABLE],
Severity: Major
Found in api/src/Payment/Service/PaymentManager.php and 1 other location - About 3 hrs to fix
api/src/Payment/Service/PaymentManager.php on lines 236..244

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

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

            foreach ($proposal->getMatchingOffers() as $matching) {
                // We check if the matching have an ask
                foreach ($matching->getAsks() as $ask) {
                    // We check if the ask is accepted if yes we put the ask in the tab
                    if (Ask::STATUS_ACCEPTED_AS_DRIVER === $ask->getStatus() || Ask::STATUS_ACCEPTED_AS_PASSENGER === $ask->getStatus()) {
Severity: Major
Found in api/src/Carpool/Service/AdManager.php and 1 other location - About 3 hrs to fix
api/src/Carpool/Service/AdManager.php on lines 1827..1843

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

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

            foreach ($proposal->getMatchingRequests() as $matching) {
                // We check if the matching have an ask
                /** @var Ask $ask */
                foreach ($matching->getAsks() as $ask) {
                    // We check if the ask is accepted if yes we put the ask in the tab
Severity: Major
Found in api/src/Carpool/Service/AdManager.php and 1 other location - About 3 hrs to fix
api/src/Carpool/Service/AdManager.php on lines 1845..1860

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

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

<?php

/**
 * Copyright (c) 2023, MOBICOOP. All rights reserved.
 * This project is dual licensed under AGPL and proprietary licence.
api/src/User/DataPersister/UserUnderEighteenDataPersister.php on lines 1..55

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

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

<?php
/**
 * Copyright (c) 2024, MOBICOOP. All rights reserved.
 * This project is dual licensed under AGPL and proprietary licence.
 ***************************
api/src/CarpoolStandard/DataPersister/MessageDataPersister.php on lines 1..63

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

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

<?php declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
Severity: Major
Found in api/src/Migrations/Version20210701084801.php and 35 other locations - About 3 hrs to fix
api/src/Migrations/Version20181001131028.php on lines 1..54
api/src/Migrations/Version20190107101526.php on lines 1..53
api/src/Migrations/Version20190214171033.php on lines 1..53
api/src/Migrations/Version20190520100919.php on lines 1..32
api/src/Migrations/Version20190527083622.php on lines 1..32
api/src/Migrations/Version20190531140115.php on lines 1..32
api/src/Migrations/Version20190603140537.php on lines 1..32
api/src/Migrations/Version20190705134105.php on lines 1..32
api/src/Migrations/Version20190709085351.php on lines 1..32
api/src/Migrations/Version20200225083121.php on lines 1..32
api/src/Migrations/Version20200307112540.php on lines 1..32
api/src/Migrations/Version20200319134512.php on lines 1..32
api/src/Migrations/Version20200406151944.php on lines 1..32
api/src/Migrations/Version20200505091027.php on lines 1..32
api/src/Migrations/Version20200528134023.php on lines 1..32
api/src/Migrations/Version20200603092058.php on lines 1..32
api/src/Migrations/Version20200622100626.php on lines 1..32
api/src/Migrations/Version20200728090247.php on lines 1..32
api/src/Migrations/Version20210209101549.php on lines 1..32
api/src/Migrations/Version20210209131508.php on lines 1..32
api/src/Migrations/Version20210224085058.php on lines 1..32
api/src/Migrations/Version20210511084025.php on lines 1..32
api/src/Migrations/Version20210629101841.php on lines 1..32
api/src/Migrations/Version20210722120220.php on lines 1..32
api/src/Migrations/Version20211021085229.php on lines 1..32
api/src/Migrations/Version20220107152257.php on lines 1..32
api/src/Migrations/Version20220427114856.php on lines 1..32
api/src/Migrations/Version20220622125824.php on lines 1..32
api/src/Migrations/Version20221227150225.php on lines 1..32
api/src/Migrations/Version20230217111319.php on lines 1..32
api/src/Migrations/Version20230526160710.php on lines 1..32
api/src/Migrations/Version20230529090020.php on lines 1..32
api/src/Migrations/Version20230529133842.php on lines 1..32
api/src/Migrations/Version20231026124858.php on lines 1..32
api/src/Migrations/Version20231124092918.php on lines 1..32

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

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

<?php declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
Severity: Major
Found in api/src/Migrations/Version20210224085058.php and 35 other locations - About 3 hrs to fix
api/src/Migrations/Version20181001131028.php on lines 1..54
api/src/Migrations/Version20190107101526.php on lines 1..53
api/src/Migrations/Version20190214171033.php on lines 1..53
api/src/Migrations/Version20190520100919.php on lines 1..32
api/src/Migrations/Version20190527083622.php on lines 1..32
api/src/Migrations/Version20190531140115.php on lines 1..32
api/src/Migrations/Version20190603140537.php on lines 1..32
api/src/Migrations/Version20190705134105.php on lines 1..32
api/src/Migrations/Version20190709085351.php on lines 1..32
api/src/Migrations/Version20200225083121.php on lines 1..32
api/src/Migrations/Version20200307112540.php on lines 1..32
api/src/Migrations/Version20200319134512.php on lines 1..32
api/src/Migrations/Version20200406151944.php on lines 1..32
api/src/Migrations/Version20200505091027.php on lines 1..32
api/src/Migrations/Version20200528134023.php on lines 1..32
api/src/Migrations/Version20200603092058.php on lines 1..32
api/src/Migrations/Version20200622100626.php on lines 1..32
api/src/Migrations/Version20200728090247.php on lines 1..32
api/src/Migrations/Version20210209101549.php on lines 1..32
api/src/Migrations/Version20210209131508.php on lines 1..32
api/src/Migrations/Version20210511084025.php on lines 1..32
api/src/Migrations/Version20210629101841.php on lines 1..32
api/src/Migrations/Version20210701084801.php on lines 1..32
api/src/Migrations/Version20210722120220.php on lines 1..32
api/src/Migrations/Version20211021085229.php on lines 1..32
api/src/Migrations/Version20220107152257.php on lines 1..32
api/src/Migrations/Version20220427114856.php on lines 1..32
api/src/Migrations/Version20220622125824.php on lines 1..32
api/src/Migrations/Version20221227150225.php on lines 1..32
api/src/Migrations/Version20230217111319.php on lines 1..32
api/src/Migrations/Version20230526160710.php on lines 1..32
api/src/Migrations/Version20230529090020.php on lines 1..32
api/src/Migrations/Version20230529133842.php on lines 1..32
api/src/Migrations/Version20231026124858.php on lines 1..32
api/src/Migrations/Version20231124092918.php on lines 1..32

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

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

<?php declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
Severity: Major
Found in api/src/Migrations/Version20200622100626.php and 35 other locations - About 3 hrs to fix
api/src/Migrations/Version20181001131028.php on lines 1..54
api/src/Migrations/Version20190107101526.php on lines 1..53
api/src/Migrations/Version20190214171033.php on lines 1..53
api/src/Migrations/Version20190520100919.php on lines 1..32
api/src/Migrations/Version20190527083622.php on lines 1..32
api/src/Migrations/Version20190531140115.php on lines 1..32
api/src/Migrations/Version20190603140537.php on lines 1..32
api/src/Migrations/Version20190705134105.php on lines 1..32
api/src/Migrations/Version20190709085351.php on lines 1..32
api/src/Migrations/Version20200225083121.php on lines 1..32
api/src/Migrations/Version20200307112540.php on lines 1..32
api/src/Migrations/Version20200319134512.php on lines 1..32
api/src/Migrations/Version20200406151944.php on lines 1..32
api/src/Migrations/Version20200505091027.php on lines 1..32
api/src/Migrations/Version20200528134023.php on lines 1..32
api/src/Migrations/Version20200603092058.php on lines 1..32
api/src/Migrations/Version20200728090247.php on lines 1..32
api/src/Migrations/Version20210209101549.php on lines 1..32
api/src/Migrations/Version20210209131508.php on lines 1..32
api/src/Migrations/Version20210224085058.php on lines 1..32
api/src/Migrations/Version20210511084025.php on lines 1..32
api/src/Migrations/Version20210629101841.php on lines 1..32
api/src/Migrations/Version20210701084801.php on lines 1..32
api/src/Migrations/Version20210722120220.php on lines 1..32
api/src/Migrations/Version20211021085229.php on lines 1..32
api/src/Migrations/Version20220107152257.php on lines 1..32
api/src/Migrations/Version20220427114856.php on lines 1..32
api/src/Migrations/Version20220622125824.php on lines 1..32
api/src/Migrations/Version20221227150225.php on lines 1..32
api/src/Migrations/Version20230217111319.php on lines 1..32
api/src/Migrations/Version20230526160710.php on lines 1..32
api/src/Migrations/Version20230529090020.php on lines 1..32
api/src/Migrations/Version20230529133842.php on lines 1..32
api/src/Migrations/Version20231026124858.php on lines 1..32
api/src/Migrations/Version20231124092918.php on lines 1..32

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

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

<?php declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
Severity: Major
Found in api/src/Migrations/Version20230217111319.php and 35 other locations - About 3 hrs to fix
api/src/Migrations/Version20181001131028.php on lines 1..54
api/src/Migrations/Version20190107101526.php on lines 1..53
api/src/Migrations/Version20190214171033.php on lines 1..53
api/src/Migrations/Version20190520100919.php on lines 1..32
api/src/Migrations/Version20190527083622.php on lines 1..32
api/src/Migrations/Version20190531140115.php on lines 1..32
api/src/Migrations/Version20190603140537.php on lines 1..32
api/src/Migrations/Version20190705134105.php on lines 1..32
api/src/Migrations/Version20190709085351.php on lines 1..32
api/src/Migrations/Version20200225083121.php on lines 1..32
api/src/Migrations/Version20200307112540.php on lines 1..32
api/src/Migrations/Version20200319134512.php on lines 1..32
api/src/Migrations/Version20200406151944.php on lines 1..32
api/src/Migrations/Version20200505091027.php on lines 1..32
api/src/Migrations/Version20200528134023.php on lines 1..32
api/src/Migrations/Version20200603092058.php on lines 1..32
api/src/Migrations/Version20200622100626.php on lines 1..32
api/src/Migrations/Version20200728090247.php on lines 1..32
api/src/Migrations/Version20210209101549.php on lines 1..32
api/src/Migrations/Version20210209131508.php on lines 1..32
api/src/Migrations/Version20210224085058.php on lines 1..32
api/src/Migrations/Version20210511084025.php on lines 1..32
api/src/Migrations/Version20210629101841.php on lines 1..32
api/src/Migrations/Version20210701084801.php on lines 1..32
api/src/Migrations/Version20210722120220.php on lines 1..32
api/src/Migrations/Version20211021085229.php on lines 1..32
api/src/Migrations/Version20220107152257.php on lines 1..32
api/src/Migrations/Version20220427114856.php on lines 1..32
api/src/Migrations/Version20220622125824.php on lines 1..32
api/src/Migrations/Version20221227150225.php on lines 1..32
api/src/Migrations/Version20230526160710.php on lines 1..32
api/src/Migrations/Version20230529090020.php on lines 1..32
api/src/Migrations/Version20230529133842.php on lines 1..32
api/src/Migrations/Version20231026124858.php on lines 1..32
api/src/Migrations/Version20231124092918.php on lines 1..32

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

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