tourze / coupon-contracts
Coupon Contracts
Installs: 509
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/tourze/coupon-contracts
Requires
- php: ^8.1
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-10-31 05:14:53 UTC
README
A collection of PHP contracts/interfaces for coupon and coupon code management systems.
Installation
composer require tourze/coupon-contracts
Quick Start
This package provides two main interfaces for building coupon systems:
CouponInterface
The main interface for coupon objects:
<?php use Tourze\CouponContracts\CouponInterface; class MyCoupon implements CouponInterface { // Your coupon implementation }
CodeInterface
The interface for coupon code objects:
<?php use Tourze\CouponContracts\CodeInterface; class MyCouponCode implements CodeInterface { // Your coupon code implementation }
Usage
These interfaces are designed to be implemented by your coupon system classes. They provide a consistent contract for:
- Coupon management systems
- Coupon code generation and validation
- Integration with different coupon backends
Requirements
- PHP 8.1 or higher
Testing
composer test
License
This package is open-sourced software licensed under the MIT license.