Avoid switch inside switch

parent f52b9ff2
...@@ -131,8 +131,8 @@ class SqlitePlatform extends AbstractPlatform ...@@ -131,8 +131,8 @@ class SqlitePlatform extends AbstractPlatform
case DateIntervalUnit::MINUTE: case DateIntervalUnit::MINUTE:
case DateIntervalUnit::HOUR: case DateIntervalUnit::HOUR:
return 'DATETIME(' . $date . ",'" . $operator . $interval . ' ' . $unit . "')"; return 'DATETIME(' . $date . ",'" . $operator . $interval . ' ' . $unit . "')";
}
default:
switch ($unit) { switch ($unit) {
case DateIntervalUnit::WEEK: case DateIntervalUnit::WEEK:
$interval *= 7; $interval *= 7;
...@@ -151,7 +151,6 @@ class SqlitePlatform extends AbstractPlatform ...@@ -151,7 +151,6 @@ class SqlitePlatform extends AbstractPlatform
return 'DATE(' . $date . ",'" . $operator . $interval . ' ' . $unit . "')"; return 'DATE(' . $date . ",'" . $operator . $interval . ' ' . $unit . "')";
} }
}
/** /**
* {@inheritDoc} * {@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