DiscountCouponSiteTreeDOD_ProductVariation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A ExcludeInDiscountCalculation() 0 5 1
1
<?php
2
3
4
class DiscountCouponSiteTreeDOD_ProductVariation extends DataExtension
5
{
6
7
    /**
8
     *
9
     * @param DiscountCouponModifier $modifier
10
     *
11
     * @return boolean
12
     *
13
     */
14
    public function ExcludeInDiscountCalculation(DiscountCouponModifier $modifier)
15
    {
16
        $coupon = $modifier->DiscountCouponOption();
0 ignored issues
show
Bug introduced by
The method DiscountCouponOption() does not exist on DiscountCouponModifier. Did you maybe mean myDiscountCouponOption()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
17
        return ! $coupon->canBeDiscounted($this->owner->Product());
18
    }
19
}
20