diff options
Diffstat (limited to 'src/Script/Input.php')
-rw-r--r-- | src/Script/Input.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Script/Input.php b/src/Script/Input.php index 4e437dd..772bb8c 100644 --- a/src/Script/Input.php +++ b/src/Script/Input.php @@ -63,6 +63,14 @@ class Input if ((array_key_exists('d', $this->options) <=> array_key_exists('t', $this->options)) !== 0) { throw new Exception('Both day and time options (`-d` and `-t`) are required for time based filtering'); } + + if (array_key_exists('c', $this->options) && !is_numeric($this->options['c'])) { + throw new Exception('Value for option `-c` must be an integer'); + } + + if (array_key_exists('l', $this->options) && is_numeric($this->options['l'])) { + throw new Exception('Value for option `-l` must be a string'); + } } /** |