Avoid switch inside switch

parent f52b9ff2
......@@ -131,8 +131,8 @@ class SqlitePlatform extends AbstractPlatform
case DateIntervalUnit::MINUTE:
case DateIntervalUnit::HOUR:
return 'DATETIME(' . $date . ",'" . $operator . $interval . ' ' . $unit . "')";
}
default:
switch ($unit) {
case DateIntervalUnit::WEEK:
$interval *= 7;
......@@ -151,7 +151,6 @@ class SqlitePlatform extends AbstractPlatform
return 'DATE(' . $date . ",'" . $operator . $interval . ' ' . $unit . "')";
}
}
/**
* {@inheritDoc}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment