summaryrefslogtreecommitdiff
path: root/src/Util.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Util.php')
-rw-r--r--src/Util.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Util.php b/src/Util.php
new file mode 100644
index 0000000..817e8a1
--- /dev/null
+++ b/src/Util.php
@@ -0,0 +1,7 @@
+<?php
+
+function throw_if_null($arg) {
+ if ($arg === null) throw new Exception('argument is null');
+}
+
+?>