diff --git a/Kernel/Utils.php b/Kernel/Utils.php index 27077a7..8d9486a 100644 --- a/Kernel/Utils.php +++ b/Kernel/Utils.php @@ -9,4 +9,10 @@ final class Utils else die("Key $key not present"); } + public static function intOrDie($data) + { + if (is_numeric($data)) return (int) $data; + else die("Not an int"); + } + }