Skip to content

Commit

Permalink
Merge pull request #1050 from uasoft-indonesia/analysis-7WnJZ2
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
miftahurrahmi authored Nov 21, 2023
2 parents f273c3f + b4b9f5a commit 7ee2319
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,27 +130,27 @@ public function getContentByType($data_type, $data_row, $value)
$return_value = $value;
break;
case 'time':
if ($value == null){
if ($value == null) {
$return_value = $value;
}else{
} else {
$z_removed = explode('.', $value)[0];
$time = explode('T', $z_removed)[1];
$return_value = $time;
}
break;
case 'date':
if($value == null){
if ($value == null) {
$return_value = $value;
}else{
} else {
$z_removed = explode('.', $value)[0];
$date = explode('T', $z_removed)[0];
$return_value = $date;
}
break;
case 'datetime':
if($value == null){
if ($value == null) {
$return_value = $value;
}else{
} else {
$z_removed = explode('.', $value)[0];
$date_time = str_replace('T', ' ', $z_removed);
$return_value = $date_time;
Expand Down Expand Up @@ -578,7 +578,7 @@ public function updateData($data, $data_type)
}

if (in_array($data_row->type, [
'number','datetime','date','time'
'number', 'datetime', 'date', 'time',
])) {
$new_data[$key] = $this->getContentByType($data_type, $data_row, $value) !== null ? $this->getContentByType($data_type, $data_row, $value) : null;
} else {
Expand Down

0 comments on commit 7ee2319

Please sign in to comment.