diff --git a/src/Identical.php b/src/Identical.php index fc5c3042a..9615dde22 100644 --- a/src/Identical.php +++ b/src/Identical.php @@ -150,21 +150,13 @@ public function setLiteral($literal) * @return bool * @throws Exception\RuntimeException if the token doesn't exist in the context array */ - public function isValid($value, $context = null) + public function isValid($value, array $context = null) { $this->setValue($value); $token = $this->getToken(); if (!$this->getLiteral() && $context !== null) { - if (!is_array($context)) { - throw new Exception\InvalidArgumentException(sprintf( - 'Context passed to %s must be an array or null; received "%s"', - __METHOD__, - (is_object($context) ? get_class($context) : gettype($context)) - )); - } - if (is_array($token)) { while (is_array($token)){ $key = key($token);