Completed
Push — master ( ebbdca...b75495 )
by Dmitry
02:52
created
src/ActiveRecord.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/Command.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,6 +76,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
106 109
     }
107 110
 
108 111
     /**
109
-     * @param $action
112
+     * @param string $action
110 113
      * @param array $options
111 114
      *
112 115
      * @return mixed
Please login to merge, or discard this patch.
src/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -425,7 +425,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/DebugPanel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
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
                 ]);
Please login to merge, or discard this patch.
src/ActiveQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -430,7 +430,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/QueryBuilder.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -27,6 +27,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,10 @@  discard block
 block discarded – undo
69 75
         }
70 76
     }
71 77
 
78
+    /**
79
+     * @param integer $offset
80
+     * @param integer $limit
81
+     */
72 82
     public function buildPage($offset, $limit, &$parts)
73 83
     {
74 84
         if ($offset > 0) {
Please login to merge, or discard this patch.
tests/unit/ConnectionTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             'config'  => [
48 48
                 'base_uri' => $this->site,
49 49
             ],
50
-            'errorChecker' => function ($res) {
50
+            'errorChecker' => function($res) {
51 51
                 return null;
52 52
             },
53 53
         ]);
@@ -61,15 +61,15 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $result = $this->object->get($this->url, [], $this->body, false);
63 63
         $this->assertSame($this->result, $result);
64
-        $this->assertSame('request',   $this->mock->name);
65
-        $this->assertSame('GET',       $this->mock->args[0]);
66
-        $this->assertSame($this->url,  $this->mock->args[1]);
64
+        $this->assertSame('request', $this->mock->name);
65
+        $this->assertSame('GET', $this->mock->args[0]);
66
+        $this->assertSame($this->url, $this->mock->args[1]);
67 67
         $this->assertSame($this->body, $this->mock->args[2]['form_params']);
68 68
     }
69 69
 
70 70
     public function testErrorChecker()
71 71
     {
72
-        $this->object->setErrorChecker(function ($res) { return $res; });
72
+        $this->object->setErrorChecker(function($res) { return $res; });
73 73
         $this->setExpectedException('hiqdev\hiart\ErrorResponseException', $this->result);
74 74
         $this->object->get($this->url, [], $this->body, false);
75 75
     }
Please login to merge, or discard this patch.
src/Connection.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -206,7 +206,6 @@  discard block
 block discarded – undo
206 206
     /**
207 207
      * XXX DEPRECATED in favour of post().
208 208
      * @param $url
209
-     * @param array $query
210 209
      * @return mixed
211 210
      */
212 211
     public function perform($url, $body = [])
@@ -220,6 +219,7 @@  discard block
 block discarded – undo
220 219
      * @param array  $query query options, (GET parameters)
221 220
      * @param string $body  request body, (POST parameters)
222 221
      * @param bool   $raw   if response body contains JSON and should be decoded
222
+     * @param string $method
223 223
      * @throws HiArtException
224 224
      * @throws \yii\base\InvalidConfigException
225 225
      * @return mixed response
@@ -233,9 +233,9 @@  discard block
 block discarded – undo
233 233
 
234 234
     /**
235 235
      * Creates URL.
236
-     * @param mixed $path path
236
+     * @param string $path path
237 237
      * @param array $query query options
238
-     * @return array
238
+     * @return string
239 239
      */
240 240
     private function prepareUrl($path, array $query = [])
241 241
     {
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
     /**
324 324
      * Setter for errorChecker.
325
-     * @param Closure|array $value
325
+     * @param Closure $value
326 326
      * @return void
327 327
      */
328 328
     public function setErrorChecker($value)
Please login to merge, or discard this patch.