From 433430265bc20cdd41dffeb7b5c8e096f1147e3f Mon Sep 17 00:00:00 2001 From: Julien Deniau Date: Tue, 20 May 2025 15:36:30 +0000 Subject: [PATCH] Remove PHP 8 deprecations --- src/ISO7064Mod97_10.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ISO7064Mod97_10.php b/src/ISO7064Mod97_10.php index 433126b..365d571 100644 --- a/src/ISO7064Mod97_10.php +++ b/src/ISO7064Mod97_10.php @@ -27,11 +27,11 @@ function encode($str) $c = $this->checkCode("$str"); if ($c == 0) { - return (int)"${str}00"; + return (int)"{$str}00"; } elseif ($c < 10) { - return (int)"${str}0${c}"; + return (int)"{$str}0{$c}"; } else { - return (int)"${str}${c}"; + return (int)"{$str}{$c}"; } } function verify($str) @@ -41,7 +41,7 @@ function verify($str) function checkCode($str) { - return (98 - ($this->computeCheck("${str}00") % 97)); + return (98 - ($this->computeCheck("{$str}00") % 97)); } function computeCheck($str) @@ -90,11 +90,11 @@ function encode($str) { $c = $this->computeCheck($str); if ($c == 0) { - return (int)"${str}00"; + return (int)"{$str}00"; } elseif ($c < 10) { - return (int)"${str}0${c}"; + return (int)"{$str}0{$c}"; } else { - return (int)"${str}${c}"; + return (int)"{$str}{$c}"; } } function verify($str)