@@ -26,7 +26,6 @@ |
||
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Finds suitable plans for given order: customer + actions. |
| 29 | - * @param ActionInterface $action |
|
| 30 | 29 | * @return PlanInterface[] array: actionKey => plan |
| 31 | 30 | */ |
| 32 | 31 | public function findByOrder(OrderInterface $order); |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | - * @return string |
|
| 45 | + * @return boolean |
|
| 46 | 46 | */ |
| 47 | 47 | public function equals(TypeInterface $other) |
| 48 | 48 | { |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use hiqdev\php\billing\type\Type; |
| 19 | 19 | use hiqdev\php\units\Quantity; |
| 20 | 20 | use hiqdev\php\units\Unit; |
| 21 | -use Money\Currency; |
|
| 22 | 21 | use Money\Money; |
| 23 | 22 | |
| 24 | 23 | /** |
@@ -43,6 +43,9 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | protected $sums; |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @param string|null $id |
|
| 48 | + */ |
|
| 46 | 49 | public function __construct( |
| 47 | 50 | $id, |
| 48 | 51 | TypeInterface $type, |
@@ -13,7 +13,6 @@ |
||
| 13 | 13 | use hiqdev\php\billing\action\ActionInterface; |
| 14 | 14 | use hiqdev\php\billing\charge\Charge; |
| 15 | 15 | use hiqdev\php\billing\charge\ChargeInterface; |
| 16 | -use hiqdev\php\billing\charge\ChargeModifier; |
|
| 17 | 16 | use hiqdev\php\billing\customer\CustomerInterface; |
| 18 | 17 | use hiqdev\php\billing\price\PriceInterface; |
| 19 | 18 | |
@@ -39,6 +39,9 @@ discard block |
||
| 39 | 39 | $this->assertAbsolute($this->value, $abs); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param FixedDiscount $abs |
|
| 44 | + */ |
|
| 42 | 45 | public function assertAbsolute($value, $abs) |
| 43 | 46 | { |
| 44 | 47 | $this->assertEquals($value, $abs->getValue()); |
@@ -54,6 +57,9 @@ discard block |
||
| 54 | 57 | $this->assertRelative($this->rate, $rel); |
| 55 | 58 | } |
| 56 | 59 | |
| 60 | + /** |
|
| 61 | + * @param FixedDiscount $rel |
|
| 62 | + */ |
|
| 57 | 63 | protected function assertRelative($rate, $rel) |
| 58 | 64 | { |
| 59 | 65 | $this->assertSame($rate, $rel->getValue()); |
@@ -73,6 +79,9 @@ discard block |
||
| 73 | 79 | $this->assertFixedDiscountCharges($rel, $this->value); |
| 74 | 80 | } |
| 75 | 81 | |
| 82 | + /** |
|
| 83 | + * @param FixedDiscount $fd |
|
| 84 | + */ |
|
| 76 | 85 | public function assertFixedDiscountCharges($fd, $sum) |
| 77 | 86 | { |
| 78 | 87 | $action = $this->createAction($this->prepaid->multiply(2)); |
@@ -14,7 +14,6 @@ |
||
| 14 | 14 | use hiqdev\php\billing\charge\modifiers\FixedDiscount; |
| 15 | 15 | use hiqdev\php\billing\tests\unit\action\ActionTest; |
| 16 | 16 | use hiqdev\php\units\Quantity; |
| 17 | -use Money\Currency; |
|
| 18 | 17 | use Money\Money; |
| 19 | 18 | |
| 20 | 19 | /** |
@@ -68,6 +68,9 @@ |
||
| 68 | 68 | $this->assertReason($this->modifier); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @param Modifier $modifier |
|
| 73 | + */ |
|
| 71 | 74 | public function assertReason($modifier) |
| 72 | 75 | { |
| 73 | 76 | $reason = $modifier->getReason(); |
@@ -82,6 +82,9 @@ |
||
| 82 | 82 | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | + /** |
|
| 86 | + * @param string $name |
|
| 87 | + */ |
|
| 85 | 88 | public function ensureValidLimit($limit, $name) |
| 86 | 89 | { |
| 87 | 90 | $limit = static::ensureValidValue($limit); |