Completed
Push — master ( 04e1cf...739024 )
by Klochok
05:32
created
src/AbstractQueryBuilder.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
                 return $this->$method($operator, $condition);
177 177
             } else {
178
-                throw new InvalidParamException('Found unknown operator in query: ' . $operator);
178
+                throw new InvalidParamException('Found unknown operator in query: '.$operator);
179 179
             }
180 180
         } else {
181 181
             return $this->buildHashCondition($condition);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         foreach ($condition as $attribute => $value) {
189 189
             if (is_array($value)) { // IN condition
190 190
                 // $parts[] = [$attribute.'s' => join(',',$value)];
191
-                $parts[$attribute . 's'] = implode(',', $value);
191
+                $parts[$attribute.'s'] = implode(',', $value);
192 192
             } else {
193 193
                 $parts[$attribute] = $value;
194 194
             }
@@ -199,12 +199,12 @@  discard block
 block discarded – undo
199 199
 
200 200
     protected function buildLikeCondition($operator, $operands)
201 201
     {
202
-        return [$operands[0] . '_like' => $operands[1]];
202
+        return [$operands[0].'_like' => $operands[1]];
203 203
     }
204 204
 
205 205
     protected function buildIlikeCondition($operator, $operands)
206 206
     {
207
-        return [$operands[0] . '_ilike' => $operands[1]];
207
+        return [$operands[0].'_ilike' => $operands[1]];
208 208
     }
209 209
 
210 210
     protected function buildCompareCondition($operator, $operands)
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             throw new InvalidParamException("Operator '$operator' requires three operands.");
214 214
         }
215 215
 
216
-        return [$operands[0] . '_' . $operator => $operands[1]];
216
+        return [$operands[0].'_'.$operator => $operands[1]];
217 217
     }
218 218
 
219 219
     protected function buildAndCondition($operator, $operands)
@@ -260,9 +260,9 @@  discard block
 block discarded – undo
260 260
         }
261 261
 
262 262
         if ($not) {
263
-            $key = $column . '_ni'; // not in
263
+            $key = $column.'_ni'; // not in
264 264
         } else {
265
-            $key = $column . '_in';
265
+            $key = $column.'_in';
266 266
         }
267 267
 
268 268
         return [$key => $values];
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     {
285 285
         $key = array_shift($operands);
286 286
 
287
-        return [$key . '_' . $operator => reset($operands)];
287
+        return [$key.'_'.$operator => reset($operands)];
288 288
     }
289 289
 
290 290
     protected function buildCompositeInCondition($operator, $columns, $values)
Please login to merge, or discard this patch.
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -137,6 +137,10 @@  discard block
 block discarded – undo
137 137
         return $this->createRequest($query);
138 138
     }
139 139
 
140
+    /**
141
+     * @param string $action
142
+     * @param string $table
143
+     */
140 144
     public function createQuery($action, $table, array $options = [])
141 145
     {
142 146
         $class = $this->db->queryClass;
@@ -287,6 +291,9 @@  discard block
 block discarded – undo
287 291
         return [$key . '_' . $operator => reset($operands)];
288 292
     }
289 293
 
294
+    /**
295
+     * @param \Countable $columns
296
+     */
290 297
     protected function buildCompositeInCondition($operator, $columns, $values)
291 298
     {
292 299
         throw new NotSupportedException('composite in is not supported by HiArt.');
Please login to merge, or discard this patch.
src/ActiveRecord.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@
 block discarded – undo
217 217
      */
218 218
     public function batchQuery($defaultScenario, $data = [], array $options = [])
219 219
     {
220
-        $batch = isset($options['batch']) ? (bool)$options['batch'] : true;
220
+        $batch = isset($options['batch']) ? (bool) $options['batch'] : true;
221 221
         $options['batch'] = $batch;
222 222
 
223 223
         if (!$batch) {
Please login to merge, or discard this patch.
src/Collection.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -376,8 +376,8 @@
 block discarded – undo
376 376
      * Try to find the model data if the response from the API came without an index by ID
377 377
      *
378 378
      * @param $data
379
-     * @param $model
380
-     * @param $pk
379
+     * @param ActiveRecord $model
380
+     * @param string $pk
381 381
      * @return mixed
382 382
      */
383 383
     private function findAssociatedModelData($data, $model, $pk)
Please login to merge, or discard this patch.
src/AbstractResponse.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
 
98 98
     /**
99 99
      * @param $name
100
-     * @return array
100
+     * @return string[]
101 101
      */
102 102
     abstract public function getHeader($name);
103 103
 
Please login to merge, or discard this patch.