@@ -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, |
@@ -122,6 +122,9 @@ |
||
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | + /** |
|
| 126 | + * @param string $name |
|
| 127 | + */ |
|
| 125 | 128 | public function ensureSameType(self $other, $name) |
| 126 | 129 | { |
| 127 | 130 | if ($this->isRelative() && !$other->isRelative()) { |
@@ -43,6 +43,9 @@ discard block |
||
| 43 | 43 | $this->assertAbsolute($this->value, $abs); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @param FixedDiscount $abs |
|
| 48 | + */ |
|
| 46 | 49 | public function assertAbsolute($value, $abs) |
| 47 | 50 | { |
| 48 | 51 | $this->assertEquals($value, $abs->getValue()->getValue()); |
@@ -58,6 +61,9 @@ discard block |
||
| 58 | 61 | $this->assertRelative($this->rate, $rel); |
| 59 | 62 | } |
| 60 | 63 | |
| 64 | + /** |
|
| 65 | + * @param FixedDiscount $rel |
|
| 66 | + */ |
|
| 61 | 67 | protected function assertRelative($rate, $rel) |
| 62 | 68 | { |
| 63 | 69 | $this->assertSame($rate, $rel->getValue()->getValue()); |
@@ -77,6 +83,9 @@ discard block |
||
| 77 | 83 | $this->assertCharges($rel, $this->value); |
| 78 | 84 | } |
| 79 | 85 | |
| 86 | + /** |
|
| 87 | + * @param FixedDiscount $fd |
|
| 88 | + */ |
|
| 80 | 89 | public function assertCharges($fd, $sum) |
| 81 | 90 | { |
| 82 | 91 | $action = $this->createAction($this->prepaid->multiply(2)); |
@@ -73,6 +73,9 @@ discard block |
||
| 73 | 73 | return new Target(Target::ANY, Target::ANY); |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | + /** |
|
| 77 | + * @param string $dummy |
|
| 78 | + */ |
|
| 76 | 79 | public function till($dummy) |
| 77 | 80 | { |
| 78 | 81 | throw new \Exception('till can not be defined for leasing'); |
@@ -98,6 +101,9 @@ discard block |
||
| 98 | 101 | return [$charge]; |
| 99 | 102 | } |
| 100 | 103 | |
| 104 | + /** |
|
| 105 | + * @return DateTimeImmutable |
|
| 106 | + */ |
|
| 101 | 107 | protected function countPeriodsPassed(DateTimeImmutable $time) |
| 102 | 108 | { |
| 103 | 109 | $since = $this->getSince(); |
@@ -23,6 +23,9 @@ |
||
| 23 | 23 | { |
| 24 | 24 | protected $reason = 'test reason string'; |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @param string $term |
|
| 28 | + */ |
|
| 26 | 29 | protected function buildLeasing($term) |
| 27 | 30 | { |
| 28 | 31 | $month = (new DateTimeImmutable())->modify('first day of this month midnight'); |