Merge pull request #49 from ThomasRubini/intordie
This commit is contained in:
commit
d716f15fe7
@ -9,4 +9,10 @@ final class Utils
|
|||||||
else die("Key $key not present");
|
else die("Key $key not present");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function intOrDie($data)
|
||||||
|
{
|
||||||
|
if (is_numeric($data)) return (int) $data;
|
||||||
|
else die("Not an int");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user