Merge pull request #49 from ThomasRubini/intordie

This commit is contained in:
Thomas Rubini 2023-01-22 21:43:28 +01:00 committed by GitHub
commit d716f15fe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");
}
}