From e965f8d04150fbd17ee1b5fcbca5ae85bbe6d6bd Mon Sep 17 00:00:00 2001 From: msquare Date: Thu, 29 Sep 2016 11:18:17 +0200 Subject: prohibit inline control structures on model and view --- includes/model/ShiftTypes_model.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'includes/model/ShiftTypes_model.php') diff --git a/includes/model/ShiftTypes_model.php b/includes/model/ShiftTypes_model.php index 7f057da8..a9cf77bd 100644 --- a/includes/model/ShiftTypes_model.php +++ b/includes/model/ShiftTypes_model.php @@ -37,8 +37,9 @@ function ShiftType_create($name, $angeltype_id, $description) { `name`='" . sql_escape($name) . "', `angeltype_id`=" . sql_null($angeltype_id) . ", `description`='" . sql_escape($description) . "'"); - if ($result === false) + if ($result === false) { return false; + } return sql_id(); } @@ -49,10 +50,12 @@ function ShiftType_create($name, $angeltype_id, $description) { */ function ShiftType($shifttype_id) { $shifttype = sql_select("SELECT * FROM `ShiftTypes` WHERE `id`='" . sql_escape($shifttype_id) . "'"); - if ($shifttype === false) + if ($shifttype === false) { return false; - if ($shifttype == null) + } + if ($shifttype == null) { return null; + } return $shifttype[0]; } -- cgit v1.2.3-54-g00ecf