first of all, I am quite new to PHP and web development in general. I see people using the Ternary Operators quite a lot but sometimes I like the following solution. If there is only need for if statements, is the following code against any general php convention ?
if($result->num_rows < 1) return $response->error(400, "Target with ID " . $target->id . " does not exist");
Best regards, Fabian