public function makeUse(CouponOnUsedEvent $event)
    {
        $coupon = $event->getCoupon();
        $coupon->makeUse();

        $this
            ->couponObjectManager
            ->flush($coupon);
    }
public function makeUse(CouponOnUsedEvent $event)
    {
        $coupon = $event->getCoupon();
        $coupon->makeUse();

        $this
            ->couponObjectManager
            ->flush($coupon);
    }
public function makeUse ( CouponOnUsedEvent $ event ) { $ coupon = $ event -> getCoupon ( ) ; $ coupon -> makeUse ( ) ; $ this -> couponObjectManager -> flush ( $ coupon ) ; }
This subscriber check if coupon can be still used by checking if number
of coupons is already smaller than times it has been used.

If not, disables it.

@param CouponOnUsedEvent $event Event
This subscriber check if coupon can be still used by checking if number of coupons is already smaller than times it has been used .