Skip to content

Instantly share code, notes, and snippets.

@FabianWesner
Created March 17, 2017 16:13
Show Gist options
  • Select an option

  • Save FabianWesner/728398287997969f401976ea96fb5bd2 to your computer and use it in GitHub Desktop.

Select an option

Save FabianWesner/728398287997969f401976ea96fb5bd2 to your computer and use it in GitHub Desktop.
<?php
namespace Spryker\Zed\Discount\Business\Calculator;
class Discount implements DiscountInterface
{
/**
* @var \Spryker\Zed\Discount\Persistence\DiscountQueryContainerInterface
*/
protected $queryContainer;
/**
* @var \Spryker\Zed\Discount\Business\Calculator\CalculatorInterface
*/
protected $calculator;
/**
* @var \Spryker\Zed\Discount\Business\QueryString\SpecificationBuilderInterface
*/
protected $decisionRuleBuilder;
/**
* @var \Spryker\Zed\Discount\Business\Voucher\VoucherValidatorInterface
*/
protected $voucherValidator;
/**
* @param \Spryker\Zed\Discount\Persistence\DiscountQueryContainerInterface $queryContainer
* @param \Spryker\Zed\Discount\Business\Calculator\CalculatorInterface $calculator
* @param \Spryker\Zed\Discount\Business\QueryString\SpecificationBuilderInterface $decisionRuleBuilder
* @param \Spryker\Zed\Discount\Business\Voucher\VoucherValidatorInterface $voucherValidator
*/
public function __construct(
DiscountQueryContainerInterface $queryContainer,
CalculatorInterface $calculator,
SpecificationBuilderInterface $decisionRuleBuilder,
VoucherValidatorInterface $voucherValidator
) {
$this->queryContainer = $queryContainer;
$this->calculator = $calculator;
$this->decisionRuleBuilder = $decisionRuleBuilder;
$this->voucherValidator = $voucherValidator;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment