lib/composer/DiscountBundle/src/VisualMedia/DiscountBundle/Discount/DiscountFactoryInterface.php line 27

Open in your IDE?
  1. <?php
  2. /**
  3. * Discount Factory Interface
  4. *
  5. * @author Bertin van den Ham <b.vandenham@dappr.nl>
  6. */
  7. namespace VisualMedia\DiscountBundle\Discount;
  8. use VisualMedia\OrderBundle\Service\Cart;
  9. /**
  10. * Discount Factory Interface
  11. */
  12. interface DiscountFactoryInterface
  13. {
  14. /**
  15. * @return string
  16. */
  17. public static function getName(): string;
  18. /**
  19. * Calculate the discount.
  20. * @param Cart|null $cart
  21. * @return float
  22. */
  23. public function getDiscount(Cart $cart = null): float;
  24. }