@@ -119,6 +119,10 @@ discard block |
||
119 | 119 | return CHtml::listData(self::model()->findAllByAttributes($attributes), 'pk', 'pk'); |
120 | 120 | } |
121 | 121 | |
122 | + /** |
|
123 | + * @param integer $primaryKey |
|
124 | + * @param string $associationGroup |
|
125 | + */ |
|
122 | 126 | private function createTag($primaryKey, $associationGroup) |
123 | 127 | { |
124 | 128 | while($tag = md5(microtime())) |
@@ -157,6 +161,10 @@ discard block |
||
157 | 161 | throw new CHttpException(500, 'Не удалось создать запись'); |
158 | 162 | } |
159 | 163 | |
164 | + /** |
|
165 | + * @param integer $pk |
|
166 | + * @param string $associationGroup |
|
167 | + */ |
|
160 | 168 | private function clearItem($pk, $tag, $associationGroup) |
161 | 169 | { |
162 | 170 | if( !self::model()->deleteAllByAttributes(array('pk' => $pk, 'tag' => $tag, 'association_group' => $associationGroup)) ) |
@@ -53,6 +53,9 @@ |
||
53 | 53 | ); |
54 | 54 | } |
55 | 55 | |
56 | + /** |
|
57 | + * @param string $productId |
|
58 | + */ |
|
56 | 59 | public function getByProductId($productId) |
57 | 60 | { |
58 | 61 | if( is_null($this->productOptions) ) |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | /** |
377 | 377 | * @param $attribute |
378 | 378 | * @param null $parentAttribute |
379 | - * @param null $model |
|
379 | + * @param BActiveRecord $model |
|
380 | 380 | * |
381 | 381 | * @throws CHttpException |
382 | 382 | * @return array |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | * Renders a depended drop-down list rows. |
413 | 413 | * |
414 | 414 | * @param BProduct $model |
415 | - * @param $attribute |
|
415 | + * @param string $attribute |
|
416 | 416 | * @param $dependedAttribute |
417 | 417 | * |
418 | 418 | * @return string |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | * Renders a depended check box list rows. |
433 | 433 | * |
434 | 434 | * @param BProduct $model |
435 | - * @param $attribute |
|
435 | + * @param string $attribute |
|
436 | 436 | * @param $dependedAttribute |
437 | 437 | * |
438 | 438 | * @return string |
@@ -111,6 +111,9 @@ |
||
111 | 111 | return $label; |
112 | 112 | } |
113 | 113 | |
114 | + /** |
|
115 | + * @param string $label |
|
116 | + */ |
|
114 | 117 | protected function createPopupHint($label, $popupHint) |
115 | 118 | { |
116 | 119 | return CHtml::tag('span', |
@@ -158,6 +158,9 @@ discard block |
||
158 | 158 | } |
159 | 159 | } |
160 | 160 | |
161 | + /** |
|
162 | + * @param string $engine |
|
163 | + */ |
|
161 | 164 | protected function checkEngine($engine) |
162 | 165 | { |
163 | 166 | $q = $this->pdo->query('SHOW ENGINES;'); |
@@ -224,7 +227,7 @@ discard block |
||
224 | 227 | * @param PDO $connection Соединение с базой данных. |
225 | 228 | * |
226 | 229 | * @throws BadMethodCallException |
227 | - * @return array Результат команды SHOW GRANTS; |
|
230 | + * @return string[] Результат команды SHOW GRANTS; |
|
228 | 231 | */ |
229 | 232 | public static function getShowGrantsOutput(PDO $connection) |
230 | 233 | { |
@@ -322,6 +325,9 @@ discard block |
||
322 | 325 | return reset($candidates); |
323 | 326 | } |
324 | 327 | |
328 | + /** |
|
329 | + * @param string $string |
|
330 | + */ |
|
325 | 331 | private function parsePrivileges($string) |
326 | 332 | { |
327 | 333 | if( !preg_match('/GRANT\s+(?<privileges>.+)\s+ON/i', $string, $matches) ) |
@@ -104,6 +104,9 @@ |
||
104 | 104 | return file_exists($modulePath) && is_dir($modulePath); |
105 | 105 | } |
106 | 106 | |
107 | + /** |
|
108 | + * @param string $module |
|
109 | + */ |
|
107 | 110 | protected function clearDb($module) |
108 | 111 | { |
109 | 112 | Yii::import('backend.modules.'.$module.'.models.*'); |
@@ -298,6 +298,9 @@ |
||
298 | 298 | } |
299 | 299 | } |
300 | 300 | |
301 | + /** |
|
302 | + * @param string $paramId |
|
303 | + */ |
|
301 | 304 | private function getVariantId($paramId, $name) |
302 | 305 | { |
303 | 306 | if( !$variant = Arr::get($this->parameterVariants, $paramId.$name, BProductParamVariant::model()->findByAttributes(array('param_id' => $paramId, 'name' => $name))) ) |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | } |
354 | 354 | |
355 | 355 | /** |
356 | - * @return CActiveRecord |
|
356 | + * @return string |
|
357 | 357 | */ |
358 | 358 | protected function getModelName() |
359 | 359 | { |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | |
377 | 377 | /** |
378 | 378 | * @param CDbCriteria $criteria |
379 | - * @param $attribute |
|
379 | + * @param string $attribute |
|
380 | 380 | * |
381 | 381 | * @return array |
382 | 382 | */ |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * @param bool $restore |
52 | 52 | * |
53 | 53 | * @throws CHttpException |
54 | - * @return bool |
|
54 | + * @return boolean|null |
|
55 | 55 | */ |
56 | 56 | public function add($data, $restore = false) |
57 | 57 | { |
@@ -113,6 +113,9 @@ discard block |
||
113 | 113 | return $amount; |
114 | 114 | } |
115 | 115 | |
116 | + /** |
|
117 | + * @param integer $amount |
|
118 | + */ |
|
116 | 119 | public function changeAmount($index, $amount = null) |
117 | 120 | { |
118 | 121 | if( $amount !== null ) |
@@ -152,7 +155,7 @@ discard block |
||
152 | 155 | * @param array|FCollectionElement|CActiveRecord $type |
153 | 156 | * @param null $id |
154 | 157 | * |
155 | - * @return bool |
|
158 | + * @return integer|null |
|
156 | 159 | */ |
157 | 160 | public function getIndex($type, $id = null) |
158 | 161 | { |