Test Failed
Pull Request — master (#11)
by Joao
03:50
created
src/Mapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
     public static function defaultClosure()
192 192
     {
193
-        return function ($value) {
193
+        return function($value) {
194 194
             if (empty($value)) {
195 195
                 return null;
196 196
             }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
     public static function doNotUpdateClosure()
202 202
     {
203
-        return function () {
203
+        return function() {
204 204
             return false;
205 205
         };
206 206
     }
Please login to merge, or discard this patch.
src/Query.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function join($table, $filter, $alias = null)
102 102
     {
103
-        $this->join[] = [ 'table'=>$table, 'filter'=>$filter, 'type' => 'INNER', 'alias' => empty($alias) ? $table : $alias];
103
+        $this->join[] = ['table'=>$table, 'filter'=>$filter, 'type' => 'INNER', 'alias' => empty($alias) ? $table : $alias];
104 104
         return $this;
105 105
     }
106 106
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function leftJoin($table, $filter, $alias = null)
117 117
     {
118
-        $this->join[] = [ 'table'=>$table, 'filter'=>$filter, 'type' => 'LEFT', 'alias' => empty($alias) ? $table : $alias];
118
+        $this->join[] = ['table'=>$table, 'filter'=>$filter, 'type' => 'LEFT', 'alias' => empty($alias) ? $table : $alias];
119 119
         return $this;
120 120
     }
121 121
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public function rightJoin($table, $filter, $alias = null)
132 132
     {
133
-        $this->join[] = [ 'table'=>$table, 'filter'=>$filter, 'type' => 'RIGHT', 'alias' => empty($alias) ? $table : $alias];
133
+        $this->join[] = ['table'=>$table, 'filter'=>$filter, 'type' => 'RIGHT', 'alias' => empty($alias) ? $table : $alias];
134 134
         return $this;
135 135
     }
136 136
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function where($filter, array $params = [])
146 146
     {
147
-        $this->where[] = [ 'filter' => $filter, 'params' => $params  ];
147
+        $this->where[] = ['filter' => $filter, 'params' => $params];
148 148
         return $this;
149 149
     }
150 150
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
                 }
242 242
                 $table = "(${subQuery["sql"]})";
243 243
             }
244
-            $alias = $item['table'] == $item['alias'] ? "" : " as ". $item['alias'];
244
+            $alias = $item['table'] == $item['alias'] ? "" : " as " . $item['alias'];
245 245
             $joinStr .= ' ' . $item['type'] . " JOIN $table$alias ON " . $item['filter'];
246 246
         }
247 247
         return $joinStr;
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
             return null;
262 262
         }
263 263
         
264
-        return [ implode(' AND ', $whereStr), $params ];
264
+        return [implode(' AND ', $whereStr), $params];
265 265
     }
266 266
 
267 267
     /**
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
         $sql = ORMHelper::processLiteral($sql, $params);
298 298
 
299
-        return [ 'sql' => $sql, 'params' => $params ];
299
+        return ['sql' => $sql, 'params' => $params];
300 300
     }
301 301
 
302 302
     private function addOrderBy()
Please login to merge, or discard this patch.
src/Repository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $this->dbDriver = $dbDataset;
40 40
         $this->mapper = $mapper;
41
-        $this->beforeInsert = function ($instance) {
41
+        $this->beforeInsert = function($instance) {
42 42
             return $instance;
43 43
         };
44
-        $this->beforeUpdate = function ($instance) {
44
+        $this->beforeUpdate = function($instance) {
45 45
             return $instance;
46 46
         };
47 47
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      * @throws \ByJG\Serializer\Exception\InvalidArgumentException
139 139
      */
140 140
     public function filterIn($arrValues, $field = "") {
141
-        $arrValues = (array) $arrValues;
141
+        $arrValues = (array)$arrValues;
142 142
 
143 143
         if (empty($field)) {
144 144
             $field = $this->getMapper()->getPrimaryKey();
Please login to merge, or discard this patch.
src/Updatable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function where($filter, array $params = [])
57 57
     {
58
-        $this->where[] = [ 'filter' => $filter, 'params' => $params  ];
58
+        $this->where[] = ['filter' => $filter, 'params' => $params];
59 59
         return $this;
60 60
     }
61 61
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             return null;
83 83
         }
84 84
         
85
-        return [ implode(' AND ', $whereStr), $params ];
85
+        return [implode(' AND ', $whereStr), $params];
86 86
     }
87 87
 
88 88
 
Please login to merge, or discard this patch.