@@ -74,7 +74,7 @@ |
||
| 74 | 74 | * Executes the purchase. |
| 75 | 75 | * Calls proper API commands to purchase the product. |
| 76 | 76 | * @throws ErrorPurchaseException in case of failed purchase |
| 77 | - * @return true if the item was purchased successfully |
|
| 77 | + * @return boolean if the item was purchased successfully |
|
| 78 | 78 | */ |
| 79 | 79 | public function execute() |
| 80 | 80 | { |
@@ -68,6 +68,9 @@ |
||
| 68 | 68 | return $this->generateDocument('generate-document', compact('id', 'type')); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @param string $action |
|
| 73 | + */ |
|
| 71 | 74 | public function generateDocument($action, $params) |
| 72 | 75 | { |
| 73 | 76 | try { |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | - * @return array |
|
| 43 | + * @return string[] |
|
| 44 | 44 | */ |
| 45 | 45 | public static function getPeriods() |
| 46 | 46 | { |
@@ -47,6 +47,9 @@ |
||
| 47 | 47 | ]; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | + /** |
|
| 51 | + * @param string $name |
|
| 52 | + */ |
|
| 50 | 53 | private function groupOf($name, $formulas) |
| 51 | 54 | { |
| 52 | 55 | return ['name' => $name, 'formulas' => $formulas]; |
@@ -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)) { |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * |
| 87 | 87 | * The $price will be casted to double |
| 88 | 88 | * |
| 89 | - * @param mixed $price |
|
| 89 | + * @param string $price |
|
| 90 | 90 | */ |
| 91 | 91 | public function setPrice($price) |
| 92 | 92 | { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | * |
| 170 | 170 | * The $value will be casted to double |
| 171 | 171 | * |
| 172 | - * @param mixed $value |
|
| 172 | + * @param string $value |
|
| 173 | 173 | */ |
| 174 | 174 | public function setValue($value) |
| 175 | 175 | { |
@@ -220,6 +220,9 @@ |
||
| 220 | 220 | return $canSeeLink ? Html::a($model->tariff, ['@plan/view', 'id' => $model->tariff_id]) : $model->tariff; |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | + /** |
|
| 224 | + * @param Bill $model |
|
| 225 | + */ |
|
| 223 | 226 | public function objectTag($model): string |
| 224 | 227 | { |
| 225 | 228 | return $model->object ? implode(': ', [Yii::t('hipanel', $model->class_label), $this->objectLink($model)]) : ''; |
@@ -154,6 +154,9 @@ |
||
| 154 | 154 | return parent::getViewPath() . DIRECTORY_SEPARATOR . 'cartPaymentOptions'; |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | + /** |
|
| 158 | + * @param string $view |
|
| 159 | + */ |
|
| 157 | 160 | public function render($view, $params = []) |
| 158 | 161 | { |
| 159 | 162 | return parent::render($view, array_merge($params, [ |
@@ -115,6 +115,9 @@ |
||
| 115 | 115 | return $this->getDocumentsOfType('internal_invoice'); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string $type |
|
| 120 | + */ |
|
| 118 | 121 | public function getDocumentsOfType($type) |
| 119 | 122 | { |
| 120 | 123 | if (Yii::$app->user->can('document.read') === false) { |