Skip to content

Commit

Permalink
php cs fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
scottshipman committed Jun 21, 2018
1 parent 6c86b55 commit e226c47
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Controller/ContactClientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,28 +273,28 @@ protected function convertChartStatsToDatatable($stats, $unit)
$date = null;
switch ($unit) {
case 'd': // M j, y
$date = date_create_from_format('M j, y', $dateStr);
$date = date_create_from_format('M j, y', $dateStr);
$dateStr = $date->format('Y-m-d');
break;
case 'H': // M j ga
$date = date_create_from_format('M j ga', $dateStr);
$dateStr = $date->format('Y-m-d - H:00');
$date = date_create_from_format('M j ga', $dateStr);
$dateStr = $date->format('Y-m-d - H:00');
$tableData['labels'][1] = ['title' => 'Date/Time'];
break;
case 'm': // M j ga
$date = date_create_from_format('M Y', $dateStr);
$dateStr = $date->format('Y-m');
$date = date_create_from_format('M Y', $dateStr);
$dateStr = $date->format('Y-m');
$tableData['labels'][1] = ['title' => 'Date (Y-m)'];
break;
case 'Y': // Y
$date = date_create_from_format('Y', $dateStr);
$dateStr = $date->format('Y');
$date = date_create_from_format('Y', $dateStr);
$dateStr = $date->format('Y');
$tableData['labels'][1] = ['title' => 'Year'];
break;
case 'W': // W
$date = new \DateTime();
$date->setISODate(date("Y"), str_replace("Week ", "", $dateStr));
$dateStr = "Week " .$date->format('W');
$date->setISODate(date('Y'), str_replace('Week ', '', $dateStr));
$dateStr = 'Week '.$date->format('W');
$tableData['labels'][1] = ['title' => 'Week #'];
break;
default:
Expand Down

0 comments on commit e226c47

Please sign in to comment.