@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | * |
| 145 | 145 | * @throws InvalidConfigException |
| 146 | 146 | * |
| 147 | - * @return string|callable|array |
|
| 147 | + * @return string |
|
| 148 | 148 | * |
| 149 | 149 | * @author SilverFire |
| 150 | 150 | */ |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | |
| 470 | 470 | /** |
| 471 | 471 | * {@inheritdoc} |
| 472 | - * @return ActiveQuery the relational query object. |
|
| 472 | + * @return \yii\db\ActiveQuery the relational query object. |
|
| 473 | 473 | */ |
| 474 | 474 | public function hasOne($class, $link) |
| 475 | 475 | { |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | |
| 479 | 479 | /** |
| 480 | 480 | * {@inheritdoc} |
| 481 | - * @return ActiveQuery the relational query object. |
|
| 481 | + * @return \yii\db\ActiveQuery the relational query object. |
|
| 482 | 482 | */ |
| 483 | 483 | public function hasMany($class, $link) |
| 484 | 484 | { |
@@ -76,6 +76,9 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | + /** |
|
| 80 | + * @param string $modelName |
|
| 81 | + */ |
|
| 79 | 82 | public function get($modelName, $primaryKey, $options) |
| 80 | 83 | { |
| 81 | 84 | return $this->db->post($modelName . 'GetInfo', ArrayHelper::merge(['id' => $primaryKey], $options)); |
@@ -106,7 +109,7 @@ discard block |
||
| 106 | 109 | } |
| 107 | 110 | |
| 108 | 111 | /** |
| 109 | - * @param $action |
|
| 112 | + * @param string $action |
|
| 110 | 113 | * @param array $options |
| 111 | 114 | * |
| 112 | 115 | * @return mixed |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | * @param mixed $path path |
| 247 | 247 | * @param array $options URL options |
| 248 | 248 | * |
| 249 | - * @return array |
|
| 249 | + * @return string |
|
| 250 | 250 | */ |
| 251 | 251 | private function createUrl($path, array $options = []) |
| 252 | 252 | { |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | /** |
| 410 | 410 | * Try to decode error information if it is valid json, return it if not. |
| 411 | 411 | * |
| 412 | - * @param $body |
|
| 412 | + * @param string $body |
|
| 413 | 413 | * |
| 414 | 414 | * @return mixed |
| 415 | 415 | */ |
@@ -296,12 +296,12 @@ |
||
| 296 | 296 | CURLOPT_SSL_VERIFYHOST => 2, |
| 297 | 297 | // http://www.php.net/manual/en/function.curl-setopt.php#82418 |
| 298 | 298 | CURLOPT_HTTPHEADER => ['Expect:'], |
| 299 | - CURLOPT_WRITEFUNCTION => function ($curl, $data) use (&$body) { |
|
| 299 | + CURLOPT_WRITEFUNCTION => function($curl, $data) use (&$body) { |
|
| 300 | 300 | $body .= $data; |
| 301 | 301 | |
| 302 | 302 | return mb_strlen($data, '8bit'); |
| 303 | 303 | }, |
| 304 | - CURLOPT_HEADERFUNCTION => function ($curl, $data) use (&$headers) { |
|
| 304 | + CURLOPT_HEADERFUNCTION => function($curl, $data) use (&$headers) { |
|
| 305 | 305 | foreach (explode("\r\n", $data) as $row) { |
| 306 | 306 | if (($pos = strpos($row, ':')) !== false) { |
| 307 | 307 | $headers[strtolower(substr($row, 0, $pos))] = trim(substr($row, $pos + 1)); |
@@ -27,6 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public $db; |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param Connection $connection |
|
| 32 | + */ |
|
| 30 | 33 | public function __construct($connection, $config = []) |
| 31 | 34 | { |
| 32 | 35 | $this->db = $connection; |
@@ -59,6 +62,9 @@ discard block |
||
| 59 | 62 | ]; |
| 60 | 63 | } |
| 61 | 64 | |
| 65 | + /** |
|
| 66 | + * @param integer $limit |
|
| 67 | + */ |
|
| 62 | 68 | public function buildLimit($limit, &$parts) |
| 63 | 69 | { |
| 64 | 70 | if (!empty($limit)) { |
@@ -69,6 +75,9 @@ discard block |
||
| 69 | 75 | } |
| 70 | 76 | } |
| 71 | 77 | |
| 78 | + /** |
|
| 79 | + * @param integer $limit |
|
| 80 | + */ |
|
| 72 | 81 | public function buildPage($offset, $limit, &$parts) |
| 73 | 82 | { |
| 74 | 83 | if ($offset > 0) { |
@@ -425,7 +425,7 @@ |
||
| 425 | 425 | */ |
| 426 | 426 | public function collectData($attributes = null, $options = []) |
| 427 | 427 | { |
| 428 | - $data = []; |
|
| 428 | + $data = []; |
|
| 429 | 429 | foreach ($this->models as $model) { |
| 430 | 430 | /* @var $model ActiveRecord */ |
| 431 | 431 | $key = $model->getPrimaryKey(); |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | if (!empty($traces)) { |
| 101 | 101 | $traceString .= Html::ul($traces, [ |
| 102 | 102 | 'class' => 'trace', |
| 103 | - 'item' => function ($trace) { |
|
| 103 | + 'item' => function($trace) { |
|
| 104 | 104 | return "<li>{$trace['file']}({$trace['line']})</li>"; |
| 105 | 105 | }, |
| 106 | 106 | ]); |
@@ -430,7 +430,7 @@ |
||
| 430 | 430 | $result = $result ?: []; |
| 431 | 431 | |
| 432 | 432 | // return $this->createCommand($db)->getList($options); |
| 433 | - return $as_array ? ArrayHelper::map($result, 'gl_key', function ($o) { |
|
| 433 | + return $as_array ? ArrayHelper::map($result, 'gl_key', function($o) { |
|
| 434 | 434 | return Yii::t('app', $o->gl_value); |
| 435 | 435 | }) : $result; |
| 436 | 436 | } |