@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
| 122 | - * @return array |
|
| 122 | + * @return string[] |
|
| 123 | 123 | */ |
| 124 | 124 | public static function getPeriods() |
| 125 | 125 | { |
@@ -153,6 +153,9 @@ discard block |
||
| 153 | 153 | return $this->moneyFormatter->format($this->getMoneyForPeriod($period)); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | + /** |
|
| 157 | + * @return Money |
|
| 158 | + */ |
|
| 156 | 159 | public function getMoneyForPeriod(int $period): ?Money |
| 157 | 160 | { |
| 158 | 161 | if (!$this->hasPriceForPeriod($period)) { |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | - * @return array |
|
| 60 | + * @return string[] |
|
| 61 | 61 | */ |
| 62 | 62 | public static function getPeriods() |
| 63 | 63 | { |
@@ -82,6 +82,9 @@ discard block |
||
| 82 | 82 | return $periods; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | + /** |
|
| 86 | + * @param integer $period |
|
| 87 | + */ |
|
| 85 | 88 | public function getPriceForPeriod($period) |
| 86 | 89 | { |
| 87 | 90 | $sums = $this->data['sums'][$period]; |
@@ -95,7 +98,7 @@ discard block |
||
| 95 | 98 | |
| 96 | 99 | /** |
| 97 | 100 | * @param int $period |
| 98 | - * @return string|null |
|
| 101 | + * @return null|Money |
|
| 99 | 102 | */ |
| 100 | 103 | public function getMoneyForPeriod(int $period) |
| 101 | 104 | { |
@@ -11,11 +11,7 @@ |
||
| 11 | 11 | namespace hipanel\modules\finance\models; |
| 12 | 12 | |
| 13 | 13 | use hipanel\base\ModelTrait; |
| 14 | -use Money\Formatter\IntlMoneyFormatter; |
|
| 15 | -use Money\Money; |
|
| 16 | -use Money\MoneyParser; |
|
| 17 | 14 | use Yii; |
| 18 | -use yii\base\InvalidConfigException; |
|
| 19 | 15 | use yii\validators\NumberValidator; |
| 20 | 16 | |
| 21 | 17 | /** |