是否有一个属性来标记总是抛出异常或死亡的函数?
/** @noreturn */
function customDie() {
die();
}
function bar() {
switch( .. ) {
case 1: customDie(); // <-- should not warn because there is no break
case 2: xxx();
}
/** @return int */
function goo() {
...
customDie(); // <-- should not warn that the method is not returning an integer
}