Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0 / 0 |
|
100.00% |
0 / 0 |
CRAP | |
100.00% |
0 / 0 |
|
| <?php | |
| namespace Mtc\Shop\Contracts; | |
| use Mtc\Shop\Product; | |
| use Mtc\Shop\Variant; | |
| interface PriceMethod | |
| { | |
| /** | |
| * Setup the price method | |
| * | |
| * @param Mtc\Shop\Product $product | |
| * @param Mtc\Shop\Variant|null $variant | |
| */ | |
| public function __construct(Product $product, Variant $variant = null); | |
| /** | |
| * Get the price (or lowest variant price) for a product. | |
| * | |
| * @param integer $quantity (default: 1) | |
| * @return float | |
| */ | |
| public function perProduct($quantity = 1); | |
| /** | |
| * Get the min/max price for an product. | |
| * | |
| * @param integer $quantity (default: 1) | |
| * @return float[] | |
| */ | |
| public function getRange($quantity = 1); | |
| /** | |
| * Get the price for a variant. | |
| * @param integer $quantity (default: 1) | |
| * @return float | |
| */ | |
| public function perVariant($quantity = 1); | |
| } |