ExcludeInDiscountCalculation()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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