Passed
Push — main ( 488351...ff7bb8 )
by BRUNO
10:46 queued 08:05
created
src/DatalayerTrait.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         try {
74 74
             if (strpos($_SERVER['SERVER_NAME'], mb_strtolower(CONFIG_DATA_LAYER["homologation"])) && !strpos($this->getDatabase(), ucfirst(CONFIG_DATA_LAYER["homologation"]))) {
75
-                $database = $this->getDatabase().ucfirst(CONFIG_DATA_LAYER["homologation"] ?? "");
75
+                $database = $this->getDatabase() . ucfirst(CONFIG_DATA_LAYER["homologation"] ?? "");
76 76
                 $this->setDatabase($database);
77 77
             }
78 78
 
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
     protected function setDatabase(string $database): self
116 116
     {
117 117
         if (strpos($_SERVER['SERVER_NAME'], mb_strtolower(CONFIG_DATA_LAYER["homologation"])) && !strpos($database, ucfirst(CONFIG_DATA_LAYER["homologation"]))) {
118
-            $database = $database.ucfirst(CONFIG_DATA_LAYER["homologation"] ?? "");
118
+            $database = $database . ucfirst(CONFIG_DATA_LAYER["homologation"] ?? "");
119 119
             $this->database = $database;
120 120
         } else {
121 121
             $this->database = $database;
122 122
         }
123 123
 
124
-        if (!empty($this->instance)){
124
+        if (!empty($this->instance)) {
125 125
             $this->executeSQL("USE {$this->getDatabase()}");
126 126
         }
127 127
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             $prepare = empty($prepare) ? $this->getPrepare() : $prepare;
249 249
             return $prepare->rowCount();
250 250
         } catch (PDOException $e) {
251
-            $this->setError($e);}
251
+            $this->setError($e); }
252 252
     }
253 253
 
254 254
     /**
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
     }
156 156
 
157 157
     /**
158
-        * @param string $tableName
159
-        * @param string $tableAlias
160
-        * @return CrudBuilder|Crud|DatalayerTrait
158
+     * @param string $tableName
159
+     * @param string $tableAlias
160
+     * @return CrudBuilder|Crud|DatalayerTrait
161 161
      */
162 162
     protected function setTableName(string $tableName, string $tableAlias = ""): self
163 163
     {
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
     protected function getData(): array
233 233
     {
234
-       return $this->data;
234
+        return $this->data;
235 235
     }
236 236
 
237 237
     protected function setData(array $array): self
@@ -250,9 +250,9 @@  discard block
 block discarded – undo
250 250
     }
251 251
 
252 252
     /**
253
-        * @param string $query
254
-        * @param array|null $params
255
-        * @return PDOStatement|void
253
+     * @param string $query
254
+     * @param array|null $params
255
+     * @return PDOStatement|void
256 256
      */
257 257
     protected function executeSQL(string $query, ?array $params = null)
258 258
     {
@@ -280,8 +280,8 @@  discard block
 block discarded – undo
280 280
     }
281 281
 
282 282
     /**
283
-    * @param PDOStatement|null $prepare
284
-    * @return array|null
283
+     * @param PDOStatement|null $prepare
284
+     * @return array|null
285 285
      */
286 286
     protected function fetchArrayAssoc(PDOStatement $prepare = null): ?array
287 287
     {
@@ -344,8 +344,8 @@  discard block
 block discarded – undo
344 344
     }
345 345
 
346 346
     /**
347
-    * @param PDOStatement|null $prepare
348
-    * @return stdClass|null
347
+     * @param PDOStatement|null $prepare
348
+     * @return stdClass|null
349 349
      */
350 350
     protected function fetchOneObj(PDOStatement $prepare = null): ?stdClass
351 351
     {
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,8 +161,9 @@
 block discarded – undo
161 161
      */
162 162
     protected function setTableName(string $tableName, string $tableAlias = ""): self
163 163
     {
164
-        if (!empty($tableAlias))
165
-            $this->tableAlias = $tableAlias;
164
+        if (!empty($tableAlias)) {
165
+                    $this->tableAlias = $tableAlias;
166
+        }
166 167
         $this->tableName = $tableName;
167 168
         return $this;
168 169
     }
Please login to merge, or discard this patch.
example/ExampleDao.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
     public function findName(): array {
16 16
         $this->selectBuilder()
17
-            ->where("NOME=?",["Joao"])
17
+            ->where("NOME=?", ["Joao"])
18 18
             ->orderBy("NOME")
19 19
             ->executeQuery()
20 20
             ->fetchArrayAssoc();
Please login to merge, or discard this patch.
src/Crud.php 3 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,9 @@
 block discarded – undo
33 33
 
34 34
         $sql = "SELECT {$fields} FROM {$this->getTableName()}";
35 35
 
36
-        if (!empty($this->getTableAlias()))
37
-            $sql .= " AS {$this->getTableAlias()}";
36
+        if (!empty($this->getTableAlias())) {
37
+                    $sql .= " AS {$this->getTableAlias()}";
38
+        }
38 39
 
39 40
         $sql .= "{$add}";
40 41
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@
 block discarded – undo
247 247
         return $this->logSQL ?? "";
248 248
     }
249 249
 
250
-       public function extractModel($model): \stdClass{
250
+        public function extractModel($model): \stdClass{
251 251
         $reflection = new \ReflectionClass(get_class($model)); 
252 252
         $objeto = new \stdClass; 
253 253
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function select(string $fields = '*', string $add = '', array $values = null, bool $returnModel = false, bool $debug = false)
29 29
     {
30
-        if (strlen($add) > 0) {
30
+        if (strlen($add)>0) {
31 31
             $add = ' ' . $add;
32 32
         }
33 33
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $numparams = substr($numparams, 1);
67 67
         $sql = "INSERT INTO {$this->getTableName()} ({$fields}) VALUES ({$numparams})";
68 68
         if ($debug) {
69
-            echo $sql.'<pre>'.print_r($values).'</pre>';
69
+            echo $sql . '<pre>' . print_r($values) . '</pre>';
70 70
             return;
71 71
         }
72 72
         $result = $this->executeSQL($sql, $values);
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             $sql .= " WHERE $where";
149 149
         }
150 150
         if ($debug) {
151
-            echo $sql.'<pre>'.print_r($values).'</pre>';
151
+            echo $sql . '<pre>' . print_r($values) . '</pre>';
152 152
             return;
153 153
         }
154 154
         $result = $this->executeSQL($sql, $values);
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             $sql .= " WHERE $where";
224 224
         }
225 225
         if ($debug) {
226
-            echo $sql.'<pre>'.print_r($values).'</pre>';
226
+            echo $sql . '<pre>' . print_r($values) . '</pre>';
227 227
             return;
228 228
         }
229 229
         $result = $this->executeSQL($sql, $values);
@@ -252,12 +252,12 @@  discard block
 block discarded – undo
252 252
         $objeto = new \stdClass; 
253 253
 
254 254
         foreach ($reflection->getProperties() as $prop) {
255
-            $method = 'get'.$prop->name ; 
256
-            $objeto->{$prop->name} =  call_user_func([$model, $method]); 
255
+            $method = 'get' . $prop->name; 
256
+            $objeto->{$prop->name} = call_user_func([$model, $method]); 
257 257
             
258 258
         }
259 259
 
260
-        return $objeto ; 
260
+        return $objeto; 
261 261
 
262 262
 
263 263
     }
Please login to merge, or discard this patch.
src/CrudBuilder.php 3 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     protected function orderBy(string $parameter, $order = null): self
188 188
     {
189 189
         try {
190
-            $query = "ORDER BY {$parameter} ".($order ?? 'ASC');
190
+            $query = "ORDER BY {$parameter} " . ($order ?? 'ASC');
191 191
             $this->add($query, "orderBy");
192 192
             return $this;
193 193
         } catch (\PDOException $e) {
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     protected function addOrderBy(string $parameter, $order = null): self
204 204
     {
205 205
         try {
206
-            $query = ", {$parameter} ".($order ?? 'ASC')." ";
206
+            $query = ", {$parameter} " . ($order ?? 'ASC') . " ";
207 207
             $this->add($query, "addOrderBy");
208 208
             return $this;
209 209
         } catch (\PDOException $e) {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     protected function limit(string $texto): self
219 219
     {
220 220
         $query = "LIMIT {$texto}";
221
-        $this->add($query,"limit");
221
+        $this->add($query, "limit");
222 222
         return $this;
223 223
     }
224 224
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     {
231 231
         try {
232 232
             $query = "OFFSET {$texto}";
233
-            $this->add($query,"offset");
233
+            $this->add($query, "offset");
234 234
             return $this;
235 235
         } catch (\PDOException $e) {
236 236
             $this->setError($e);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     {
246 246
         try {
247 247
             $query = "GROUP BY {$texto}";
248
-            $this->add($query,"groupBy");
248
+            $this->add($query, "groupBy");
249 249
             return $this;
250 250
         } catch (\PDOException $e) {
251 251
             $this->setError($e);
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
     {
261 261
         try {
262 262
             $query = "HAVING {$texto}";
263
-            $this->add($query,"having");
263
+            $this->add($query, "having");
264 264
             return $this;
265 265
         } catch (\PDOException $e) {
266 266
             $this->setError($e);
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     {
276 276
         try {
277 277
             $query = "AND {$texto}";
278
-            $this->add($query,"andHaving");
278
+            $this->add($query, "andHaving");
279 279
             return $this;
280 280
         } catch (\PDOException $e) {
281 281
             $this->setError($e);
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     {
291 291
         try {
292 292
             $query = "OR {$codition}";
293
-            $this->add($query,"orHaving");
293
+            $this->add($query, "orHaving");
294 294
             return $this;
295 295
         } catch (\PDOException $e) {
296 296
             $this->setError($e);
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     {
308 308
         try {
309 309
             $query = "INNER JOIN {$table} AS {$alias} ON $codition";
310
-            $this->add($query,"join");
310
+            $this->add($query, "join");
311 311
             return $this;
312 312
         } catch (\PDOException $e) {
313 313
             $this->setError($e);
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     {
325 325
         try {
326 326
             $query = "LEFT JOIN {$table} AS {$alias} ON {$codition}";
327
-            $this->add($query,"join");
327
+            $this->add($query, "join");
328 328
             return $this;
329 329
         } catch (\PDOException $e) {
330 330
             $this->setError($e);
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     {
342 342
         try {
343 343
             $query = "RIGHT JOIN {$table} AS {$alias} ON $codition";
344
-            $this->add($query,"join");
344
+            $this->add($query, "join");
345 345
             return $this;
346 346
         } catch (\PDOException $e) {
347 347
             $this->setError($e);
@@ -354,13 +354,13 @@  discard block
 block discarded – undo
354 354
     protected function executeQuery(): self
355 355
     {
356 356
         try {
357
-            foreach ($this->sqlPartsSelect as $key => $part){
357
+            foreach ($this->sqlPartsSelect as $key => $part) {
358 358
                 if (is_array($part)) {
359
-                    foreach ($part as $item){
360
-                        $this->setQuery($this->getQuery().$item);
359
+                    foreach ($part as $item) {
360
+                        $this->setQuery($this->getQuery() . $item);
361 361
                     }
362 362
                 } else {
363
-                    $this->setQuery($this->getQuery().$part);
363
+                    $this->setQuery($this->getQuery() . $part);
364 364
                 }
365 365
 
366 366
             }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
      */
395 395
     private function add(string $query, string $type, array $params = []): void
396 396
     {
397
-        $query = $query." ";
397
+        $query = $query . " ";
398 398
         try {
399 399
             if (is_array($this->sqlPartsSelect[$type])) {
400 400
                 $this->sqlPartsSelect[$type][] = $query;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
     {
48 48
         try {
49 49
             $query = "SELECT {$fields} FROM {$this->getTableName()}";
50
-            if (!empty($this->getTableAlias()))
51
-                $query .= " AS {$this->getTableAlias()}";
50
+            if (!empty($this->getTableAlias())) {
51
+                            $query .= " AS {$this->getTableAlias()}";
52
+            }
52 53
             $this->add($query, "main", $paramns);
53 54
             return $this;
54 55
         } catch (\PDOException $e) {
@@ -402,8 +403,9 @@  discard block
 block discarded – undo
402 403
                 $this->sqlPartsSelect[$type] = $query;
403 404
             }
404 405
 
405
-            if (!empty($params))
406
-                $this->setParams($params);
406
+            if (!empty($params)) {
407
+                            $this->setParams($params);
408
+            }
407 409
         } catch (\PDOException $e) {
408 410
             $this->setError($e);
409 411
         }
Please login to merge, or discard this patch.
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 abstract class CrudBuilder extends Crud
16 16
 {
17 17
     /**
18
-    * @var array
18
+     * @var array
19 19
      */
20 20
     private array $sqlPartsSelect = [
21 21
         'main'      => [],
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
 
36 36
     /**
37 37
      *
38
-    * <code>
39
-    *   $qb = $this->select('u.id, p.id')
40
-    *           ->where('phonenumbers=?', [$number]);
41
-    * </code>
42
-    * @param string $fields
43
-    * @param array $paramns
44
-    * @return $this
38
+     * <code>
39
+     *   $qb = $this->select('u.id, p.id')
40
+     *           ->where('phonenumbers=?', [$number]);
41
+     * </code>
42
+     * @param string $fields
43
+     * @param array $paramns
44
+     * @return $this
45 45
      */
46 46
     protected function selectBuilder(string $fields = "*", array $paramns = []): self
47 47
     {
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     /**
60
-    * @param string $fields
61
-    * @param array $paramns
62
-    * @return $this
60
+     * @param string $fields
61
+     * @param array $paramns
62
+     * @return $this
63 63
      */
64 64
     protected function insertBuilder(string $fields, array $paramns): self
65 65
     {
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
     }
79 79
 
80 80
     /**
81
-    * @param string $fields
82
-    * @param array $paramns
83
-    * @return $this
81
+     * @param string $fields
82
+     * @param array $paramns
83
+     * @return $this
84 84
      */
85 85
     protected function updateBuilder(string $fields, array $paramns): self
86 86
     {
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
     }
102 102
 
103 103
     /**
104
-    * @param string $fields
105
-    * @param array $paramns
106
-    * @return $this
104
+     * @param string $fields
105
+     * @param array $paramns
106
+     * @return $this
107 107
      */
108 108
     protected function deleteBuilder(): self
109 109
     {
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
     }
118 118
 
119 119
     /**
120
-    * @param string $query
121
-    * @param array $paramns
122
-    * @return $this
120
+     * @param string $query
121
+     * @param array $paramns
122
+     * @return $this
123 123
      */
124 124
     protected function query(string $query, array $paramns = []): self
125 125
     {
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
     }
133 133
 
134 134
     /**
135
-    * @param string $texto
136
-    * @param array $paramns
137
-    * @return $this
135
+     * @param string $texto
136
+     * @param array $paramns
137
+     * @return $this
138 138
      */
139 139
     protected function where(string $texto, array $paramns = []): self
140 140
     {
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
     }
149 149
 
150 150
     /**
151
-    * @param string $condition
152
-    * @param array $paramns
153
-    * @return $this
151
+     * @param string $condition
152
+     * @param array $paramns
153
+     * @return $this
154 154
      */
155 155
     protected function andWhere(string $condition, array $paramns = []): self
156 156
     {
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
     }
165 165
 
166 166
     /**
167
-    * @param string $condition
168
-    * @param array $paramns
169
-    * @return $this
167
+     * @param string $condition
168
+     * @param array $paramns
169
+     * @return $this
170 170
      */
171 171
     protected function orWhere(string $condition, array $paramns = []): self
172 172
     {
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
     }
181 181
 
182 182
     /**
183
-    * @param string $parameter
184
-    * @param $order
185
-    * @return $this
183
+     * @param string $parameter
184
+     * @param $order
185
+     * @return $this
186 186
      */
187 187
     protected function orderBy(string $parameter, $order = null): self
188 188
     {
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
     }
197 197
 
198 198
     /**
199
-    * @param string $parameter
200
-    * @param $order
201
-    * @return $this
199
+     * @param string $parameter
200
+     * @param $order
201
+     * @return $this
202 202
      */
203 203
     protected function addOrderBy(string $parameter, $order = null): self
204 204
     {
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
     }
213 213
 
214 214
     /**
215
-    * @param string $texto
216
-    * @return $this
215
+     * @param string $texto
216
+     * @return $this
217 217
      */
218 218
     protected function limit(string $texto): self
219 219
     {
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
     }
224 224
 
225 225
     /**
226
-    * @param string $texto
227
-    * @return $this
226
+     * @param string $texto
227
+     * @return $this
228 228
      */
229 229
     protected function offset(string $texto): self
230 230
     {
@@ -238,8 +238,8 @@  discard block
 block discarded – undo
238 238
     }
239 239
 
240 240
     /**
241
-    * @param string $texto
242
-    * @return $this
241
+     * @param string $texto
242
+     * @return $this
243 243
      */
244 244
     protected function groupBy(string $texto): self
245 245
     {
@@ -253,8 +253,8 @@  discard block
 block discarded – undo
253 253
     }
254 254
 
255 255
     /**
256
-    * @param string $texto
257
-    * @return $this
256
+     * @param string $texto
257
+     * @return $this
258 258
      */
259 259
     protected function having(string $texto): self
260 260
     {
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
     }
299 299
 
300 300
     /**
301
-    * @param string $table
302
-    * @param string $alias
303
-    * @param string $codition
304
-    * @return $this
301
+     * @param string $table
302
+     * @param string $alias
303
+     * @param string $codition
304
+     * @return $this
305 305
      */
306 306
     protected function innerJoin(string $table, string $alias, string $codition): self
307 307
     {
@@ -315,10 +315,10 @@  discard block
 block discarded – undo
315 315
     }
316 316
 
317 317
     /**
318
-    * @param string $table
319
-    * @param string $alias
320
-    * @param string $codition
321
-    * @return $this
318
+     * @param string $table
319
+     * @param string $alias
320
+     * @param string $codition
321
+     * @return $this
322 322
      */
323 323
     protected function leftJoin(string $table, string $alias, string $codition): self
324 324
     {
@@ -332,10 +332,10 @@  discard block
 block discarded – undo
332 332
     }
333 333
 
334 334
     /**
335
-    * @param string $table
336
-    * @param string $alias
337
-    * @param string $codition
338
-    * @return $this
335
+     * @param string $table
336
+     * @param string $alias
337
+     * @param string $codition
338
+     * @return $this
339 339
      */
340 340
     protected function rightJoin(string $table, string $alias, string $codition): self
341 341
     {
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
     }
374 374
 
375 375
     /**
376
-    * @return void
376
+     * @return void
377 377
      */
378 378
     protected function debug(): void
379 379
     {
@@ -387,10 +387,10 @@  discard block
 block discarded – undo
387 387
 
388 388
 
389 389
     /**
390
-    * @param string $query
391
-    * @param string $type
392
-    * @param array $params
393
-    * @return void
390
+     * @param string $query
391
+     * @param string $type
392
+     * @param array $params
393
+     * @return void
394 394
      */
395 395
     private function add(string $query, string $type, array $params = []): void
396 396
     {
Please login to merge, or discard this patch.
rector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 use Rector\Config\RectorConfig;
7 7
 use Rector\Set\ValueObject\LevelSetList;
8 8
 
9
-return static function (RectorConfig $rectorConfig): void {
9
+return static function(RectorConfig $rectorConfig): void {
10 10
     $rectorConfig->paths([
11 11
         __DIR__ . '/example',
12 12
         __DIR__ . '/src',
Please login to merge, or discard this patch.
src/ModelAbstract.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function __get($name)
37 37
     {
38
-        return $this->{$name} ?? ($this->dataModelArray[$name]?? "");
38
+        return $this->{$name} ?? ($this->dataModelArray[$name] ?? "");
39 39
     }
40 40
 
41 41
     /**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function __set($key, $value): void
47 47
     {
48
-        if (property_exists($this, $key)){
48
+        if (property_exists($this, $key)) {
49 49
             $this->{$key} = $value;
50 50
         }
51 51
         $this->dataModelArray[$key] = $value;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     function __isset($key) {
59 59
 
60 60
         $result = isset($this->dataModelArray[$key]);
61
-        if (property_exists($this, $key)){
61
+        if (property_exists($this, $key)) {
62 62
             $result = isset($this->{$key});
63 63
         }
64 64
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         foreach ($params as $key => $item) {
82 82
             $this->dataModelArray[$key] = $item;
83
-            if (property_exists($this, $key)){
83
+            if (property_exists($this, $key)) {
84 84
                 $this->{$key} = $item;
85 85
             }
86 86
         }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         if (is_array($data) || is_object($data)) {
107 107
             $result = [];
108 108
             foreach ($data as $key => $value) {
109
-                if(strlen($value) > 0)
109
+                if (strlen($value)>0)
110 110
                     $result[$key] = (is_array($value) || is_object($value)) ? $this->toMap($value) : $value;
111 111
             }
112 112
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         }
138 138
 
139 139
         return $classname . ' {' . implode(', ', array_map(
140
-                function ($p_0) use ($data) {
140
+                function($p_0) use ($data) {
141 141
                     $p_0->setAccessible(true);
142 142
 
143 143
                     return $p_0->getName() . ': ' . $p_0->getValue($data);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,8 +106,9 @@
 block discarded – undo
106 106
         if (is_array($data) || is_object($data)) {
107 107
             $result = [];
108 108
             foreach ($data as $key => $value) {
109
-                if(strlen($value) > 0)
110
-                    $result[$key] = (is_array($value) || is_object($value)) ? $this->toMap($value) : $value;
109
+                if(strlen($value) > 0) {
110
+                                    $result[$key] = (is_array($value) || is_object($value)) ? $this->toMap($value) : $value;
111
+                }
111 112
             }
112 113
 
113 114
             return $result;
Please login to merge, or discard this patch.