@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | if (in_array($actionType, ['save_add', 'save_edit'])) { |
89 | - $rowAssign = array_filter($input_validator, function ($column) use ($table) { |
|
89 | + $rowAssign = array_filter($input_validator, function($column) use ($table) { |
|
90 | 90 | return Schema::hasColumn($table, $column); |
91 | 91 | }, ARRAY_FILTER_USE_KEY); |
92 | 92 | |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | */ |
199 | 199 | private function filterRows($data, $parameters, $posts, $table, $typeExcept) |
200 | 200 | { |
201 | - $data->where(function ($w) use ($parameters, $posts, $table, $typeExcept) { |
|
201 | + $data->where(function($w) use ($parameters, $posts, $table, $typeExcept) { |
|
202 | 202 | foreach ($parameters as $param) { |
203 | 203 | $name = $param['name']; |
204 | 204 | $type = $param['type']; |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $row->$k = asset($v); |
290 | 290 | } |
291 | 291 | |
292 | - if (! in_array($k, $responsesFields)) { |
|
292 | + if (!in_array($k, $responsesFields)) { |
|
293 | 293 | unset($row[$k]); |
294 | 294 | } |
295 | 295 | } |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | $rows->$k = asset($v); |
353 | 353 | } |
354 | 354 | |
355 | - if (! in_array($k, $responsesFields)) { |
|
355 | + if (!in_array($k, $responsesFields)) { |
|
356 | 356 | unset($row[$k]); |
357 | 357 | } |
358 | 358 | } |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | */ |
425 | 425 | private function applyLike($data, $search_in, $value) |
426 | 426 | { |
427 | - $data->where(function ($w) use ($search_in, $value) { |
|
427 | + $data->where(function($w) use ($search_in, $value) { |
|
428 | 428 | foreach ($search_in as $k => $field) { |
429 | 429 | if ($k == 0) { |
430 | 430 | $w->where($field, "like", "%$value%"); |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | */ |
446 | 446 | private function joinRelatedTables($table, $responsesFields, $name, $data, $nameTmp) |
447 | 447 | { |
448 | - if (! DbInspector::isForeignKey($name)) { |
|
448 | + if (!DbInspector::isForeignKey($name)) { |
|
449 | 449 | return $nameTmp; |
450 | 450 | } |
451 | 451 | $jointable = DbInspector::getTableForeignKey($name); |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | */ |
508 | 508 | private function checkApiDefined($row_api, $result, $debugModeMessage, $posts) |
509 | 509 | { |
510 | - if (! $row_api) { |
|
510 | + if (!$row_api) { |
|
511 | 511 | $result['api_status'] = 0; |
512 | 512 | $result['api_message'] = 'Sorry this API is no longer available, maybe has changed by admin, or please make sure api url is correct.'; |
513 | 513 | |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | private function doValidation($input_validator, $data_validation, $result, $debugModeMessage, $posts) |
529 | 529 | { |
530 | 530 | $validator = Validator::make($input_validator, $data_validation); |
531 | - if (! $validator->fails()) { |
|
531 | + if (!$validator->fails()) { |
|
532 | 532 | return $result; |
533 | 533 | } |
534 | 534 | $message = $validator->errors()->all(); |
@@ -576,11 +576,11 @@ discard block |
||
576 | 576 | $value = $param['config']; |
577 | 577 | } |
578 | 578 | |
579 | - if ($required && $type == 'password' && ! Hash::check($value, $row->{$name})) { |
|
579 | + if ($required && $type == 'password' && !Hash::check($value, $row->{$name})) { |
|
580 | 580 | $this->passwordError($result, $debugModeMessage, $posts); |
581 | 581 | } |
582 | 582 | |
583 | - if (! $required && $used && $value && ! Hash::check($value, $row->{$name})) { |
|
583 | + if (!$required && $used && $value && !Hash::check($value, $row->{$name})) { |
|
584 | 584 | $this->passwordError($result, $debugModeMessage, $posts); |
585 | 585 | } |
586 | 586 | } |
@@ -598,11 +598,11 @@ discard block |
||
598 | 598 | */ |
599 | 599 | private function filterRedundantResp($responses) |
600 | 600 | { |
601 | - $responses = array_filter($responses, function ($resp) { |
|
602 | - return ! ($resp['name'] == 'ref_id' || $resp['type'] == 'custom'); |
|
601 | + $responses = array_filter($responses, function($resp) { |
|
602 | + return !($resp['name'] == 'ref_id' || $resp['type'] == 'custom'); |
|
603 | 603 | }); |
604 | 604 | |
605 | - $responses = array_filter($responses, function ($resp) { |
|
605 | + $responses = array_filter($responses, function($resp) { |
|
606 | 606 | return (intval($resp['used']) != 0 || DbInspector::isForeignKey($resp['name'])); |
607 | 607 | }); |
608 | 608 |