| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class PercentageStrategy implements DiscountContract |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var int |
||
| 12 | */ |
||
| 13 | protected $sign; |
||
| 14 | |||
| 15 | 1 | public function __construct(int $sign) |
|
| 16 | { |
||
| 17 | 1 | $this->sign = $sign; |
|
| 18 | 1 | } |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Make Discount |
||
| 22 | * |
||
| 23 | * @param int $basePrice |
||
| 24 | * @return float |
||
| 25 | */ |
||
| 26 | 1 | public function make(int $basePrice): float |
|
| 29 | } |
||
| 30 | } |