A simple question, I have this following code:
if ($this->someSecurityCheck()) {
// do stuff
} else {
// show alert message
redirect(‘index');
}
and for better legibility (the code is big), I’m wondering to change it to:
if (!$this->someSecurityCheck()) {
// show alert message
redirect(‘index');
die();
}
// do stuff
I know that both should work, but the second seems logically „incorrect“. Any thoughts?