From 96c5ad03946db82c71ff3b584d358656324dd7a3 Mon Sep 17 00:00:00 2001 From: Michael Brenden Date: Fri, 27 Dec 2019 07:03:17 -0500 Subject: [PATCH] updated Dice.php line 233, because __toString deprecated in PHP 7.4.1, must be getName --- Dice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dice.php b/Dice.php index d9360cc..3109470 100644 --- a/Dice.php +++ b/Dice.php @@ -230,7 +230,7 @@ private function getParams(\ReflectionMethod $method, array $rule) { } // There is no type hint, take the next available value from $args (and remove it from $args to stop it being reused) // Support PHP 7 scalar type hinting, is_a('string', 'foo') doesn't work so this is a hacky AF workaround: call_user_func('is_' . $type, '') - else if ($args && (!$param->getType() || call_user_func('is_' . $param->getType()->__toString(), $args[0]))) $parameters[] = $this->expand(array_shift($args)); + else if ($args && (!$param->getType() || call_user_func('is_' . $param->getType()->getName(), $args[0]))) $parameters[] = $this->expand(array_shift($args)); // There's no type hint and nothing left in $args, provide the default value or null else $parameters[] = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null; }