diff --git a/src/Contract.php b/src/Contract.php index 87ad1fc..25843f4 100644 --- a/src/Contract.php +++ b/src/Contract.php @@ -587,6 +587,8 @@ class Contract $method = array_splice($arguments, 0, 1)[0]; $callback = array_pop($arguments); + $arguments = is_array($arguments[0]) ? $arguments[0] : $arguments; + if (!is_string($method)) { throw new InvalidArgumentException('Please make sure the method is string.'); }