Covivo/mobicoop

View on GitHub

Showing 1,612 of 1,620 total issues

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

        if (!in_array((($outwardResult->getWedTime() && $askConcerned->getCriteria()->isWedCheck()) ? $outwardResult->getWedTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getWedTime() && $askLinkedConcerned->getCriteria()->isWedCheck()) ? $returnResult->getWedTime()->format('H:i') : 'null'), $times)) {
            $times[] = (($outwardResult->getWedTime() && $askConcerned->getCriteria()->isWedCheck()) ? $outwardResult->getWedTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getWedTime() && $askLinkedConcerned->getCriteria()->isWedCheck()) ? $returnResult->getWedTime()->format('H:i') : 'null');
        }
Severity: Major
Found in api/src/Communication/EventSubscriber/CarpoolSubscriber.php and 6 other locations - About 4 hrs to fix
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 483..485
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 487..489
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 495..497
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 499..501
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 503..505
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 507..509

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

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

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

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

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

Refactorings

Further Reading

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

        if (!in_array((($outwardResult->getSunTime() && $askConcerned->getCriteria()->isSunCheck()) ? $outwardResult->getSunTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getSunTime() && $askLinkedConcerned->getCriteria()->isSunCheck()) ? $returnResult->getSunTime()->format('H:i') : 'null'), $times)) {
            $times[] = (($outwardResult->getSunTime() && $askConcerned->getCriteria()->isSunCheck()) ? $outwardResult->getSunTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getSunTime() && $askLinkedConcerned->getCriteria()->isSunCheck()) ? $returnResult->getSunTime()->format('H:i') : 'null');
        }
Severity: Major
Found in api/src/Communication/EventSubscriber/CarpoolSubscriber.php and 6 other locations - About 4 hrs to fix
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 483..485
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 487..489
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 491..493
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 495..497
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 499..501
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 503..505

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

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

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

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

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

Refactorings

Further Reading

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

        if (!in_array((($outwardResult->getTueTime() && $askConcerned->getCriteria()->isTueCheck()) ? $outwardResult->getTueTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getTueTime() && $askLinkedConcerned->getCriteria()->isTueCheck()) ? $returnResult->getTueTime()->format('H:i') : 'null'), $times)) {
            $times[] = (($outwardResult->getTueTime() && $askConcerned->getCriteria()->isTueCheck()) ? $outwardResult->getTueTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getTueTime() && $askLinkedConcerned->getCriteria()->isTueCheck()) ? $returnResult->getTueTime()->format('H:i') : 'null');
        }
Severity: Major
Found in api/src/Communication/EventSubscriber/CarpoolSubscriber.php and 6 other locations - About 4 hrs to fix
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 483..485
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 491..493
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 495..497
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 499..501
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 503..505
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 507..509

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

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

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

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

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

Refactorings

Further Reading

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

        if (!in_array((($outwardResult->getFriTime() && $askConcerned->getCriteria()->isFriCheck()) ? $outwardResult->getFriTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getFriTime() && $askLinkedConcerned->getCriteria()->isFriCheck()) ? $returnResult->getFriTime()->format('H:i') : 'null'), $times)) {
            $times[] = (($outwardResult->getFriTime() && $askConcerned->getCriteria()->isFriCheck()) ? $outwardResult->getFriTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getFriTime() && $askLinkedConcerned->getCriteria()->isFriCheck()) ? $returnResult->getFriTime()->format('H:i') : 'null');
        }
Severity: Major
Found in api/src/Communication/EventSubscriber/CarpoolSubscriber.php and 6 other locations - About 4 hrs to fix
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 483..485
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 487..489
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 491..493
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 495..497
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 503..505
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 507..509

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

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

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

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

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

Refactorings

Further Reading

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

        if (!in_array((($outwardResult->getThuTime() && $askConcerned->getCriteria()->isThuCheck()) ? $outwardResult->getThuTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getThuTime() && $askLinkedConcerned->getCriteria()->isThuCheck()) ? $returnResult->getThuTime()->format('H:i') : 'null'), $times)) {
            $times[] = (($outwardResult->getThuTime() && $askConcerned->getCriteria()->isThuCheck()) ? $outwardResult->getThuTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getThuTime() && $askLinkedConcerned->getCriteria()->isThuCheck()) ? $returnResult->getThuTime()->format('H:i') : 'null');
        }
Severity: Major
Found in api/src/Communication/EventSubscriber/CarpoolSubscriber.php and 6 other locations - About 4 hrs to fix
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 483..485
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 487..489
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 491..493
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 499..501
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 503..505
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 507..509

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

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

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

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

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

Refactorings

Further Reading

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

        if (!in_array((($outwardResult->getMonTime() && $askConcerned->getCriteria()->isMonCheck()) ? $outwardResult->getMonTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getMonTime() && $askLinkedConcerned->getCriteria()->isMonCheck()) ? $returnResult->getMonTime()->format('H:i') : 'null'), $times)) {
            $times[] = (($outwardResult->getMonTime() && $askConcerned->getCriteria()->isMonCheck()) ? $outwardResult->getMonTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getMonTime() && $askLinkedConcerned->getCriteria()->isMonCheck()) ? $returnResult->getMonTime()->format('H:i') : 'null');
        }
Severity: Major
Found in api/src/Communication/EventSubscriber/CarpoolSubscriber.php and 6 other locations - About 4 hrs to fix
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 487..489
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 491..493
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 495..497
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 499..501
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 503..505
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 507..509

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

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

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

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

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

Refactorings

Further Reading

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

        if (!in_array((($outwardResult->getSatTime() && $askConcerned->getCriteria()->isSatCheck()) ? $outwardResult->getSatTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getSatTime() && $askLinkedConcerned->getCriteria()->isSatCheck()) ? $returnResult->getSatTime()->format('H:i') : 'null'), $times)) {
            $times[] = (($outwardResult->getSatTime() && $askConcerned->getCriteria()->isSatCheck()) ? $outwardResult->getSatTime()->format('H:i') : 'null').' '.((!is_null($askLinkedConcerned) && $returnResult->getSatTime() && $askLinkedConcerned->getCriteria()->isSatCheck()) ? $returnResult->getSatTime()->format('H:i') : 'null');
        }
Severity: Major
Found in api/src/Communication/EventSubscriber/CarpoolSubscriber.php and 6 other locations - About 4 hrs to fix
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 483..485
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 487..489
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 491..493
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 495..497
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 499..501
api/src/Communication/EventSubscriber/CarpoolSubscriber.php on lines 507..509

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

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

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

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

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

Refactorings

Further Reading

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

    public function __construct(
        User $user,
        string $subscriptionId,
        SubscriptionDefinitionInterface $subscriptionDefinition
    ) {
Severity: Major
Found in api/src/Incentive/Entity/ShortDistanceSubscription.php and 1 other location - About 4 hrs to fix
api/src/Incentive/Entity/LongDistanceSubscription.php on lines 373..396

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

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

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

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

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

Refactorings

Further Reading

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

    public function __construct(
        User $user,
        string $subscriptionId,
        SubscriptionDefinitionInterface $subscriptionDefinition
    ) {
Severity: Major
Found in api/src/Incentive/Entity/LongDistanceSubscription.php and 1 other location - About 4 hrs to fix
api/src/Incentive/Entity/ShortDistanceSubscription.php on lines 372..395

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

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

CarpoolPayment has 37 functions (exceeds 20 allowed). Consider refactoring.
Open

class CarpoolPayment
{
    public const STATUS_INITIATED = 0;
    public const STATUS_SUCCESS = 1;
    public const STATUS_FAILURE = 2;
Severity: Minor
Found in api/src/Payment/Entity/CarpoolPayment.php - About 4 hrs to fix

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

        public function down(Schema $schema) : void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
    
    
    Severity: Major
    Found in api/src/Migrations/Version20190324100034.php and 3 other locations - About 4 hrs to fix
    api/src/Migrations/Version20190324100034.php on lines 34..55
    api/src/Migrations/Version20190430134441.php on lines 34..55
    api/src/Migrations/Version20190507131703.php on lines 34..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 179.

    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

        public function up(Schema $schema) : void
        {
            // this up() migration is auto-generated, please modify it to your needs
            $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
    
    
    Severity: Major
    Found in api/src/Migrations/Version20190507131703.php and 3 other locations - About 4 hrs to fix
    api/src/Migrations/Version20190324100034.php on lines 34..55
    api/src/Migrations/Version20190324100034.php on lines 57..78
    api/src/Migrations/Version20190430134441.php on lines 34..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 179.

    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

        public function up(Schema $schema) : void
        {
            // this up() migration is auto-generated, please modify it to your needs
            $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
    
    
    Severity: Major
    Found in api/src/Migrations/Version20190324100034.php and 3 other locations - About 4 hrs to fix
    api/src/Migrations/Version20190324100034.php on lines 57..78
    api/src/Migrations/Version20190430134441.php on lines 34..55
    api/src/Migrations/Version20190507131703.php on lines 34..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 179.

    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

        public function up(Schema $schema) : void
        {
            // this up() migration is auto-generated, please modify it to your needs
            $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
    
    
    Severity: Major
    Found in api/src/Migrations/Version20190430134441.php and 3 other locations - About 4 hrs to fix
    api/src/Migrations/Version20190324100034.php on lines 34..55
    api/src/Migrations/Version20190324100034.php on lines 57..78
    api/src/Migrations/Version20190507131703.php on lines 34..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 179.

    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 ($ad->getOutwardWaypoints() as $position => $point) {
                $waypoint = new Waypoint();
    
                $address = ($point instanceof Address) ? $point : $this->createAddressFromPoint($point);
    
    
    Severity: Major
    Found in api/src/Carpool/Service/AdManager.php and 1 other location - About 4 hrs to fix
    api/src/Carpool/Service/AdManager.php on lines 571..590

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

    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 ($ad->getReturnWaypoints() as $position => $point) {
                    $waypoint = new Waypoint();
    
                    $address = ($point instanceof Address) ? $point : $this->createAddressFromPoint($point);
    
    
    Severity: Major
    Found in api/src/Carpool/Service/AdManager.php and 1 other location - About 4 hrs to fix
    api/src/Carpool/Service/AdManager.php on lines 436..455

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

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

    <?php declare(strict_types=1);
    
    namespace DoctrineMigrations;
    
    use Doctrine\DBAL\Schema\Schema;
    Severity: Major
    Found in api/src/Migrations/Version20191127171355.php and 11 other locations - About 4 hrs to fix
    api/src/Migrations/Version20180921094924.php on lines 1..57
    api/src/Migrations/Version20190514153722.php on lines 1..36
    api/src/Migrations/Version20190527073022.php on lines 1..36
    api/src/Migrations/Version20200320074704.php on lines 1..36
    api/src/Migrations/Version20200325162657.php on lines 1..36
    api/src/Migrations/Version20200506115046.php on lines 1..36
    api/src/Migrations/Version20200506142524.php on lines 1..36
    api/src/Migrations/Version20200515095252.php on lines 1..36
    api/src/Migrations/Version20200709134600.php on lines 1..36
    api/src/Migrations/Version20210625084030.php on lines 1..36
    api/src/Migrations/Version20230118150956.php on lines 1..36

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

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

    <?php declare(strict_types=1);
    
    namespace DoctrineMigrations;
    
    use Doctrine\DBAL\Schema\Schema;
    Severity: Major
    Found in api/src/Migrations/Version20200320074704.php and 11 other locations - About 4 hrs to fix
    api/src/Migrations/Version20180921094924.php on lines 1..57
    api/src/Migrations/Version20190514153722.php on lines 1..36
    api/src/Migrations/Version20190527073022.php on lines 1..36
    api/src/Migrations/Version20191127171355.php on lines 1..36
    api/src/Migrations/Version20200325162657.php on lines 1..36
    api/src/Migrations/Version20200506115046.php on lines 1..36
    api/src/Migrations/Version20200506142524.php on lines 1..36
    api/src/Migrations/Version20200515095252.php on lines 1..36
    api/src/Migrations/Version20200709134600.php on lines 1..36
    api/src/Migrations/Version20210625084030.php on lines 1..36
    api/src/Migrations/Version20230118150956.php on lines 1..36

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

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

    <?php declare(strict_types=1);
    
    namespace DoctrineMigrations;
    
    use Doctrine\DBAL\Schema\Schema;
    Severity: Major
    Found in api/src/Migrations/Version20230118150956.php and 11 other locations - About 4 hrs to fix
    api/src/Migrations/Version20180921094924.php on lines 1..57
    api/src/Migrations/Version20190514153722.php on lines 1..36
    api/src/Migrations/Version20190527073022.php on lines 1..36
    api/src/Migrations/Version20191127171355.php on lines 1..36
    api/src/Migrations/Version20200320074704.php on lines 1..36
    api/src/Migrations/Version20200325162657.php on lines 1..36
    api/src/Migrations/Version20200506115046.php on lines 1..36
    api/src/Migrations/Version20200506142524.php on lines 1..36
    api/src/Migrations/Version20200515095252.php on lines 1..36
    api/src/Migrations/Version20200709134600.php on lines 1..36
    api/src/Migrations/Version20210625084030.php on lines 1..36

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

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

    <?php declare(strict_types=1);
    
    namespace DoctrineMigrations;
    
    use Doctrine\DBAL\Schema\Schema;
    Severity: Major
    Found in api/src/Migrations/Version20200506115046.php and 11 other locations - About 4 hrs to fix
    api/src/Migrations/Version20180921094924.php on lines 1..57
    api/src/Migrations/Version20190514153722.php on lines 1..36
    api/src/Migrations/Version20190527073022.php on lines 1..36
    api/src/Migrations/Version20191127171355.php on lines 1..36
    api/src/Migrations/Version20200320074704.php on lines 1..36
    api/src/Migrations/Version20200325162657.php on lines 1..36
    api/src/Migrations/Version20200506142524.php on lines 1..36
    api/src/Migrations/Version20200515095252.php on lines 1..36
    api/src/Migrations/Version20200709134600.php on lines 1..36
    api/src/Migrations/Version20210625084030.php on lines 1..36
    api/src/Migrations/Version20230118150956.php on lines 1..36

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

    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