mundipagg/magento2

View on GitHub

Showing 453 of 453 total issues

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

    public function execute(Observer $observer)
    {
        $method = $this->readMethodArgument($observer);
        $info = $method->getInfoInstance();
        $data = $this->readDataArgument($observer);
Severity: Major
Found in Observer/VoucherDataAssignObserver.php and 1 other location - About 5 hrs to fix
Observer/DebitDataAssignObserver.php on lines 31..58

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

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 execute()
    {
        $planId = (int) $this->getRequest()->getParam('id');
        if ($planId) {
            //@todo this should be a product plan core object
Severity: Major
Found in Controller/Adminhtml/Plans/Create.php and 1 other location - About 5 hrs to fix
Controller/Adminhtml/RecurrenceProducts/Create.php on lines 54..78

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

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 execute()
    {
        $productId = (int)$this->getRequest()->getParam('id');
        if ($productId) {

Severity: Major
Found in Controller/Adminhtml/RecurrenceProducts/Create.php and 1 other location - About 5 hrs to fix
Controller/Adminhtml/Plans/Create.php on lines 16..39

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

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

    public function updateConfigProductRecurrenceAllowSet($setup)
    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
Severity: Major
Found in Setup/Recurrence.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceStartAtDays($setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
Severity: Major
Found in Setup/UpgradeData.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceGlobal($setup)
    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
Severity: Major
Found in Setup/Recurrence.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceBillingPeriodDays($setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
Severity: Major
Found in Setup/UpgradeData.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceAllowSet($setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
Severity: Major
Found in Setup/UpgradeData.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductPlanTrialPeriod($setup)
    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
Severity: Major
Found in Setup/Recurrence.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceIntervalPeriod($setup)
    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
Severity: Major
Found in Setup/Recurrence.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceAllowOther($setup)
    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
Severity: Major
Found in Setup/Recurrence.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductPlanIntervalPeriod($setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
Severity: Major
Found in Setup/UpgradeData.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceAllowOther($setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
Severity: Major
Found in Setup/UpgradeData.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728

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

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

    public function updateConfigProductRecurrenceBillingPeriodDays($setup)
    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
Severity: Major
Found in Setup/Recurrence.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceIntervalPeriod($setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
Severity: Major
Found in Setup/UpgradeData.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceStartAtDays($setup)
    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
Severity: Major
Found in Setup/Recurrence.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductPlanTrialPeriod($setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
Severity: Major
Found in Setup/UpgradeData.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductPlanBillingPeriodDays($setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
Severity: Major
Found in Setup/UpgradeData.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductPlanBillingPeriodDays($setup)
    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
Severity: Major
Found in Setup/Recurrence.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 698..728
Setup/UpgradeData.php on lines 730..760

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

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

    public function updateConfigProductRecurrenceGlobal($setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
Severity: Major
Found in Setup/UpgradeData.php and 17 other locations - About 5 hrs to fix
Setup/Recurrence.php on lines 114..146
Setup/Recurrence.php on lines 186..218
Setup/Recurrence.php on lines 220..252
Setup/Recurrence.php on lines 339..371
Setup/Recurrence.php on lines 409..441
Setup/Recurrence.php on lines 483..514
Setup/Recurrence.php on lines 555..586
Setup/Recurrence.php on lines 588..619
Setup/Recurrence.php on lines 621..652
Setup/UpgradeData.php on lines 279..309
Setup/UpgradeData.php on lines 346..376
Setup/UpgradeData.php on lines 378..408
Setup/UpgradeData.php on lines 490..520
Setup/UpgradeData.php on lines 557..587
Setup/UpgradeData.php on lines 625..655
Setup/UpgradeData.php on lines 666..696
Setup/UpgradeData.php on lines 730..760

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

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