Background
I use several helper functions to stop the program flow and return data. For example, while most pages are HTML I occasionally return JSON and call
/**
* @param array|bool $response
*
* @die
*/
function jsonResponseDie($response)
{
header('Content-Type: application/json');
echo json_encode($response);
die();
}
The Problem
However, the calling function does not detect that there is a die statement and allows code to be present after it without warning.
function recievePush()
{
// Process a push request and respond with a json array.
jsonResponseDie(array('status' => TRUE));
echo 'This will never execute but PhpStorm doesn\'t know that';
}
The Question
How do I get PhpStorm to detect this function will die?
I did try a few items "@return die" or "@die" but these do not appear to be recognized. I also reviewed some documentation here but found nothing useful.
