Commit 637c8b0e authored by Johannes's avatar Johannes

Use modulo instead of if block

parent 201b0a86
......@@ -58,11 +58,7 @@ class MaintenanceModel extends Db
public function getStoreManagersWhichWillBeAlerted()
{
$dow = (int)date('w');
$dow_tomorrow = $dow + 1;
if ($dow_tomorrow == 7) {
$dow_tomorrow = 0;
}
$dow_tomorrow = ($dow + 1) % 7;
$store_query = '
SELECT
......
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